Whenever we invoke a recursive make, we need to ensure that the proper

environment ${PKGSRC_MAKE_ENV} is also passed along.  Create a
convenience variable RECURSIVE_MAKE that does exactly this and that
can be used in place of MAKE when invoking make recursively.

Use RECURSIVE_MAKE everywhere in pkgsrc/mk that we invoke make
recursively.
This commit is contained in:
jlam 2006-07-27 21:46:45 +00:00
parent 03cba20b8e
commit c489860d62
12 changed files with 72 additions and 73 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.barrier.mk,v 1.10 2006/07/25 18:04:25 jlam Exp $
# $NetBSD: bsd.pkg.barrier.mk,v 1.11 2006/07/27 21:46:45 jlam Exp $
_COOKIE.barrier= ${WRKDIR}/.barrier_cookie
@ -57,7 +57,7 @@ barrier: ${_BARRIER_PRE_TARGETS} ${_COOKIE.barrier}
. if defined(PKG_VERBOSE)
@${PHASE_MSG} "Invoking \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after barrier for ${PKGNAME}"
. endif
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS}
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS}
. if defined(PKG_VERBOSE)
@${PHASE_MSG} "Leaving \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after barrier for ${PKGNAME}"
. endif

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.clean.mk,v 1.5 2006/07/20 15:42:04 jlam Exp $
# $NetBSD: bsd.pkg.clean.mk,v 1.6 2006/07/27 21:46:45 jlam Exp $
#
# This Makefile fragment is included to bsd.pkg.mk and defines the
# relevant variables and targets for the "clean" phase.
@ -33,7 +33,7 @@ clean-depends:
${_DEPENDS_WALK_CMD} ${PKGPATH} | \
while read dir; do \
cd ${.CURDIR}/../../$$dir && \
${MAKE} ${MAKEFLAGS} CLEANDEPENDS=no clean; \
${RECURSIVE_MAKE} ${MAKEFLAGS} CLEANDEPENDS=no clean; \
done
.PHONY: pre-clean

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.1877 2006/07/27 13:47:29 jlam Exp $
# $NetBSD: bsd.pkg.mk,v 1.1878 2006/07/27 21:46:45 jlam Exp $
#
# This file is in the public domain.
#
@ -25,11 +25,6 @@
.MAIN: all
# If MAKECONF is defined, then pass it down to all recursive make
# processes invoked by pkgsrc.
#
PKGSRC_MAKE_ENV+= ${MAKECONF:DMAKECONF=${MAKECONF:Q}}
.include "../../mk/bsd.prefs.mk"
.include "${PKGSRCDIR}/mk/flavor/bsd.flavor-vars.mk"
@ -825,9 +820,9 @@ su-bin-install:
else \
${SHCOMMENT} Cycle through some FTP server here ;\
${ECHO_MSG} "Installing from source" ; \
${MAKE} ${MAKEFLAGS} package \
${RECURSIVE_MAKE} ${MAKEFLAGS} package \
DEPENDS_TARGET=${DEPENDS_TARGET:Q} && \
${MAKE} ${MAKEFLAGS} clean ; \
${RECURSIVE_MAKE} ${MAKEFLAGS} clean ; \
fi
.PHONY: bin-install

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.readme.mk,v 1.2 2006/07/15 20:08:33 rillig Exp $
# $NetBSD: bsd.pkg.readme.mk,v 1.3 2006/07/27 21:46:45 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and encapsulates the
# code to produce README.html files in each package directory.
@ -73,7 +73,7 @@ run-depends-list:
${ECHO} "$$pkg"; \
else \
if cd $$dir 2>/dev/null; then \
${MAKE} ${MAKEFLAGS} package-name PACKAGE_NAME_TYPE=${PACKAGE_NAME_TYPE}; \
${RECURSIVE_MAKE} ${MAKEFLAGS} package-name PACKAGE_NAME_TYPE=${PACKAGE_NAME_TYPE}; \
else \
${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \
fi; \
@ -84,10 +84,10 @@ run-depends-list:
.PHONY: build-depends-list
.if !target(build-depends-list)
build-depends-list:
@for dir in `${MAKE} ${MAKEFLAGS} show-all-depends-dirs-excl`; \
@for dir in `${RECURSIVE_MAKE} ${MAKEFLAGS} show-all-depends-dirs-excl`; \
do \
(cd ../../$$dir && \
${MAKE} ${MAKEFLAGS} package-name) \
${RECURSIVE_MAKE} ${MAKEFLAGS} package-name) \
done
.endif
@ -170,11 +170,11 @@ describe:
${ECHO_N} "|${MAINTAINER}|${CATEGORIES}|"; \
case "A${BUILD_DEPENDS}B${DEPENDS}C" in \
ABC) ;; \
*) cd ${.CURDIR} && ${ECHO_N} `${MAKE} ${MAKEFLAGS} build-depends-list | ${SORT} -u`;; \
*) cd ${.CURDIR} && ${ECHO_N} `${RECURSIVE_MAKE} ${MAKEFLAGS} build-depends-list | ${SORT} -u`;; \
esac; \
${ECHO_N} "|"; \
if [ "${DEPENDS}" != "" ]; then \
cd ${.CURDIR} && ${ECHO_N} `${MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`; \
cd ${.CURDIR} && ${ECHO_N} `${RECURSIVE_MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`; \
fi; \
${ECHO_N} "|"; \
if [ "${ONLY_FOR_PLATFORM}" = "" ]; then \
@ -203,7 +203,7 @@ FTP_PKG_URL_HOST?= ftp://ftp.NetBSD.org
FTP_PKG_URL_DIR?= /pub/pkgsrc/packages
readme:
@cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} README.html PKG_URL=${FTP_PKG_URL_HOST}${FTP_PKG_URL_DIR}
@cd ${.CURDIR} && ${RECURSIVE_MAKE} ${MAKEFLAGS} README.html PKG_URL=${FTP_PKG_URL_HOST}${FTP_PKG_URL_DIR}
.endif
# This target is used to generate README.html files, very like "readme"
@ -214,7 +214,7 @@ CDROM_PKG_URL_HOST?= file://localhost
CDROM_PKG_URL_DIR?= /usr/pkgsrc/packages
cdrom-readme:
@cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} README.html PKG_URL=${CDROM_PKG_URL_HOST}${CDROM_PKG_URL_DIR}
@cd ${.CURDIR} && ${RECURSIVE_MAKE} ${MAKEFLAGS} README.html PKG_URL=${CDROM_PKG_URL_HOST}${CDROM_PKG_URL_DIR}
.endif
README_NAME= ${TEMPLATES}/README.pkg
@ -251,7 +251,7 @@ show-vulnerabilities-html:
# the target used to generate the README.html file.
.PHONY: README.html
README.html: .PRECIOUS
@${SETENV} AWK=${AWK} BMAKE=${MAKE} ../../mk/scripts/mkdatabase -f $@.tmp1
@${RECURSIVE_MAKE} ../../mk/scripts/mkdatabase -f $@.tmp1
@if ${TEST} -d ${PACKAGES}; then \
cd ${PACKAGES}; \
case `${PWD_CMD}` in \
@ -289,7 +289,7 @@ README.html: .PRECIOUS
print-build-depends-list:
. if !empty(BUILD_DEPENDS) || !empty(DEPENDS)
@${ECHO_N} 'This package requires package(s) "'
@${ECHO_N} `${MAKE} ${MAKEFLAGS} build-depends-list | ${SORT} -u`
@${ECHO_N} `${RECURSIVE_MAKE} ${MAKEFLAGS} build-depends-list | ${SORT} -u`
@${ECHO} '" to build.'
. endif
.endif
@ -299,7 +299,7 @@ print-build-depends-list:
print-run-depends-list:
. if !empty(DEPENDS)
@${ECHO_N} 'This package requires package(s) "'
@${ECHO_N} `${MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`
@${ECHO_N} `${RECURSIVE_MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`
@${ECHO} '" to run.'
. endif
.endif

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.subdir.mk,v 1.64 2006/05/29 14:26:33 joerg Exp $
# $NetBSD: bsd.pkg.subdir.mk,v 1.65 2006/07/27 21:46:45 jlam Exp $
# Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
#
@ -71,7 +71,7 @@ _SUBDIRUSE: .USE
if [ "$$OK" = "" ]; then \
cd ${.CURDIR}/$${edir}; \
${ECHO_MSG} "===> ${_THISDIR_}$${edir}"; \
${MAKE} ${MAKEFLAGS} "_THISDIR_=${_THISDIR_}$${edir}/" \
${RECURSIVE_MAKE} ${MAKEFLAGS} "_THISDIR_=${_THISDIR_}$${edir}/" \
${.TARGET:realinstall=install} || true; \
fi; \
done
@ -82,7 +82,7 @@ ${SUBDIR}::
else \
cd ${.CURDIR}/${.TARGET}; \
fi; \
${MAKE} ${MAKEFLAGS} all
${RECURSIVE_MAKE} ${MAKEFLAGS} all
.for __target in all fetch package extract configure build clean \
cleandir distclean depend describe reinstall tags checksum \
@ -116,12 +116,12 @@ readmes: readme _SUBDIRUSE
.if !target(readme)
readme:
@${MAKE} ${MAKEFLAGS} README.html _README_TYPE_FLAG=--ftp _README_TYPE=$@
@${RECURSIVE_MAKE} ${MAKEFLAGS} README.html _README_TYPE_FLAG=--ftp _README_TYPE=$@
.endif
.if !target(cdrom-readme)
cdrom-readme:
@${MAKE} ${MAKEFLAGS} README.html _README_TYPE_FLAG=--cdrom README_TYPE=$@
@${RECURSIVE_MAKE} ${MAKEFLAGS} README.html _README_TYPE_FLAG=--cdrom README_TYPE=$@
.endif
.if defined(PKGSRCTOP)
@ -139,9 +139,9 @@ README.html: .PRECIOUS
.for entry in ${SUBDIR}
.if defined(PKGSRCTOP)
@${ECHO} '<TR><TD VALIGN=TOP><a href="'${entry}/README.html'">'"`${ECHO} ${entry} | ${HTMLIFY}`"'</a>: <TD>' >> $@.tmp
@${ECHO} `cd ${entry} && ${MAKE} ${MAKEFLAGS} show-comment | ${HTMLIFY}` >> $@.tmp
@${ECHO} `cd ${entry} && ${RECURSIVE_MAKE} ${MAKEFLAGS} show-comment | ${HTMLIFY}` >> $@.tmp
.else
@${ECHO} '<TR><TD VALIGN=TOP><a href="'${entry}/README.html'">'"`cd ${entry}; ${MAKE} ${MAKEFLAGS} make-readme-html-help`" >> $@.tmp
@${ECHO} '<TR><TD VALIGN=TOP><a href="'${entry}/README.html'">'"`cd ${entry}; ${RECURSIVE_MAKE} ${MAKEFLAGS} make-readme-html-help`" >> $@.tmp
.endif
.endfor
@${SORT} -t '>' +3 -4 $@.tmp > $@.tmp2
@ -168,7 +168,7 @@ README.html: .PRECIOUS
fi
@${RM} -f $@.tmp $@.tmp2 $@.tmp3 $@.tmp4
.for subdir in ${SUBDIR}
@cd ${subdir} && ${MAKE} ${MAKEFLAGS} "_THISDIR_=${_THISDIR_}${.CURDIR:T}/" ${_README_TYPE}
@cd ${subdir} && ${RECURSIVE_MAKE} ${MAKEFLAGS} "_THISDIR_=${_THISDIR_}${.CURDIR:T}/" ${_README_TYPE}
.endfor
.endif
@ -193,7 +193,7 @@ show-distfiles:
${ECHO_MSG} "===> ${_THISDIR_}$${entry} non-existent"; \
fi; \
if [ "$$OK" = "" ]; then \
cd ${.CURDIR}/$${edir} && ${MAKE} ${MAKEFLAGS} show-distfiles; \
cd ${.CURDIR}/$${edir} && ${RECURSIVE_MAKE} ${MAKEFLAGS} show-distfiles; \
fi; \
done
.endif
@ -220,7 +220,7 @@ fetch-list:
@${ECHO} '#'
.if defined(PKGSRCTOP) && !defined(SPECIFIC_PKGS)
# Recursing over dependencies would be pointless, in this case.
@${MAKE} ${MAKEFLAGS} fetch-list-one-pkg \
@${RECURSIVE_MAKE} ${MAKEFLAGS} fetch-list-one-pkg \
| ${AWK} ' \
function do_block () { \
if (FoundSomething) { \
@ -238,7 +238,7 @@ fetch-list:
END { do_block() } \
'
.else
@${MAKE} ${MAKEFLAGS} fetch-list-recursive \
@${RECURSIVE_MAKE} ${MAKEFLAGS} fetch-list-recursive \
| ${SED} '/^=/d'
.endif
.endif # !target(fetch-list)

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.update.mk,v 1.5 2006/06/07 10:04:03 tron Exp $
# $NetBSD: bsd.pkg.update.mk,v 1.6 2006/07/27 21:46:45 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and contains the targets
# and variables for "make update".
@ -42,24 +42,23 @@ update:
@${PHASE_MSG} "Resuming update for ${PKGNAME}"
. if ${REINSTALL} != "NO" && ${UPDATE_TARGET} != "replace"
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL
${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL
. endif
.else
RESUMEUPDATE?= NO
CLEAR_DIRLIST?= YES
update:
${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} ${_DDIR}
${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} ${_DDIR}
. if ${UPDATE_TARGET} != "replace"
${_PKG_SILENT}${_PKG_DEBUG}if ${PKG_INFO} -qe ${PKGBASE}; then \
${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \
${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \
|| (${RM} ${_DDIR} && ${FALSE}); \
fi
. endif
.endif
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES \
DEPENDS_TARGET=${DEPENDS_TARGET:Q}
${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES DEPENDS_TARGET=${DEPENDS_TARGET:Q}
${_PKG_SILENT}${_PKG_DEBUG} \
[ ! -s ${_DDIR} ] || for dep in `${CAT} ${_DDIR}` ; do \
(if cd ../.. && cd "$${dep}" ; then \
@ -67,9 +66,9 @@ update:
if [ "(" "${RESUMEUPDATE}" = "NO" -o \
"${REINSTALL}" != "NO" ")" -a \
"${UPDATE_TARGET}" != "replace" ] ; then \
${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES; \
${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES; \
fi && \
${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \
${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \
DEPENDS_TARGET=${DEPENDS_TARGET:Q} ; \
else \
${PHASE_MSG} "Skipping removed directory $${dep}"; \
@ -77,29 +76,28 @@ update:
done
.if ${NOCLEAN} == "NO"
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} clean-update CLEAR_DIRLIST=YES
${RECURSIVE_MAKE} ${MAKEFLAGS} clean-update CLEAR_DIRLIST=YES
.endif
.PHONY: clean-update
clean-update:
${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} ${_DDIR}
${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} ${_DDIR}
${_PKG_SILENT}${_PKG_DEBUG} \
if [ -s ${_DDIR} ] ; then \
for dep in `${CAT} ${_DDIR}` ; do \
(if cd ../.. && cd "$${dep}" ; then \
${MAKE} ${MAKEFLAGS} clean ; \
${RECURSIVE_MAKE} ${MAKEFLAGS} clean ; \
else \
${PHASE_MSG} "Skipping removed directory $${dep}";\
fi) ; \
done ; \
fi
.if ${CLEAR_DIRLIST} != "NO"
${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} clean
${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} clean
.else
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} clean update-dirlist \
DIRLIST="`${CAT} ${_DDIR}`" PKGLIST="`${CAT} ${_DLIST}`"
${RECURSIVE_MAKE} ${MAKEFLAGS} clean update-dirlist DIRLIST="`${CAT} ${_DDIR}`" PKGLIST="`${CAT} ${_DLIST}`"
@${WARNING_MSG} "preserved leftover directory list. Your next"
@${WARNING_MSG} "\`\`${MAKE} update'' may fail. It is advised to use"
@${WARNING_MSG} "\`\`${MAKE} update REINSTALL=YES'' instead!"

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.prefs.mk,v 1.230 2006/07/17 18:07:06 wiz Exp $
# $NetBSD: bsd.prefs.mk,v 1.231 2006/07/27 21:46:45 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@ -527,4 +527,10 @@ PREPEND_PATH+= ${USE_X11:D${X11BASE}/bin} ${LOCALBASE}/bin
# Make variable definitions cache
.include "${PKGSRCDIR}/mk/bsd.makevars.mk"
# If MAKECONF is defined, then pass it down to all recursive make
# processes invoked by pkgsrc.
#
PKGSRC_MAKE_ENV+= ${MAKECONF:DMAKECONF=${MAKECONF:Q}}
RECURSIVE_MAKE= ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE}
.endif # BSD_PKG_MK

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.bulk-pkg.mk,v 1.121 2006/07/26 17:00:03 wiz Exp $
# $NetBSD: bsd.bulk-pkg.mk,v 1.122 2006/07/27 21:46:46 jlam Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@ -232,7 +232,7 @@ PKG_FAIL_REASON+= "${PKGNAME} is marked as broken by the bulk build administrato
bulk-cache:
@${BULK_MSG} "Installing BULK_PREREQ packages"
.for __prereq in ${BULK_PREREQ} lang/perl5
cd ${PKGSRCDIR}/${__prereq} && ${MAKE} bulk-install
cd ${PKGSRCDIR}/${__prereq} && ${RECURSIVE_MAKE} bulk-install
.endfor
${RM} -f ${BULK_DBFILE}
${TOUCH} ${BULK_DBFILE}
@ -352,7 +352,7 @@ bulk-package:
${ECHO} '###' ; \
fi \
) 2>&1 | ${TEE} -a ${_BUILDLOG:Q}
@uptodate=`${MAKE} ${MAKEFLAGS} bulk-check-uptodate REF=${PKGFILE}` ; \
@uptodate=`${RECURSIVE_MAKE} ${MAKEFLAGS} bulk-check-uptodate REF=${PKGFILE}` ; \
if ${PKG_INFO} -qe ${PKGWILDCARD:Q} ; then \
installed=1; \
else \
@ -365,7 +365,7 @@ bulk-package:
( if [ $$installed = 1 ]; then \
${BULK_MSG} "Removing outdated (installed) package ${PKGNAME} first." ; \
${ECHO_MSG} ${MAKE} deinstall ; \
${DO} ${MAKE} deinstall ; \
${DO} ${RECURSIVE_MAKE} deinstall ; \
if ${PKG_INFO} -qe ${PKGWILDCARD:Q} ; then \
${ECHO_MSG} ${PKG_DELETE} -r ${PKGWILDCARD:Q} ;\
${DO} ${PKG_DELETE} -r ${PKGWILDCARD:Q} ;\
@ -382,7 +382,7 @@ bulk-package:
done ;\
fi; \
${BULK_MSG} "Full rebuild in progress..." ; \
${DO} ${MAKE} clean;\
${DO} ${RECURSIVE_MAKE} clean;\
if [ "${PRECLEAN}" = "yes" ]; then \
${BULK_MSG} "Removing installed packages which are not needed to build ${PKGNAME}" ; \
for pkgname in `${PKG_INFO} -e \\*` ; \
@ -448,7 +448,7 @@ bulk-package:
${DO} ${RM} -f ${_INTERACTIVE_COOKIE} ; \
fi ;\
${ECHO_MSG} ${MAKE} package '(${PKGNAME})' 2>&1 ; \
${DO} ( ${MAKE} package 2>&1 ); \
${DO} ( ${RECURSIVE_MAKE} package 2>&1 ); \
) 2>&1 | ${TEE} -a ${_BUILDLOG:Q} ; \
if [ -f ${PKGFILE} ]; then \
case ${KEEP_BUILDLOGS} in \
@ -480,7 +480,7 @@ bulk-package:
${BULK_MSG} "${PKGNAME} was marked as broken:" ; \
${LS} -la ${_BROKENFILE:Q} ; \
${ECHO_MSG} ${MAKE} deinstall ; \
${DO} ${MAKE} deinstall ; \
${DO} ${RECURSIVE_MAKE} deinstall ; \
${ECHO} "</pre>" >> ${_BROKENFILE:Q}; \
nbrokenby=0;\
if [ "${USE_BULK_CACHE}" = "yes" ]; then \
@ -499,15 +499,15 @@ bulk-package:
${ECHO} "<li>$$pkgname ($$pkgdir)</li>";\
pkgerr='-1'; pkgignore=''; pkgskip=''; \
if [ "${USE_BULK_BROKEN_CHECK}" = 'yes' ]; then \
pkgignore=`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_FAIL_REASON)`; \
pkgskip=`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_SKIP_REASON)`; \
pkgignore=`(cd ${PKGSRCDIR}/$$pkgdir && ${RECURSIVE_MAKE} show-var VARNAME=PKG_FAIL_REASON)`; \
pkgskip=`(cd ${PKGSRCDIR}/$$pkgdir && ${RECURSIVE_MAKE} show-var VARNAME=PKG_SKIP_REASON)`; \
fi; \
if [ ! -z "$${pkgignore}$${pkgskip}" -a ! -f "$${pkg_brokenfile}" ]; then \
{ ${BULK_MSG} "$$pkgname ($$pkgdir) may not be packaged because:"; \
${BULK_MSG} "$$pkgignore"; \
${BULK_MSG} "$$pkgskip"; \
} >> "$${pkg_brokenfile}"; \
if [ "${USE_BULK_BROKEN_CHECK}" != 'yes' ] || [ -z "`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=BROKEN)`" ]; then \
if [ "${USE_BULK_BROKEN_CHECK}" != 'yes' ] || [ -z "`(cd ${PKGSRCDIR}/$$pkgdir && ${RECURSIVE_MAKE} show-var VARNAME=BROKEN)`" ]; then \
pkgerr="0"; \
else \
pkgerr="1"; \
@ -535,7 +535,7 @@ bulk-package:
fi ; \
case ${_PRESERVE_WRKDIR} in \
yes|YES) ;; \
*) ${DO} ${MAKE} clean;; \
*) ${DO} ${RECURSIVE_MAKE} clean;; \
esac; \
fi
@if [ ! -f ${PKGFILE} ]; then \
@ -566,14 +566,14 @@ bulk-package:
# been modified and need rebuilding.
.PHONY: bulk-install
bulk-install:
@if [ `${MAKE} bulk-check-uptodate REF=${PKGFILE}` = 1 ]; then \
@if [ `${RECURSIVE_MAKE} bulk-check-uptodate REF=${PKGFILE}` = 1 ]; then \
if ${PKG_INFO} -qe ${PKGNAME} ; then :; \
else \
${DO} ${MAKE} install-depends ; \
${DO} ${RECURSIVE_MAKE} install-depends ; \
${BULK_MSG} ${PKG_ADD} ${PKG_ARGS_ADD} ${PKGFILE} ; \
${DO} ${PKG_ADD} ${PKG_ARGS_ADD} ${PKGFILE} ; \
fi ; \
else \
${ECHO_MSG} ${MAKE} bulk-package PRECLEAN=no; \
${DO} ${MAKE} bulk-package PRECLEAN=no; \
${DO} ${RECURSIVE_MAKE} bulk-package PRECLEAN=no; \
fi

View file

@ -1,4 +1,4 @@
# $NetBSD: fetch-list.mk,v 1.8 2006/07/27 17:29:57 jlam Exp $
# $NetBSD: fetch-list.mk,v 1.9 2006/07/27 21:46:46 jlam Exp $
######################################################################
### fetch-list (PUBLIC)
@ -39,8 +39,8 @@ fetch-list-header:
fetch-list-recursive:
@${_DEPENDS_WALK_CMD} -r ${PKGPATH} | \
while read dir; do \
( cd ../../$$dir && ${SETENV} ${PKGSRC_MAKE_ENV} \
${MAKE} ${MAKEFLAGS} fetch-list-one-pkg | \
( cd ../../$$dir && \
${RECURSIVE_MAKE} ${MAKEFLAGS} fetch-list-one-pkg | \
${AWK} '/^[^#]/ { FoundSomething = 1 } \
/^unsorted/ { gsub(/[[:space:]]+/, " \\\n\t") } \
/^echo/ { gsub(/;[[:space:]]+/, "\n") } \

View file

@ -1,4 +1,4 @@
# $NetBSD: depends.mk,v 1.11 2006/07/19 16:01:41 jlam Exp $
# $NetBSD: depends.mk,v 1.12 2006/07/27 21:46:46 jlam Exp $
_DEPENDS_FILE= ${WRKDIR}/.depends
_REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \
@ -110,7 +110,7 @@ _DEPENDS_INSTALL_CMD= \
exit 1; \
fi; \
cd $$dir; \
${SETENV} _PKGSRC_DEPS=", ${PKGNAME}${_PKGSRC_DEPS}" PKGNAME_REQD="$$pattern" ${MAKE} ${MAKEFLAGS} _AUTOMATIC=yes $$target; \
${SETENV} ${PKGSRC_MAKE_ENV} _PKGSRC_DEPS=", ${PKGNAME}${_PKGSRC_DEPS}" PKGNAME_REQD="$$pattern" ${MAKE} ${MAKEFLAGS} _AUTOMATIC=yes $$target; \
pkg=`${_PKG_BEST_EXISTS} "$$pattern" || ${TRUE}`; \
case "$$pkg" in \
"") ${ERROR_MSG} "[depends.mk] A package matching \`\`$$pattern'' should"; \

View file

@ -1,4 +1,4 @@
# $NetBSD: utility.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $
# $NetBSD: utility.mk,v 1.2 2006/07/27 21:46:46 jlam Exp $
######################################################################
###
@ -50,9 +50,9 @@ show-installed-depends:
show-needs-update:
.if !empty(DEPENDS)
${_PKG_SILENT}${_PKG_DEBUG} \
for i in `${MAKE} show-all-depends-dirs`; do \
for i in `${RECURSIVE_MAKE} show-all-depends-dirs`; do \
cd ${PKGSRCDIR}/$$i; \
eval `${MAKE} show-vars-eval VARS='PKGNAME:want PKGWILDCARD:wild'`; \
eval `${RECURSIVE_MAKE} show-vars-eval VARS='PKGNAME:want PKGWILDCARD:wild'`; \
have=`${_PKG_BEST_EXISTS} "$$wild" || ${TRUE}`; \
if [ -z "$$have" ]; then \
${ECHO} "$$i => (none) => needs install of $$want"; \

View file

@ -1,4 +1,4 @@
# $NetBSD: install.mk,v 1.14 2006/07/22 16:31:35 jlam Exp $
# $NetBSD: install.mk,v 1.15 2006/07/27 21:46:46 jlam Exp $
######################################################################
### install (PUBLIC)
@ -103,7 +103,7 @@ install-check-version: ${_COOKIE.extract}
*) ${WARNING_MSG} "Package version $$extractname in ${WRKDIR}"; \
${WARNING_MSG} "Current version $$pkgname in ${PKGPATH}"; \
${WARNING_MSG} "Cleaning and rebuilding $$pkgname..."; \
${MAKE} clean && ${MAKE} build ;; \
${RECURSIVE_MAKE} clean build ;; \
esac
######################################################################