Index: bsd.port.mk =================================================================== --- bsd.port.mk (revision 337478) +++ bsd.port.mk (working copy) @@ -1563,8 +1563,7 @@ .if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) .if defined(_POSTMKINCLUDED) -check-makefile:: - @${ECHO_MSG} "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" +DEV_ERORR= "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" @${FALSE} .endif @@ -2760,11 +2759,6 @@ @${ECHO_CMD} "${MAINTAINER}" .endif -.if !target(check-makefile) -check-makefile:: - @${DO_NADA} -.endif - .if !defined(CATEGORIES) check-categories: @${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." @@ -3286,11 +3280,9 @@ pre-everything:: @${DO_NADA} +.if defined(TRYBROKEN) && defined(BROKEN) buildanyway-message: -.if defined(TRYBROKEN) && defined(BROKEN) @${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN." -.else - @${DO_NADA} .endif options-message: @@ -3635,16 +3627,6 @@ .endif .endif -.if !target(configure-autotools) -configure-autotools: - @${DO_NADA} -.endif - -.if !target(run-autotools) -run-autotools: - @${DO_NADA} -.endif - # Configure .if !target(do-configure) @@ -3937,8 +3919,8 @@ # Utility targets follow .if !target(check-already-installed) +.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) check-already-installed: ${TMPPLIST_SORT} -.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) @${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed"; \ ${MKDIR} ${PKG_DBDIR}; \ already_installed=`${PKG_INFO} -q -O ${PKGORIGIN}`; \ @@ -3967,8 +3949,6 @@ ${ECHO_MSG} " in your environment or the \"make install\" command line."; \ exit 1; \ fi -.else - @${DO_NADA} .endif .endif @@ -4091,8 +4071,8 @@ _UG_OUTPUT= /dev/null .endif .endif +.if defined(GROUPS) || defined(USERS) create-users-groups: -.if defined(GROUPS) || defined(USERS) .if defined(GROUPS) .for _file in ${GID_FILES} .if !exists(${_file}) @@ -4214,8 +4194,6 @@ .endfor .endif .endif -.else - @${DO_NADA} .endif .endif @@ -4283,179 +4261,6 @@ # call the necessary targets/scripts. ################################################################ -# Please note that the order of the following targets is important, and -# should not be modified. - -.if defined(CHROOTED) -_CHROOT_SEQ= post-chroot -.else -_CHROOT_SEQ= -.endif -_SANITY_SEQ= ${_CHROOT_SEQ} pre-everything check-makefile \ - check-categories check-makevars check-desktop-entries \ - check-depends identify-install-conflicts check-deprecated \ - check-vulnerable check-license check-config buildanyway-message \ - options-message - -_PKG_DEP= check-sanity -_PKG_SEQ= pkg-depends -_FETCH_DEP= pkg -_FETCH_SEQ= fetch-depends pre-fetch pre-fetch-script \ - do-fetch fetch-specials post-fetch post-fetch-script -_EXTRACT_DEP= fetch -_EXTRACT_SEQ= check-build-conflicts extract-message checksum extract-depends \ - pre-extract pre-extract-script do-extract \ - post-extract post-extract-script -_PATCH_DEP= extract -_PATCH_SEQ= ask-license patch-message patch-depends pre-patch \ - pre-patch-script do-patch post-patch post-patch-script -_CONFIGURE_DEP= patch -_CONFIGURE_SEQ= build-depends lib-depends configure-message run-autotools-fixup \ - configure-autotools pre-configure pre-configure-script \ - run-autotools do-configure post-configure post-configure-script -_BUILD_DEP= configure -_BUILD_SEQ= build-message pre-build pre-build-script do-build \ - post-build post-build-script -.if !defined(NO_STAGE) - -_STAGE_DEP= build -_STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install generate-plist \ - pre-su-install -.if defined(NEED_ROOT) -_STAGE_SUSEQ= create-users-groups do-install post-install post-install-script post-stage compress-man \ - install-rc-script install-ldconfig-file install-license \ - install-desktop-entries add-plist-info add-plist-docs add-plist-examples \ - add-plist-data add-plist-post fix-plist-sequence -.if defined(DEVELOPER) -_STAGE_SUSEQ+= stage-qa -.endif -.else -_STAGE_SEQ+= create-users-groups do-install post-install post-install-script post-stage compress-man \ - install-rc-script install-ldconfig-file install-license \ - install-desktop-entries add-plist-info add-plist-docs add-plist-examples \ - add-plist-data add-plist-post fix-plist-sequence -.if defined(DEVELOPER) -_STAGE_SEQ+= stage-qa -.endif -.endif -.if defined(WITH_PKGNG) -_INSTALL_DEP= stage -_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed -_INSTALL_SUSEQ= fake-pkg security-check - -_PACKAGE_DEP= stage -_PACKAGE_SEQ= package-message pre-package pre-package-script do-package post-package-script - -.else # pkg_install - -_PACKAGE_DEP= stage -_PACKAGE_SEQ= package-message pre-package pre-package-script do-package post-package-script - -_INSTALL_DEP= package -_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed -_INSTALL_SUSEQ= install-package security-check -.endif - -.else # NO_STAGE - -_INSTALL_DEP= build -_INSTALL_SEQ= install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \ - pre-install-script generate-plist check-already-installed -_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ - pre-su-install-script create-users-groups do-install \ - install-desktop-entries install-license install-rc-script \ - post-install post-install-script add-plist-buildinfo \ - add-plist-info add-plist-docs add-plist-examples \ - add-plist-data add-plist-post fix-plist-sequence \ - compress-man install-ldconfig-file fake-pkg security-check -_PACKAGE_DEP= install -_PACKAGE_SEQ= package-message pre-package pre-package-script \ - do-package post-package-script -.endif - -.if !target(post-chroot) -post-chroot: - @${DO_NADA} -.endif - -.if !target(check-sanity) -check-sanity: ${_SANITY_SEQ} -.endif - -# XXX MCL might need to move in loop below? -.if !target(fetch) -fetch: ${_FETCH_DEP} ${_FETCH_SEQ} -.endif - -.if !target(pkg) -pkg: ${_PKG_DEP} ${_PKG_SEQ} -.endif - -# Main logic. The loop generates 7 main targets and using cookies -# ensures that those already completed are skipped. - -.for target in extract patch configure build stage install package - -.if !target(${target}) && defined(_OPTIONS_OK) -${target}: ${${target:U}_COOKIE} -.elif !target(${target}) -${target}: config-conditional - @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${UNIQUENAME:U}=1 ${${target:U}_COOKIE} -.elif target(${target}) && defined(IGNORE) -.endif - -.if !exists(${${target:U}_COOKIE}) - -.if ${UID} != 0 && defined(_${target:U}_SUSEQ) && !defined(INSTALL_AS_USER) -.if defined(USE_SUBMAKE) -${${target:U}_COOKIE}: ${_${target:U}_DEP} - @cd ${.CURDIR} && ${MAKE} ${_${target:U}_SEQ} -.else -${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ} -.endif - @${ECHO_MSG} "===> Switching to root credentials for '${target}' target" - @cd ${.CURDIR} && \ - ${SU_CMD} "${MAKE} ${_${target:U}_SUSEQ}" - @${ECHO_MSG} "===> Returning to user credentials" - @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -.elif defined(USE_SUBMAKE) -${${target:U}_COOKIE}: ${_${target:U}_DEP} - @cd ${.CURDIR} && \ - ${MAKE} ${_${target:U}_SEQ} ${_${target:U}_SUSEQ} - @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -.else -${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ} ${_${target:U}_SUSEQ} - @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -.endif - -.else -${${target:U}_COOKIE}:: - @if [ -e ${.TARGET} ]; then \ - ${DO_NADA}; \ - else \ - cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ - fi -.endif - -.endfor - -# Enforce order for -jN builds - -.ORDER: ${_SANITY_SEQ} -.ORDER: ${_PKG_DEP} ${_PKG_SEQ} -.ORDER: ${_FETCH_DEP} ${_FETCH_SEQ} -.ORDER: ${_EXTRACT_DEP} ${_EXTRACT_SEQ} -.ORDER: ${_PATCH_DEP} ${_PATCH_SEQ} -.ORDER: ${_CONFIGURE_DEP} ${_CONFIGURE_SEQ} -.ORDER: ${_BUILD_DEP} ${_BUILD_SEQ} -.if !defined(NO_STAGE) -.ORDER: ${_STAGE_DEP} ${_STAGE_SEQ} -.endif -.ORDER: ${_INSTALL_DEP} ${_INSTALL_SEQ} -.ORDER: ${_PACKAGE_DEP} ${_PACKAGE_SEQ} - -extract-message: - @${ECHO_MSG} "===> Extracting for ${PKGNAME}" patch-message: @${ECHO_MSG} "===> Patching for ${PKGNAME}" configure-message: @@ -4474,34 +4279,17 @@ .for stage in pre post .for name in pkg check-sanity fetch extract patch configure build stage install package -.if !target(${stage}-${name}) -${stage}-${name}: - @${DO_NADA} -.endif - +.if exists(${SCRIPTDIR}/${stage}-${name}) .if !target(${stage}-${name}-script) ${stage}-${name}-script: - @if [ -f ${SCRIPTDIR}/${.TARGET:S/-script$//} ]; then \ - cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ - ${SCRIPTDIR}/${.TARGET:S/-script$//}; \ - fi + @ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ + ${SCRIPTDIR}/${.TARGET:S/-script$//} .endif +.endif .endfor .endfor -# Special cases for su -.if !target(pre-su-install) -pre-su-install: - @${DO_NADA} -.endif - -.if !target(pre-su-install-script) -pre-su-install-script: - @${DO_NADA} -.endif - - .if !target(pretty-print-www-site) pretty-print-www-site: @www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ @@ -5843,8 +5631,8 @@ @${SORT} -u ${TMPPLIST} >${TMPPLIST_SORT} .if !target(add-plist-docs) +.if defined(PORTDOCS) && !defined(NOPORTDOCS) add-plist-docs: -.if defined(PORTDOCS) && !defined(NOPORTDOCS) @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \ [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \ ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ @@ -5860,14 +5648,12 @@ @${FIND} -P -d ${PORTDOCS:S/^/${STAGEDIR}${DOCSDIR}\//} -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,@dirrm ,p' >> ${TMPPLIST} @${ECHO_CMD} "@dirrm ${DOCSDIR_REL}" >> ${TMPPLIST} -.else - @${DO_NADA} .endif .endif .if !target(add-plist-examples) +.if defined(PORTEXAMPLES) && !defined(NOPORTEXAMPLES) add-plist-examples: -.if defined(PORTEXAMPLES) && !defined(NOPORTEXAMPLES) @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \ [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \ ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ @@ -5884,14 +5670,12 @@ @${FIND} -P -d ${PORTEXAMPLES:S/^/${STAGEDIR}${EXAMPLESDIR}\//} -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,@dirrm ,p' >> ${TMPPLIST} @${ECHO_CMD} "@dirrm ${EXAMPLESDIR_REL}" >> ${TMPPLIST} -.else - @${DO_NADA} .endif .endif .if !target(add-plist-data) +.if defined(PORTDATA) && !defined(NOPORTDATA) add-plist-data: -.if defined(PORTDATA) && !defined(NOPORTDATA) @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \ [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \ ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ @@ -5908,8 +5692,6 @@ @${FIND} -P -d ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,@dirrm ,p' >> ${TMPPLIST} @${ECHO_CMD} "@dirrm ${DATADIR_REL}" >> ${TMPPLIST} -.else - @${DO_NADA} .endif .endif @@ -5921,9 +5703,9 @@ .endif .if !target(add-plist-info) +.if defined(INFO) add-plist-info: # Process GNU INFO files at package install/deinstall time -.if defined(INFO) .for i in ${INFO} .if defined(NO_STAGE) install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir @@ -5959,17 +5741,15 @@ # If we're installing into a non-standard PREFIX, we need to remove that directory at # deinstall-time .if !target(add-plist-post) +.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && ${PREFIX} != "/usr") add-plist-post: -.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && ${PREFIX} != "/usr") @${ECHO_CMD} "@unexec rmdir %D 2> /dev/null || true" >> ${TMPPLIST} -.else - @${DO_NADA} .endif .endif .if !target(install-rc-script) +.if defined(USE_RCORDER) || defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES" install-rc-script: -.if defined(USE_RCORDER) || defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES" .if defined(USE_RCORDER) @${ECHO_MSG} "===> Staging early rc.d startup script(s)" @${ECHO_CMD} "@cwd /" >> ${TMPPLIST} @@ -5987,15 +5767,13 @@ ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ done .endif -.else - @${DO_NADA} .endif .endif # Compress (or uncompress) and symlink manpages. .if !target(compress-man) +.if defined(_MANPAGES) || defined(_MLINKS) compress-man: -.if defined(_MANPAGES) || defined(_MLINKS) .if ${MANCOMPRESSED} == yes && defined(NO_MANCOMPRESS) @${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}" @_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE} @@ -6016,8 +5794,6 @@ shift; shift; \ done .endif -.else - @${DO_NADA} .endif .endif @@ -6026,8 +5802,8 @@ # accordance to the @pkgdep directive in the packing lists .if !target(fake-pkg) +.if !defined(NO_PKG_REGISTER) fake-pkg: -.if !defined(NO_PKG_REGISTER) @if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi @${RM} -f /tmp/${PKGNAME}-required-by .if defined(FORCE_PKG_REGISTER) @@ -6073,8 +5849,6 @@ ${CAT} /tmp/${PKGNAME}-required-by >> ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY; \ ${RM} -f /tmp/${PKGNAME}-required-by; \ fi -.else - @${DO_NADA} .endif .endif @@ -6544,8 +6318,8 @@ ${DESKTOP_CATEGORIES_ADDITIONAL} \ ${DESKTOP_CATEGORIES_RESERVED} +.if defined(DESKTOP_ENTRIES) check-desktop-entries: -.if defined(DESKTOP_ENTRIES) @set -- ${DESKTOP_ENTRIES} XXX; \ if [ `${EXPR} \( $$# - 1 \) % 6` -ne 0 ]; then \ ${ECHO_MSG} "${PKGNAME}: Makefile error: the DESKTOP_ENTRIES list must contain one or more groups of 6 elements"; \ @@ -6598,13 +6372,11 @@ shift 6; \ num=`${EXPR} $$num + 1`; \ done -.else - @${DO_NADA} .endif .if !target(install-desktop-entries) +.if defined(DESKTOP_ENTRIES) install-desktop-entries: -.if defined(DESKTOP_ENTRIES) @set -- ${DESKTOP_ENTRIES} XXX; \ if [ -z "${_DESKTOPDIR_REL}" ]; then \ ${ECHO_CMD} "@cwd ${DESKTOPDIR}" >> ${TMPPLIST}; \ @@ -6640,26 +6412,9 @@ if [ -z "${_DESKTOPDIR_REL}" ]; then \ ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ fi -.else - @${DO_NADA} .endif .endif -.if !target(check-license) -check-license: - @${DO_NADA} -.endif - -.if !target(ask-license) -ask-license: - @${DO_NADA} -.endif - -.if !target(install-license) -install-license: - @${DO_NADA} -.endif - .if defined(WARNING) WARNING_WAIT?= 10 show-warnings: @@ -6669,8 +6424,6 @@ .endfor @${ECHO_MSG} @sleep ${WARNING_WAIT} - -check-makefile:: show-warnings .endif .if defined(DEVELOPER) @@ -6684,7 +6437,6 @@ .endfor @${ECHO_MSG} @sleep ${DEV_WARNING_WAIT} -check-makefile:: show-dev-warnings .endif .if defined(DEV_ERROR) @@ -6696,10 +6448,176 @@ .endfor @${ECHO_MSG} @${FALSE} -check-makefile:: show-dev-errors .endif .endif #DEVELOPER + +# Please note that the order of the following targets is important, and +# should not be modified. + +_TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE +.if !defined(NO_STAGE) +_TARGETS_STAGES+= STAGE .endif + +_SANITY_SEQ= post-chroot pre-everything check-makefile \ + show-warnings show-dev-warnings show-dev-errors \ + check-categories check-makevars check-desktop-entries \ + check-depends identify-install-conflicts check-deprecated \ + check-vulnerable check-license check-config buildanyway-message \ + options-message + +_PKG_DEP= check-sanity +_PKG_SEQ= pkg-depends +_FETCH_DEP= pkg +_FETCH_SEQ= fetch-depends pre-fetch pre-fetch-script \ + do-fetch fetch-specials post-fetch post-fetch-script +_EXTRACT_DEP= fetch +_EXTRACT_SEQ= check-build-conflicts extract-message checksum extract-depends \ + pre-extract pre-extract-script do-extract \ + post-extract post-extract-script +_PATCH_DEP= extract +_PATCH_SEQ= ask-license patch-message patch-depends pre-patch \ + pre-patch-script do-patch post-patch post-patch-script +_CONFIGURE_DEP= patch +_CONFIGURE_SEQ= build-depends lib-depends configure-message run-autotools-fixup \ + configure-autotools pre-configure pre-configure-script \ + run-autotools do-configure post-configure post-configure-script +_BUILD_DEP= configure +_BUILD_SEQ= build-message pre-build pre-build-script do-build \ + post-build post-build-script +.if !defined(NO_STAGE) + +_STAGE_DEP= build +_STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install generate-plist \ + pre-su-install +.if defined(NEED_ROOT) +_STAGE_SUSEQ= create-users-groups do-install post-install post-install-script post-stage compress-man \ + install-rc-script install-ldconfig-file install-license \ + install-desktop-entries add-plist-info add-plist-docs add-plist-examples \ + add-plist-data add-plist-post fix-plist-sequence +.if defined(DEVELOPER) +_STAGE_SUSEQ+= stage-qa +.endif +.else +_STAGE_SEQ+= create-users-groups do-install post-install post-install-script post-stage compress-man \ + install-rc-script install-ldconfig-file install-license \ + install-desktop-entries add-plist-info add-plist-docs add-plist-examples \ + add-plist-data add-plist-post fix-plist-sequence +.if defined(DEVELOPER) +_STAGE_SEQ+= stage-qa +.endif +.endif +.if defined(WITH_PKGNG) +_INSTALL_DEP= stage +_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed +_INSTALL_SUSEQ= fake-pkg security-check + +_PACKAGE_DEP= stage +_PACKAGE_SEQ= package-message pre-package pre-package-script do-package post-package-script + +.else # pkg_install + +_PACKAGE_DEP= stage +_PACKAGE_SEQ= package-message pre-package pre-package-script do-package post-package-script + +_INSTALL_DEP= package +_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed +_INSTALL_SUSEQ= install-package security-check +.endif + +.else # NO_STAGE + +_INSTALL_DEP= build +_INSTALL_SEQ= install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \ + pre-install-script generate-plist check-already-installed +_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ + pre-su-install-script create-users-groups do-install \ + install-desktop-entries install-license install-rc-script \ + post-install post-install-script add-plist-buildinfo \ + add-plist-info add-plist-docs add-plist-examples \ + add-plist-data add-plist-post fix-plist-sequence \ + compress-man install-ldconfig-file fake-pkg security-check +_PACKAGE_DEP= install +_PACKAGE_SEQ= package-message pre-package pre-package-script \ + do-package post-package-script +.endif + +# Enforce order for -jN builds + +.for _t in ${_TARGETS_STAGES} +. for s in ${_${_t}_SEQ} +. if target(${s}) +_${_t}_REAL_SEQ+= ${s} +. endif +. endfor +. for s in ${_${_t}_SUSEQ} +. if target(${s}) +_${_t}_REAL_SUSEQ+= ${s} +. endif +. endfor +.ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} +.endfor + +.for target in extract patch configure build stage install package + +.if !target(${target}) && defined(_OPTIONS_OK) +${target}: ${${target:U}_COOKIE} +.elif !target(${target}) +${target}: config-conditional + @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${UNIQUENAME:U}=1 ${${target:U}_COOKIE} +.elif target(${target}) && defined(IGNORE) +.endif + +.if !exists(${${target:U}_COOKIE}) + +.if ${UID} != 0 && defined(_${target:U}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) +.if defined(USE_SUBMAKE) +${${target:U}_COOKIE}: ${_${target:U}_DEP} + @cd ${.CURDIR} && ${MAKE} ${_${target:U}_REAL_SEQ} +.else +${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_REAL_SEQ} +.endif + @${ECHO_MSG} "===> Switching to root credentials for '${target}' target" + @cd ${.CURDIR} && \ + ${SU_CMD} "${MAKE} ${_${target:U}_REAL_SUSEQ}" + @${ECHO_MSG} "===> Returning to user credentials" + @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} +.elif defined(USE_SUBMAKE) +${${target:U}_COOKIE}: ${_${target:U}_DEP} + @cd ${.CURDIR} && \ + ${MAKE} ${_${target:U}_REAL_SEQ} ${_${target:U}_REAL_SUSEQ} + @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} +.else +${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_REAL_SEQ} ${_${target:U}_REAL_SUSEQ} + @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} +.endif + +.else +${${target:U}_COOKIE}:: + @if [ -e ${.TARGET} ]; then \ + ${DO_NADA}; \ + else \ + cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ + fi +.endif + +.endfor + +extract-message: + @${ECHO_MSG} "===> Extracting for ${PKGNAME}" +.if !target(check-sanity) +check-sanity: ${_SANITY_REAL_SEQ} +.endif + +.if !target(fetch) +fetch: ${_FETCH_DEP} ${_FETCH_REAL_SEQ} +.endif + +.if !target(pkg) +pkg: ${_PKG_DEP} ${_PKG_REAL_SEQ} +.endif + +.endif # End of post-makefile section. .endif