head 1.22; access; symbols pkgsrc-2023Q4:1.22.0.10 pkgsrc-2023Q4-base:1.22 pkgsrc-2023Q3:1.22.0.8 pkgsrc-2023Q3-base:1.22 pkgsrc-2023Q2:1.22.0.6 pkgsrc-2023Q2-base:1.22 pkgsrc-2023Q1:1.22.0.4 pkgsrc-2023Q1-base:1.22 pkgsrc-2022Q4:1.22.0.2 pkgsrc-2022Q4-base:1.22 pkgsrc-2022Q3:1.21.0.22 pkgsrc-2022Q3-base:1.21 pkgsrc-2022Q2:1.21.0.20 pkgsrc-2022Q2-base:1.21 pkgsrc-2022Q1:1.21.0.18 pkgsrc-2022Q1-base:1.21 pkgsrc-2021Q4:1.21.0.16 pkgsrc-2021Q4-base:1.21 pkgsrc-2021Q3:1.21.0.14 pkgsrc-2021Q3-base:1.21 pkgsrc-2021Q2:1.21.0.12 pkgsrc-2021Q2-base:1.21 pkgsrc-2021Q1:1.21.0.10 pkgsrc-2021Q1-base:1.21 pkgsrc-2020Q4:1.21.0.8 pkgsrc-2020Q4-base:1.21 pkgsrc-2020Q3:1.21.0.6 pkgsrc-2020Q3-base:1.21 pkgsrc-2020Q2:1.21.0.4 pkgsrc-2020Q2-base:1.21 pkgsrc-2020Q1:1.21.0.2 pkgsrc-2020Q1-base:1.21 pkgsrc-2019Q4:1.19.0.58 pkgsrc-2019Q4-base:1.19 pkgsrc-2019Q3:1.19.0.54 pkgsrc-2019Q3-base:1.19 pkgsrc-2019Q2:1.19.0.52 pkgsrc-2019Q2-base:1.19 pkgsrc-2019Q1:1.19.0.50 pkgsrc-2019Q1-base:1.19 pkgsrc-2018Q4:1.19.0.48 pkgsrc-2018Q4-base:1.19 pkgsrc-2018Q3:1.19.0.46 pkgsrc-2018Q3-base:1.19 pkgsrc-2018Q2:1.19.0.44 pkgsrc-2018Q2-base:1.19 pkgsrc-2018Q1:1.19.0.42 pkgsrc-2018Q1-base:1.19 pkgsrc-2017Q4:1.19.0.40 pkgsrc-2017Q4-base:1.19 pkgsrc-2017Q3:1.19.0.38 pkgsrc-2017Q3-base:1.19 pkgsrc-2017Q2:1.19.0.34 pkgsrc-2017Q2-base:1.19 pkgsrc-2017Q1:1.19.0.32 pkgsrc-2017Q1-base:1.19 pkgsrc-2016Q4:1.19.0.30 pkgsrc-2016Q4-base:1.19 pkgsrc-2016Q3:1.19.0.28 pkgsrc-2016Q3-base:1.19 pkgsrc-2016Q2:1.19.0.26 pkgsrc-2016Q2-base:1.19 pkgsrc-2016Q1:1.19.0.24 pkgsrc-2016Q1-base:1.19 pkgsrc-2015Q4:1.19.0.22 pkgsrc-2015Q4-base:1.19 pkgsrc-2015Q3:1.19.0.20 pkgsrc-2015Q3-base:1.19 pkgsrc-2015Q2:1.19.0.18 pkgsrc-2015Q2-base:1.19 pkgsrc-2015Q1:1.19.0.16 pkgsrc-2015Q1-base:1.19 pkgsrc-2014Q4:1.19.0.14 pkgsrc-2014Q4-base:1.19 pkgsrc-2014Q3:1.19.0.12 pkgsrc-2014Q3-base:1.19 pkgsrc-2014Q2:1.19.0.10 pkgsrc-2014Q2-base:1.19 pkgsrc-2014Q1:1.19.0.8 pkgsrc-2014Q1-base:1.19 pkgsrc-2013Q4:1.19.0.6 pkgsrc-2013Q4-base:1.19 pkgsrc-2013Q3:1.19.0.4 pkgsrc-2013Q3-base:1.19 pkgsrc-2013Q2:1.19.0.2 pkgsrc-2013Q2-base:1.19 pkgsrc-2013Q1:1.18.0.26 pkgsrc-2013Q1-base:1.18 pkgsrc-2012Q4:1.18.0.24 pkgsrc-2012Q4-base:1.18 pkgsrc-2012Q3:1.18.0.22 pkgsrc-2012Q3-base:1.18 pkgsrc-2012Q2:1.18.0.20 pkgsrc-2012Q2-base:1.18 pkgsrc-2012Q1:1.18.0.18 pkgsrc-2012Q1-base:1.18 pkgsrc-2011Q4:1.18.0.16 pkgsrc-2011Q4-base:1.18 pkgsrc-2011Q3:1.18.0.14 pkgsrc-2011Q3-base:1.18 pkgsrc-2011Q2:1.18.0.12 pkgsrc-2011Q2-base:1.18 pkgsrc-2011Q1:1.18.0.10 pkgsrc-2011Q1-base:1.18 pkgsrc-2010Q4:1.18.0.8 pkgsrc-2010Q4-base:1.18 pkgsrc-2010Q3:1.18.0.6 pkgsrc-2010Q3-base:1.18 pkgsrc-2010Q2:1.18.0.4 pkgsrc-2010Q2-base:1.18 pkgsrc-2010Q1:1.18.0.2 pkgsrc-2010Q1-base:1.18 pkgsrc-2009Q4:1.17.0.6 pkgsrc-2009Q4-base:1.17 pkgsrc-2009Q3:1.17.0.4 pkgsrc-2009Q3-base:1.17 pkgsrc-2009Q2:1.17.0.2 pkgsrc-2009Q2-base:1.17 pkgsrc-2009Q1:1.16.0.14 pkgsrc-2009Q1-base:1.16 pkgsrc-2008Q4:1.16.0.12 pkgsrc-2008Q4-base:1.16 pkgsrc-2008Q3:1.16.0.10 pkgsrc-2008Q3-base:1.16 cube-native-xorg:1.16.0.8 cube-native-xorg-base:1.16 pkgsrc-2008Q2:1.16.0.6 pkgsrc-2008Q2-base:1.16 cwrapper:1.16.0.4 pkgsrc-2008Q1:1.16.0.2 pkgsrc-2008Q1-base:1.16 pkgsrc-2007Q4:1.15.0.2 pkgsrc-2007Q4-base:1.15 pkgsrc-2007Q3:1.14.0.2 pkgsrc-2007Q3-base:1.14 pkgsrc-2007Q2:1.13.0.8 pkgsrc-2007Q2-base:1.13 pkgsrc-2007Q1:1.13.0.6 pkgsrc-2007Q1-base:1.13 jlam-pkgviews:1.13.0.4 jlam-pkgviews-base:1.13 pkgsrc-2006Q4:1.13.0.2 pkgsrc-2006Q4-base:1.13 pkgsrc-2006Q3:1.11.0.2 pkgsrc-2006Q3-base:1.11; locks; strict; comment @# @; 1.22 date 2022.11.23.13.30.38; author jperkin; state Exp; branches; next 1.21; commitid IPeynSrDlM7yuP2E; 1.21 date 2020.03.23.00.33.48; author riastradh; state Exp; branches; next 1.20; commitid S153HBScrkIPxs1C; 1.20 date 2020.02.09.20.33.38; author rillig; state Exp; branches; next 1.19; commitid st5yB1U33POjy2WB; 1.19 date 2013.05.23.13.18.56; author obache; state Exp; branches; next 1.18; commitid luDRDAjnnkXRVKQw; 1.18 date 2010.02.24.22.53.34; author joerg; state Exp; branches; next 1.17; 1.17 date 2009.05.16.01.27.30; author joerg; state Exp; branches; next 1.16; 1.16 date 2008.02.07.21.36.13; author rillig; state Exp; branches; next 1.15; 1.15 date 2007.11.30.18.54.40; author rillig; state Exp; branches; next 1.14; 1.14 date 2007.08.31.16.30.11; author jlam; state Exp; branches; next 1.13; 1.13 date 2006.11.03.08.01.04; author joerg; state Exp; branches; next 1.12; 1.12 date 2006.10.06.19.04.37; author rillig; state Exp; branches; next 1.11; 1.11 date 2006.07.27.21.46.45; author jlam; state Exp; branches; next 1.10; 1.10 date 2006.07.25.18.04.25; author jlam; state Exp; branches; next 1.9; 1.9 date 2006.07.22.16.31.35; author jlam; state Exp; branches; next 1.8; 1.8 date 2006.07.21.14.27.56; author jlam; state Exp; branches; next 1.7; 1.7 date 2006.07.21.14.21.28; author jlam; state Exp; branches; next 1.6; 1.6 date 2006.07.07.21.24.27; author jlam; state Exp; branches; next 1.5; 1.5 date 2006.07.06.22.17.57; author jlam; state Exp; branches; next 1.4; 1.4 date 2006.07.06.22.08.32; author jlam; state Exp; branches; next 1.3; 1.3 date 2006.07.06.15.43.10; author jlam; state Exp; branches; next 1.2; 1.2 date 2006.07.06.15.33.19; author jlam; state Exp; branches; next 1.1; 1.1 date 2006.07.05.22.21.02; author jlam; state Exp; branches; next ; desc @@ 1.22 log @mk: Miscellaneous performance improvements. Inline ${RUN} calls where appropriate. Call mkdir directly rather than via a shell when invoked as a single command. Avoid unnecessary mkdir calls. @ text @# $NetBSD: bsd.pkg.barrier.mk,v 1.21 2020/03/23 00:33:48 riastradh Exp $ _COOKIE.barrier= ${WRKDIR}/.barrier_cookie # _BARRIER_PRE_TARGETS is a list of the targets that must be built before # the "barrier" target invokes a new make. # _BARRIER_PRE_TARGETS= checksum-phase makedirs depends # _BARRIER_POST_TARGETS is a list of the targets that must be built after # the "barrier" target invokes a new make. This list is specially # ordered so that if more than one is specified on the command-line, # then pkgsrc will still do the right thing. # # FIXME: why is wrapper before extract? _BARRIER_POST_TARGETS= tools _BARRIER_POST_TARGETS+= wrapper _BARRIER_POST_TARGETS+= extract _BARRIER_POST_TARGETS+= patch _BARRIER_POST_TARGETS+= configure configure-env _BARRIER_POST_TARGETS+= build build-env _BARRIER_POST_TARGETS+= test test-env _BARRIER_POST_TARGETS+= all _BARRIER_POST_TARGETS+= stage-install _BARRIER_POST_TARGETS+= stage-package-create _BARRIER_POST_TARGETS+= reinstall _BARRIER_POST_TARGETS+= replace _BARRIER_POST_TARGETS+= package _BARRIER_POST_TARGETS+= repackage _BARRIER_POST_TARGETS+= package-install _BARRIER_POST_TARGETS+= install .for _target_ in ${_BARRIER_POST_TARGETS} . if make(${_target_}) _BARRIER_CMDLINE_TARGETS+= ${_target_} . endif .endfor ###################################################################### ### barrier (PRIVATE) ###################################################################### ### barrier is a helper target that can be used to separate targets ### that should be built in a new make process from being built in ### the current one. The targets that must be built after the "barrier" ### target invokes a new make should be listed in _BARRIER_POST_TARGETS, ### and should be of the form: ### ### .if !defined(_PKGSRC_BARRIER) ### foo: barrier ### .else ### foo: foo's real source dependencies ### .endif ### ### Note that none of foo's real source dependencies should include ### targets that occur before the barrier. ### .PHONY: barrier-error-check barrier-error-check: error-check .PHONY: barrier barrier: ${_BARRIER_PRE_TARGETS} ${_COOKIE.barrier} .if !defined(_PKGSRC_BARRIER) . if defined(PKG_VERBOSE) @@${PHASE_MSG} "Invoking \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after barrier for ${PKGNAME}" . endif ${RUN} \ if ${TEST} -n "${_PKGSRC_UPDATE_CHECK}" && \ ${PKG_INFO} -qe ${PKGNAME}; then \ ${PHASE_MSG} "Skipping installation of already handled package"; \ else \ cd ${.CURDIR} \ && ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} \ || { \ exitcode="$$?"; \ ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes barrier-error-check; \ exit "$$exitcode"; \ }; \ fi . if defined(PKG_VERBOSE) @@${PHASE_MSG} "Leaving \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after barrier for ${PKGNAME}" . endif .endif ###################################################################### ### barrier-cookie (PRIVATE) ###################################################################### ### barrier-cookie creates the "barrier" cookie file. ### ${_COOKIE.barrier}: ${RUN} \ ${TEST} -d ${.TARGET:H} || ${MKDIR} ${.TARGET:H}; \ ${ECHO} ${PKGNAME} > ${.TARGET} @ 1.21 log @New target test-env, like build-env and configure-env. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.20 2020/02/09 20:33:38 rillig Exp $ d92 3 a94 2 ${RUN}${MKDIR} ${.TARGET:H} ${RUN}${ECHO} ${PKGNAME} > ${.TARGET} @ 1.20 log @mk/configure: add configure-env target This allows easy inspection of the realistic environment in which the configure scripts are run. The code is copied from the similar build-env target. This might help to find the cause for pkg/54894, where "gcc -dumpversion" is said to output 0 as the version number. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.19 2013/05/23 13:18:56 obache Exp $ d23 1 a23 1 _BARRIER_POST_TARGETS+= test @ 1.19 log @prevent to generate binary package in ${PACKAGES} from the side effect of `install' with USE_DESTDIR=yes. This changes prevent to unwanted overwite of existing binary packages with test installation (`stage-install', `replace' & `undo-replace', and so on). To do both `install' and `package', you can still use `package-install' target, same as USE_DESTDIR=no. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.18 2010/02/24 22:53:34 joerg Exp $ d21 1 a21 1 _BARRIER_POST_TARGETS+= configure @ 1.18 log @Rename the install phase to stage-install. Introduce a new install target that defaults to either stage-install or package-install, depending on whether DESTDIR support is active and supported by the package or not. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.17 2009/05/16 01:27:30 joerg Exp $ d26 1 @ 1.17 log @Don't require pkg_delete or pkg_info -r to list packages in full topological sort for the make update list. This breaks naturally when new dependencies are introduced that are also in the list scheduled for later installation. Reported by David Holland. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.16 2008/02/07 21:36:13 rillig Exp $ d25 1 a25 1 _BARRIER_POST_TARGETS+= install d31 1 @ 1.16 log @Replaced _PKG_SILENT and _PKG_DEBUG with RUN. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.15 2007/11/30 18:54:40 rillig Exp $ d67 4 d77 2 a78 1 } @ 1.15 log @Since the "build" target is run inside the pkgsrc barrier, "build-env" gets the same treatment. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.14 2007/08/31 16:30:11 jlam Exp $ d66 1 a66 1 ${_PKG_SILENT}${_PKG_DEBUG} \ d85 2 a86 2 ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${.TARGET} @ 1.14 log @Introduce a new target "checksum-phase" which is used as a dependency target by pkgsrc. This new target computes checksums only up until the extract phase is complete. The "checksum" target is now a target that can always be run by the user at any time, regardless of the presence of the work directory. These changes were proposed in PR pkg/36603 by Robert Elz. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.13 2006/11/03 08:01:04 joerg Exp $ d22 1 a22 1 _BARRIER_POST_TARGETS+= build @ 1.13 log @Add package-install. For non-DESTDIR builds, package and package-install are identical. For DESTDIR builds, the package is not installed to PREFIX as part of the build, so package-install does exactly that after package is done. Change bin-install to call package-install. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.12 2006/10/06 19:04:37 rillig Exp $ d8 1 a8 1 _BARRIER_PRE_TARGETS= checksum makedirs depends @ 1.12 log @Added a call similar to "make error-check" when the real target fails for some reason. That way, error and warning messages that have long been hidden are now shown. They don't appear very prominently by now, but it's much better than showing them not at all. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.11 2006/07/27 21:46:45 jlam Exp $ d30 1 @ 1.11 log @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. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.10 2006/07/25 18:04:25 jlam Exp $ d15 2 d56 3 d65 8 a72 1 ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} @ 1.10 log @Move barrier to just after the depends phase. This allows both the "tools" and "wrapper" phases to be able to expect all the dependencies to be installed already. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.9 2006/07/22 16:31:35 jlam Exp $ d60 1 a60 1 ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} @ 1.9 log @Modify the barrier so that we always invoke the recursive make process when passing through the barrier. This ensures the PATH (passed via PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier. This fixes a bug in "interactive" pkgsrc use, where if you have no work directory and type "make build && make install", then the "install" step does not have a PATH set to include all the wrapper and tools directories. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.8 2006/07/21 14:27:56 jlam Exp $ d8 1 a8 1 _BARRIER_PRE_TARGETS= tools d15 2 a16 1 _BARRIER_POST_TARGETS= wrapper @ 1.8 log @"BUILD_ENV" was misnamed. It's actually the environment that is passed to all internal recursive make processes. As such, rename it to "PKGSRC_MAKE_ENV". XXX Note, some of the usage of this variable in package Makefiles seems XXX incorrect. They probably want "MAKE_ENV", which is the environment XXX passed to the make process when running "make" within ${WRKSRC}. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.7 2006/07/21 14:21:28 jlam Exp $ d43 1 a43 1 ### .if !exists(${_COOKIE.barrier}) d55 1 a55 1 .if !exists(${_COOKIE.barrier}) d59 1 a59 1 ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE} ${MAKEFLAGS} ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} @ 1.7 log @Rearrange sequence so that "wrapper" occurs between "tools" and "extract". This allows all user-definable targets (pre-*, do-*, post-*) to have access to the wrapper scripts. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.6 2006/07/07 21:24:27 jlam Exp $ d59 1 a59 1 ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${BUILD_ENV} ${MAKE} ${MAKEFLAGS} ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} @ 1.6 log @Rename _COOKIE variables to _COOKIE.. These are private variables so there are no user-visible changes. This change just makes it a little easier to write for loops. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.5 2006/07/06 22:17:57 jlam Exp $ d8 1 a8 1 _BARRIER_PRE_TARGETS= patch d16 2 @ 1.5 log @Remove an unnecessary target... ${_BARRIER_COOKIE} has no source targets so it might as well be the target name. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.4 2006/07/06 22:08:32 jlam Exp $ d3 1 a3 1 _BARRIER_COOKIE= ${WRKDIR}/.barrier_cookie d41 1 a41 1 ### .if !exists(${_BARRIER_COOKIE}) d52 2 a53 2 barrier: ${_BARRIER_PRE_TARGETS} ${_BARRIER_COOKIE} .if !exists(${_BARRIER_COOKIE}) d68 1 a68 1 ${_BARRIER_COOKIE}: @ 1.4 log @The "replace" target does conceptually the same thing as the "install" target in that it installs the currently-built software into the filesystem. In that case where "replace" is specified as a target on the command line, make "replace" and not "install" be the source target for "package". Also, place the "replace" target between the "install" and "package" targets in _BARRIER_POST_TARGETS as it should be legal to do those steps in that order (but not in another order). These changes make the following work: make replace package In this example, the currently installed package will be replaced and the newly-installed software will be packaged, all within the same make process. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.3 2006/07/06 15:43:10 jlam Exp $ d52 1 a52 1 barrier: ${_BARRIER_PRE_TARGETS} barrier-cookie d68 3 a70 3 barrier-cookie: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_BARRIER_COOKIE:H} ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${_BARRIER_COOKIE} @ 1.3 log @Move inclusion of bsd.pkg.barrier.mk under the .MAIN target because bsd.pkg.barrier.mk uses the "make()" test expression. Also, include "all" as a post-barrier target since it is implicitly the ".MAIN" target when a user just types "make" in a package directory. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.2 2006/07/06 15:33:19 jlam Exp $ d22 1 a25 3 # XXX This target should probably be handled specially. _BARRIER_POST_TARGETS+= replace @ 1.2 log @Order the _BARRIER_POST_TARGETS so that if more than one is specified on the command-line, then we don't invoke make once for each target, and pass them to the sub-make in a sensible order. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.barrier.mk,v 1.1 2006/07/05 22:21:02 jlam Exp $ d19 1 @ 1.1 log @Flatten out recursive makes into a single re-invocation of make by introducing the concept of a "barrier". We separate the user-invokable targets into ones that must happen before the barrier, and ones that must happen after the barrier. The ones that happen after the barrier are run in a sub-make process. In this case, the targets that must be run after the barrier are from the "wrapper" step and beyond. We rewrite the various "flow" targets, e.g. wrapper, configure, build, etc., so that they of the right form to use the barrier target. This now completely removes the concept of PKG_PHASE from pkgsrc. It is replaced with the concept of "before" and "after" the barrier, and this state can be checked by testing for the existence of the barrier cookie file. Because we've removed most of the recursive makes, there is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove them for now. As part of this commit, put back the logic that conditionalized the sources for the various cookie files. Because the sources are all "phony" targets, they were always run, regardless of whether or not the cookie file already existed. Now, if a cookie file exists, then that entire phase associated with that cookie file is skipped. Lastly, fix a thinko in configure/bsd.configure.mk where setting NO_CONFIGURE in a package Makefile would manage to skip the "wrapper" step altogether. Fix this by correctly noting "wrapper" and not "patch" as the preceding step to "configure". @ text @d1 1 a1 1 # $NetBSD$ d5 1 a5 1 # _BARRIER_POST_TARGETS is a list of the targets that must be built after a8 1 _BARRIER_POST_TARGETS= wrapper configure build install package d10 4 a13 2 # These targets have the "main" targets as sources, and so they must also # be barrier-aware. d15 3 d19 6 a24 1 _BARRIER_POST_TARGETS+= reinstall repackage d27 6 d51 1 d55 7 a61 11 . for _target_ in ${_BARRIER_POST_TARGETS} . if make(${_target_}) . if defined(PKG_VERBOSE) @@${PHASE_MSG} "Invoking \`\`"${_target_:Q}"'' after barrier for ${PKGNAME}" . endif ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${BUILD_ENV} ${MAKE} ${MAKEFLAGS} ALLOW_VULNERABLE_PACKAGES= ${_target_} . if defined(PKG_VERBOSE) @@${PHASE_MSG} "Leaving \`\`"${_target_:Q}"'' after barrier for ${PKGNAME}" . endif . endif . endfor @