summaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>2000-04-11 21:38:02 +0000
committerSatoshi Asami <asami@FreeBSD.org>2000-04-11 21:38:02 +0000
commit5e49915a14d6e0074778dbb432dd40bbd9120b02 (patch)
tree0286abac4dd2e21bf36da786326f59e735304a02 /Mk/bsd.port.mk
parentPORTNAME/PORTVERSION update (diff)
(1) Include ${.CURDIR}/../Makefile.inc before ${MASTERDIR}/../Makefile.inc
if ${.CURDIR} != ${MASTERDIR} (i.e., this is a slave port). Suggested by: knu (2) Move PKGNAME/DISTNAME definition into the pre.mk section so it can be used in ports' Makefiles.
Notes
Notes: svn path=/head/; revision=27453
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk42
1 files changed, 23 insertions, 19 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 7c8ee50a7bd4..b74c261a89a5 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -491,6 +491,10 @@ MASTERDIR?= ${.CURDIR}
# If they exist, include Makefile.inc, then architecture/operating
# system specific Makefiles, then local Makefile.local.
+.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc)
+.include "${.CURDIR}/../Makefile.inc"
+.endif
+
.if exists(${MASTERDIR}/../Makefile.inc)
.include "${MASTERDIR}/../Makefile.inc"
.endif
@@ -507,6 +511,25 @@ MASTERDIR?= ${.CURDIR}
.include "${MASTERDIR}/Makefile.local"
.endif
+.if defined(REQUIRE_PORTNAME) && !defined(PORTNAME)
+.BEGIN:
+ @${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
+ @${ECHO} "(This port is too old for your bsd.port.mk.)"
+ @${FALSE}
+.endif
+.if defined(PORTNAME)
+.if defined(PKGNAME) || !defined(PORTVERSION)
+.BEGIN:
+ @${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
+ @${FALSE}
+.endif
+PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
+DISTNAME?= ${PORTNAME}-${PORTVERSION}
+.else
+# old style
+PKGNAME?= ${DISTNAME}
+.endif
+
# These need to be absolute since we don't know how deep in the ports
# tree we are and thus can't go relative. They can, of course, be overridden
# by individual Makefiles or local system make configuration.
@@ -1104,25 +1127,6 @@ FETCH_BEFORE_ARGS+= -l
.endif
.endif
-.if defined(REQUIRE_PORTNAME) && !defined(PORTNAME)
-.BEGIN:
- @${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
- @${ECHO} "(This port is too old for your bsd.port.mk.)"
- @${FALSE}
-.endif
-.if defined(PORTNAME)
-.if defined(PKGNAME) || !defined(PORTVERSION)
-.BEGIN:
- @${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
- @${FALSE}
-.endif
-PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
-DISTNAME?= ${PORTNAME}-${PORTVERSION}
-.else
-# old style
-PKGNAME?= ${DISTNAME}
-.endif
-
DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}
ALLFILES?= ${DISTFILES} ${PATCHFILES}