mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-12 07:27:57 +00:00
(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.
This commit is contained in:
parent
ed33fb7de0
commit
5e49915a14
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=27453
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user