summaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>2000-04-11 21:38:02 +0000
committerasami <asami@FreeBSD.org>2000-04-11 21:38:02 +0000
commit94d9842e2874e1c186a2b55213078efb5d13f5b9 (patch)
tree3551d40d70487e80cda56b0b94ef03795c922dee /Mk
parent51c1b9f9a90a432058792df22dbe12d831d611d0 (diff)
downloadFreeBSD-ports-94d9842e2874e1c186a2b55213078efb5d13f5b9.zip
FreeBSD-ports-94d9842e2874e1c186a2b55213078efb5d13f5b9.tar.gz
(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.
Diffstat (limited to '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 7c8ee50..b74c261 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}
OpenPOWER on IntegriCloud