Solve two simple problems:

- allow Makefile to distinguish packaging steps, since SUBPACKAGE can now
be set for various reasons.
- EXTRA_LIBDIRS for architectures without shared libraries.
This commit is contained in:
espie 2001-04-20 15:06:19 +00:00
parent 5bed1b1faf
commit 33d58011b9

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*- #-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make: # ex:ts=4 sw=4 filetype=make:
FULL_REVISION=$$OpenBSD: bsd.port.mk,v 1.403 2001/04/19 22:15:05 espie Exp $$ FULL_REVISION=$$OpenBSD: bsd.port.mk,v 1.404 2001/04/20 15:06:19 espie Exp $$
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $ # $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $ # $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
# #
@ -514,7 +514,7 @@ ${_PACKAGE_COOKIE}: ${_FAKE_COOKIE}
. else . else
${_PACKAGE_COOKIE}: ${_INSTALL_COOKIE} ${_PACKAGE_COOKIE}: ${_INSTALL_COOKIE}
. endif . endif
@cd ${.CURDIR} && SUBPACKAGE='' FLAVOR='${FLAVOR}' exec ${MAKE} _package @cd ${.CURDIR} && SUBPACKAGE='' FLAVOR='${FLAVOR}' PACKAGING=true exec ${MAKE} _package
.if !defined(PACKAGE_NOINSTALL) .if !defined(PACKAGE_NOINSTALL)
@${_MAKE_COOKIE} $@ @${_MAKE_COOKIE} $@
.endif .endif
@ -527,7 +527,7 @@ ${_PACKAGE_COOKIE${_sub}}: ${_FAKE_COOKIE}
. else . else
${_PACKAGE_COOKIE${_sub}}: ${_INSTALL_COOKIE} ${_PACKAGE_COOKIE${_sub}}: ${_INSTALL_COOKIE}
. endif . endif
@cd ${.CURDIR} && SUBPACKAGE='${_sub}' FLAVOR='${FLAVOR}' exec ${MAKE} _package @cd ${.CURDIR} && SUBPACKAGE='${_sub}' FLAVOR='${FLAVOR}' PACKAGING=true exec ${MAKE} _package
. if !defined(PACKAGE_NOINSTALL) . if !defined(PACKAGE_NOINSTALL)
@${_MAKE_COOKIE} $@ @${_MAKE_COOKIE} $@
. endif . endif
@ -1142,7 +1142,7 @@ _run_depends_fragment = ${_fetch_depends_fragment}; earlyexit=true
_lib_depends_fragment = \ _lib_depends_fragment = \
lib=`echo $$dep | sed -e 's|\([^\\]\)[\\\.].*|\1|'`; \ lib=`echo $$dep | sed -e 's|\([^\\]\)[\\\.].*|\1|'`; \
tmp=`mktemp /tmp/bpmXXXXXXXXXX`; \ tmp=`mktemp /tmp/bpmXXXXXXXXXX`; \
if ${LD} -r -o $$tmp -L${LOCALBASE}/lib -L${X11BASE}/lib -l$$lib; then \ if ${LD} -r -o $$tmp ${EXTRA_LIBDIRS:S/^/-L/} -L${LOCALBASE}/lib -L${X11BASE}/lib -l$$lib; then \
found=true; \ found=true; \
fi fi
.else .else
@ -2106,12 +2106,15 @@ clean-depends:
# #
describe: describe:
.if !defined(NO_DESCRIBE) .if !defined(NO_DESCRIBE)
@echo -n "${FULLPKGNAME}|${FULLPKGPATH}|" . if !defined(PACKAGING) && ${SUBPACKAGE} != ""
. if ${PREFIX} == ${LOCALBASE} @cd ${.CURDIR} && SUBPACKAGE='${SUBPACKAGE}' FLAVOR='${FLAVOR}' PACKAGING=true exec ${MAKE} describe
@echo -n "|"
. else . else
@echo -n "${FULLPKGNAME}|${FULLPKGPATH}|"
. if ${PREFIX} == ${LOCALBASE}
@echo -n "|"
. else
@echo -n "${PREFIX}|" @echo -n "${PREFIX}|"
. endif . endif
@echo -n "`${_COMMENT}`|"; \ @echo -n "`${_COMMENT}`|"; \
if [ -f ${DESCR} ]; then \ if [ -f ${DESCR} ]; then \
echo -n "${DESCR:S,^${PORTSDIR}/,,}|"; \ echo -n "${DESCR:S,^${PORTSDIR}/,,}|"; \
@ -2119,25 +2122,25 @@ describe:
echo -n "/dev/null|"; \ echo -n "/dev/null|"; \
fi; \ fi; \
echo -n "${MAINTAINER}|${CATEGORIES}|" echo -n "${MAINTAINER}|${CATEGORIES}|"
.if ${NEW_DEPENDS:L} == "yes" . if ${NEW_DEPENDS:L} == "yes"
. if !empty(_ALWAYS_DEP2) || !empty(_BUILD_DEP2) . if !empty(_ALWAYS_DEP2) || !empty(_BUILD_DEP2)
@cd ${.CURDIR} && _FINAL_ECHO=: _INITIAL_ECHO=: exec ${MAKE} build-depends-list @cd ${.CURDIR} && _FINAL_ECHO=: _INITIAL_ECHO=: exec ${MAKE} build-depends-list
. endif . endif
.else . else
. if !empty(_ALWAYS_DEP) || !empty(_BUILD_DEP) || target(depends-list) . if !empty(_ALWAYS_DEP) || !empty(_BUILD_DEP) || target(depends-list)
@cd ${.CURDIR} && echo -n `${MAKE} depends-list|${_SORT_DEPENDS}` @cd ${.CURDIR} && echo -n `${MAKE} depends-list|${_SORT_DEPENDS}`
. endif . endif
.endif . endif
@echo -n "|" @echo -n "|"
.if ${NEW_DEPENDS:L} == "yes" . if ${NEW_DEPENDS:L} == "yes"
. if !empty(_ALWAYS_DEP2) || !empty(_RUN_DEP2) . if !empty(_ALWAYS_DEP2) || !empty(_RUN_DEP2)
@cd ${.CURDIR} && _FINAL_ECHO=: _INITIAL_ECHO=: exec ${MAKE} run-depends-list @cd ${.CURDIR} && _FINAL_ECHO=: _INITIAL_ECHO=: exec ${MAKE} run-depends-list
. endif . endif
.else . else
. if !empty(_ALWAYS_DEP) || !empty(_RUN_DEP) || target(package-depends) . if !empty(_ALWAYS_DEP) || !empty(_RUN_DEP) || target(package-depends)
@cd ${.CURDIR} && echo -n `${MAKE} package-depends|${_SORT_DEPENDS}` @cd ${.CURDIR} && echo -n `${MAKE} package-depends|${_SORT_DEPENDS}`
. endif . endif
.endif . endif
@echo -n "|" @echo -n "|"
@case "${ONLY_FOR_ARCHS}" in \ @case "${ONLY_FOR_ARCHS}" in \
"") case "${NOT_FOR_ARCHS}" in \ "") case "${NOT_FOR_ARCHS}" in \
@ -2147,53 +2150,54 @@ describe:
*) echo -n "${ONLY_FOR_ARCHS}|";; \ *) echo -n "${ONLY_FOR_ARCHS}|";; \
esac esac
. if defined(PERMIT_PACKAGE_CDROM) . if defined(PERMIT_PACKAGE_CDROM)
. if ${PERMIT_PACKAGE_CDROM:L} == "yes" . if ${PERMIT_PACKAGE_CDROM:L} == "yes"
@echo -n "y|" @echo -n "y|"
. else . else
@echo -n "n|" @echo -n "n|"
. endif . endif
. else . else
@echo -n "?|" @echo -n "?|"
. endif . endif
. if defined(PERMIT_PACKAGE_FTP) . if defined(PERMIT_PACKAGE_FTP)
. if ${PERMIT_PACKAGE_FTP:L} == "yes" . if ${PERMIT_PACKAGE_FTP:L} == "yes"
@echo -n "y|" @echo -n "y|"
. else . else
@echo -n "n|" @echo -n "n|"
. endif . endif
. else . else
@echo -n "?|" @echo -n "?|"
. endif . endif
. if defined(PERMIT_DISTFILES_CDROM) . if defined(PERMIT_DISTFILES_CDROM)
. if ${PERMIT_DISTFILES_CDROM:L} == "yes" . if ${PERMIT_DISTFILES_CDROM:L} == "yes"
@echo -n "y|" @echo -n "y|"
. else . else
@echo -n "n|" @echo -n "n|"
. endif . endif
. else . else
@echo -n "?|" @echo -n "?|"
. endif . endif
. if defined(PERMIT_DISTFILES_FTP) . if defined(PERMIT_DISTFILES_FTP)
. if ${PERMIT_DISTFILES_FTP:L} == "yes" . if ${PERMIT_DISTFILES_FTP:L} == "yes"
@echo "y" @echo "y"
. else . else
@echo "n" @echo "n"
. endif . endif
. else . else
@echo "?" @echo "?"
. endif . endif
. endif
.endif .endif
.if defined(MULTI_PACKAGES) && empty(SUBPACKAGE) . if defined(MULTI_PACKAGES) && empty(SUBPACKAGE)
. for _sub in ${MULTI_PACKAGES} . for _sub in ${MULTI_PACKAGES}
@cd ${.CURDIR} && SUBPACKAGE='${_sub}' FLAVOR='${FLAVOR}' exec ${MAKE} describe @cd ${.CURDIR} && SUBPACKAGE='${_sub}' FLAVOR='${FLAVOR}' PACKAGING=true exec ${MAKE} describe
. endfor . endfor
.endif . endif
README.html: README.html: