mk: allow "bmake clean depends" as shortcut When "bmake clean depends" was called for a package where the various cookie files already existed, these would enable different rules than a clean package directory. Since "bmake clean" deletes all the cookie files before "bmake depends" starts, in these combined command lines the cookie files must be treated as absent.diff -r1.403 -r1.404 pkgsrc/mk/bsd.prefs.mk
(rillig)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.prefs.mk,v 1.403 2019/01/06 12:51:45 bsiegert Exp $ | 1 | # $NetBSD: bsd.prefs.mk,v 1.404 2019/05/07 19:36:43 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This file includes the mk.conf file, which contains the user settings. | 3 | # This file includes the mk.conf file, which contains the user settings. | |
4 | # | 4 | # | |
5 | # Packages should include this file before any of the .if directives, as | 5 | # Packages should include this file before any of the .if directives, as | |
6 | # well as before modifying variables like CFLAGS, LDFLAGS, and so on. | 6 | # well as before modifying variables like CFLAGS, LDFLAGS, and so on. | |
7 | # Otherwise the behavior may be unexpected. | 7 | # Otherwise the behavior may be unexpected. | |
8 | # | 8 | # | |
9 | # When mk.conf is included by this file, the following variables are | 9 | # When mk.conf is included by this file, the following variables are | |
10 | # defined: | 10 | # defined: | |
11 | # | 11 | # | |
12 | # ACCEPTABLE_LICENSES | 12 | # ACCEPTABLE_LICENSES | |
13 | # This variable is set to the list of Open Source licenses. See | 13 | # This variable is set to the list of Open Source licenses. See | |
14 | # mk/license.mk for details. | 14 | # mk/license.mk for details. | |
@@ -51,26 +51,31 @@ _MAKE:= ${PWD}/${MAKE} | @@ -51,26 +51,31 @@ _MAKE:= ${PWD}/${MAKE} | |||
51 | . for _dir_ in ${PATH:C/\:/ /g} | 51 | . for _dir_ in ${PATH:C/\:/ /g} | |
52 | . if empty(_MAKE:M/*) | 52 | . if empty(_MAKE:M/*) | |
53 | . if exists(${_dir_}/${MAKE}) | 53 | . if exists(${_dir_}/${MAKE}) | |
54 | _MAKE:= ${_dir_}/${MAKE} | 54 | _MAKE:= ${_dir_}/${MAKE} | |
55 | . endif | 55 | . endif | |
56 | . endif | 56 | . endif | |
57 | . endfor | 57 | . endfor | |
58 | . if !empty(_MAKE:M/*) | 58 | . if !empty(_MAKE:M/*) | |
59 | MAKEFLAGS+= _MAKE=${_MAKE:Q} | 59 | MAKEFLAGS+= _MAKE=${_MAKE:Q} | |
60 | . endif | 60 | . endif | |
61 | .endif | 61 | .endif | |
62 | MAKE:= ${_MAKE} | 62 | MAKE:= ${_MAKE} | |
63 | 63 | |||
64 | # Whether bmake has been called with one of the "clean" targets followed by | |||
65 | # another non-cleaning target like "depends" or "build". This is to make | |||
66 | # the call "bmake clean depends" equivalent to "bmake clean && bmake depends". | |||
67 | _CLEANING:= ${"${.TARGETS:C,( [[:alnum:]-]*clean[[:alnum:]-]*)+$,,W:M*clean*}":?yes:} | |||
68 | ||||
64 | .if exists(/usr/bin/uname) | 69 | .if exists(/usr/bin/uname) | |
65 | UNAME=/usr/bin/uname | 70 | UNAME=/usr/bin/uname | |
66 | .elif exists(/bin/uname) | 71 | .elif exists(/bin/uname) | |
67 | UNAME=/bin/uname | 72 | UNAME=/bin/uname | |
68 | .else | 73 | .else | |
69 | UNAME=echo Unknown | 74 | UNAME=echo Unknown | |
70 | .endif | 75 | .endif | |
71 | 76 | |||
72 | .if !defined(OPSYS) | 77 | .if !defined(OPSYS) | |
73 | OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g:C/^CYGWIN_.*$/Cygwin/} | 78 | OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g:C/^CYGWIN_.*$/Cygwin/} | |
74 | MAKEFLAGS+= OPSYS=${OPSYS:Q} | 79 | MAKEFLAGS+= OPSYS=${OPSYS:Q} | |
75 | .endif | 80 | .endif | |
76 | 81 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: cwrappers.mk,v 1.30 2017/11/08 03:52:50 khorben Exp $ | 1 | # $NetBSD: cwrappers.mk,v 1.31 2019/05/07 19:36:43 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment implements integration of pkgtools/cwrappers. | 3 | # This Makefile fragment implements integration of pkgtools/cwrappers. | |
4 | 4 | |||
5 | .include "../../mk/wrapper/wrapper-defs.mk" | 5 | .include "../../mk/wrapper/wrapper-defs.mk" | |
6 | .include "../../mk/buildlink3/bsd.buildlink3.mk" | 6 | .include "../../mk/buildlink3/bsd.buildlink3.mk" | |
7 | 7 | |||
8 | BUILD_DEPENDS+= cwrappers>=20150314:../../pkgtools/cwrappers | 8 | BUILD_DEPENDS+= cwrappers>=20150314:../../pkgtools/cwrappers | |
9 | 9 | |||
10 | # XXX This should be PREFIX, but USE_CROSSBASE overrides it. | 10 | # XXX This should be PREFIX, but USE_CROSSBASE overrides it. | |
11 | CWRAPPERS_SRC_DIR= ${LOCALBASE}/libexec/cwrappers | 11 | CWRAPPERS_SRC_DIR= ${LOCALBASE}/libexec/cwrappers | |
12 | CWRAPPERS_CONFIG_DIR= ${WRKDIR}/.cwrapper/config | 12 | CWRAPPERS_CONFIG_DIR= ${WRKDIR}/.cwrapper/config | |
13 | CONFIGURE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} | 13 | CONFIGURE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} | |
14 | MAKE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} | 14 | MAKE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} | |
@@ -91,41 +91,41 @@ generate-cwrappers: | @@ -91,41 +91,41 @@ generate-cwrappers: | |||
91 | . if ${_PKGSRC_MKPIE} == "yes" | 91 | . if ${_PKGSRC_MKPIE} == "yes" | |
92 | . for arg in ${_MKPIE_LDFLAGS.gcc} | 92 | . for arg in ${_MKPIE_LDFLAGS.gcc} | |
93 | ${RUN}echo append_executable=${arg} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} | 93 | ${RUN}echo append_executable=${arg} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} | |
94 | . endfor | 94 | . endfor | |
95 | . endif | 95 | . endif | |
96 | .endfor | 96 | .endfor | |
97 | 97 | |||
98 | PREPEND_PATH+= ${WRAPPER_BINDIR} | 98 | PREPEND_PATH+= ${WRAPPER_BINDIR} | |
99 | 99 | |||
100 | _COOKIE.wrapper= ${WRKDIR}/.wrapper_done | 100 | _COOKIE.wrapper= ${WRKDIR}/.wrapper_done | |
101 | 101 | |||
102 | .PHONY: wrapper | 102 | .PHONY: wrapper | |
103 | .if !target(wrapper) | 103 | .if !target(wrapper) | |
104 | . if exists(${_COOKIE.wrapper}) | 104 | . if exists(${_COOKIE.wrapper}) && !${_CLEANING} | |
105 | wrapper: | 105 | wrapper: | |
106 | @${DO_NADA} | 106 | @${DO_NADA} | |
107 | . elif defined(_PKGSRC_BARRIER) | 107 | . elif defined(_PKGSRC_BARRIER) | |
108 | wrapper: check-vulnerable patch acquire-wrapper-lock ${_COOKIE.wrapper} release-wrapper-lock | 108 | wrapper: check-vulnerable patch acquire-wrapper-lock ${_COOKIE.wrapper} release-wrapper-lock | |
109 | . else | 109 | . else | |
110 | wrapper: barrier | 110 | wrapper: barrier | |
111 | . endif | 111 | . endif | |
112 | .endif | 112 | .endif | |
113 | 113 | |||
114 | .PHONY: acquire-wrapper-lock release-wrapper-lock | 114 | .PHONY: acquire-wrapper-lock release-wrapper-lock | |
115 | acquire-wrapper-lock: acquire-lock | 115 | acquire-wrapper-lock: acquire-lock | |
116 | release-wrapper-lock: release-lock | 116 | release-wrapper-lock: release-lock | |
117 | 117 | |||
118 | .if exists(${_COOKIE.wrapper}) | 118 | .if exists(${_COOKIE.wrapper}) && !${_CLEANING} | |
119 | ${_COOKIE.wrapper}: | 119 | ${_COOKIE.wrapper}: | |
120 | @${DO_NADA} | 120 | @${DO_NADA} | |
121 | .else | 121 | .else | |
122 | ${_COOKIE.wrapper}: real-wrapper | 122 | ${_COOKIE.wrapper}: real-wrapper | |
123 | .endif | 123 | .endif | |
124 | 124 | |||
125 | .PHONY: real-wrapper | 125 | .PHONY: real-wrapper | |
126 | real-wrapper: wrapper-message wrapper-dirs wrapper-vars pre-wrapper do-wrapper post-wrapper wrapper-cookie error-check | 126 | real-wrapper: wrapper-message wrapper-dirs wrapper-vars pre-wrapper do-wrapper post-wrapper wrapper-cookie error-check | |
127 | 127 | |||
128 | .PHONY: wrapper-message | 128 | .PHONY: wrapper-message | |
129 | wrapper-message: | 129 | wrapper-message: | |
130 | @${PHASE_MSG} "Creating toolchain wrappers for ${PKGNAME}" | 130 | @${PHASE_MSG} "Creating toolchain wrappers for ${PKGNAME}" | |
131 | 131 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.build.mk,v 1.12 2017/06/01 02:15:10 jlam Exp $ | 1 | # $NetBSD: bsd.build.mk,v 1.13 2019/05/07 19:36:43 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | 3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | |
4 | # variables and targets related to building sources for a package. | 4 | # variables and targets related to building sources for a package. | |
5 | # | 5 | # | |
6 | # The following are the "public" targets provided by this module: | 6 | # The following are the "public" targets provided by this module: | |
7 | # | 7 | # | |
8 | # build, test | 8 | # build, test | |
9 | # | 9 | # | |
10 | # The following targets may be overridden in a package Makefile: | 10 | # The following targets may be overridden in a package Makefile: | |
11 | # | 11 | # | |
12 | # pre-build, do-build, post-build | 12 | # pre-build, do-build, post-build | |
13 | # pre-test, do-test, post-test | 13 | # pre-test, do-test, post-test | |
14 | # | 14 | # | |
@@ -22,27 +22,27 @@ | @@ -22,27 +22,27 @@ | |||
22 | 22 | |||
23 | _COOKIE.build= ${WRKDIR}/.build_done | 23 | _COOKIE.build= ${WRKDIR}/.build_done | |
24 | _COOKIE.test= ${WRKDIR}/.test_done | 24 | _COOKIE.test= ${WRKDIR}/.test_done | |
25 | 25 | |||
26 | ###################################################################### | 26 | ###################################################################### | |
27 | ### build (PUBLIC) | 27 | ### build (PUBLIC) | |
28 | ###################################################################### | 28 | ###################################################################### | |
29 | ### build is a public target to build the sources for the package. | 29 | ### build is a public target to build the sources for the package. | |
30 | ### | 30 | ### | |
31 | .PHONY: build | 31 | .PHONY: build | |
32 | .if !defined(NO_BUILD) | 32 | .if !defined(NO_BUILD) | |
33 | . include "build.mk" | 33 | . include "build.mk" | |
34 | .elif !target(build) | 34 | .elif !target(build) | |
35 | . if exists(${_COOKIE.build}) | 35 | . if exists(${_COOKIE.build}) && !${_CLEANING} | |
36 | build: | 36 | build: | |
37 | @${DO_NADA} | 37 | @${DO_NADA} | |
38 | . elif defined(_PKGSRC_BARRIER) | 38 | . elif defined(_PKGSRC_BARRIER) | |
39 | . if ${_USE_NEW_PKGINSTALL:Uno} != "no" | 39 | . if ${_USE_NEW_PKGINSTALL:Uno} != "no" | |
40 | build: configure build-cookie | 40 | build: configure build-cookie | |
41 | . else | 41 | . else | |
42 | build: configure build-cookie pkginstall | 42 | build: configure build-cookie pkginstall | |
43 | . endif | 43 | . endif | |
44 | . else | 44 | . else | |
45 | build: barrier | 45 | build: barrier | |
46 | . endif | 46 | . endif | |
47 | .endif | 47 | .endif | |
48 | 48 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: build.mk,v 1.25 2019/03/17 03:59:11 dholland Exp $ | 1 | # $NetBSD: build.mk,v 1.26 2019/05/07 19:36:43 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This file defines what happens in the build phase, excluding the | 3 | # This file defines what happens in the build phase, excluding the | |
4 | # self-test, which is defined in test.mk. | 4 | # self-test, which is defined in test.mk. | |
5 | # | 5 | # | |
6 | # Public targets for developers: | 6 | # Public targets for developers: | |
7 | # | 7 | # | |
8 | # build-env: | 8 | # build-env: | |
9 | # Runs an interactive shell (BUILD_ENV_SHELL) in the environment | 9 | # Runs an interactive shell (BUILD_ENV_SHELL) in the environment | |
10 | # that is used for building the package. | 10 | # that is used for building the package. | |
11 | # | 11 | # | |
12 | # Package-settable variables: | 12 | # Package-settable variables: | |
13 | # | 13 | # | |
14 | # BUILD_MAKE_FLAGS is the list of arguments that is passed to the make | 14 | # BUILD_MAKE_FLAGS is the list of arguments that is passed to the make | |
@@ -67,41 +67,41 @@ _MAKE_JOBS= -j${MAKE_JOBS} | @@ -67,41 +67,41 @@ _MAKE_JOBS= -j${MAKE_JOBS} | |||
67 | ### build is a public target to build the sources from the package. | 67 | ### build is a public target to build the sources from the package. | |
68 | ### | 68 | ### | |
69 | _BUILD_TARGETS+= check-vulnerable | 69 | _BUILD_TARGETS+= check-vulnerable | |
70 | _BUILD_TARGETS+= configure | 70 | _BUILD_TARGETS+= configure | |
71 | _BUILD_TARGETS+= acquire-build-lock | 71 | _BUILD_TARGETS+= acquire-build-lock | |
72 | _BUILD_TARGETS+= ${_COOKIE.build} | 72 | _BUILD_TARGETS+= ${_COOKIE.build} | |
73 | _BUILD_TARGETS+= release-build-lock | 73 | _BUILD_TARGETS+= release-build-lock | |
74 | .if ${_USE_NEW_PKGINSTALL:Uno} == "no" | 74 | .if ${_USE_NEW_PKGINSTALL:Uno} == "no" | |
75 | _BUILD_TARGETS+= pkginstall | 75 | _BUILD_TARGETS+= pkginstall | |
76 | .endif | 76 | .endif | |
77 | 77 | |||
78 | .PHONY: build | 78 | .PHONY: build | |
79 | .if !target(build) | 79 | .if !target(build) | |
80 | . if exists(${_COOKIE.build}) | 80 | . if exists(${_COOKIE.build}) && !${_CLEANING} | |
81 | build: | 81 | build: | |
82 | @${DO_NADA} | 82 | @${DO_NADA} | |
83 | . elif defined(_PKGSRC_BARRIER) | 83 | . elif defined(_PKGSRC_BARRIER) | |
84 | build: ${_BUILD_TARGETS} | 84 | build: ${_BUILD_TARGETS} | |
85 | . else | 85 | . else | |
86 | build: barrier | 86 | build: barrier | |
87 | . endif | 87 | . endif | |
88 | .endif | 88 | .endif | |
89 | 89 | |||
90 | .PHONY: acquire-build-lock release-build-lock | 90 | .PHONY: acquire-build-lock release-build-lock | |
91 | acquire-build-lock: acquire-lock | 91 | acquire-build-lock: acquire-lock | |
92 | release-build-lock: release-lock | 92 | release-build-lock: release-lock | |
93 | 93 | |||
94 | .if exists(${_COOKIE.build}) | 94 | .if exists(${_COOKIE.build}) && !${_CLEANING} | |
95 | ${_COOKIE.build}: | 95 | ${_COOKIE.build}: | |
96 | @${DO_NADA} | 96 | @${DO_NADA} | |
97 | .else | 97 | .else | |
98 | ${_COOKIE.build}: real-build | 98 | ${_COOKIE.build}: real-build | |
99 | .endif | 99 | .endif | |
100 | 100 | |||
101 | ###################################################################### | 101 | ###################################################################### | |
102 | ### rebuild (PUBLIC) | 102 | ### rebuild (PUBLIC) | |
103 | ###################################################################### | 103 | ###################################################################### | |
104 | ### rebuild is a special target to re-run the build target. | 104 | ### rebuild is a special target to re-run the build target. | |
105 | ### | 105 | ### | |
106 | 106 | |||
107 | .PHONY: rebuild | 107 | .PHONY: rebuild |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: test.mk,v 1.20 2018/11/30 18:38:19 rillig Exp $ | 1 | # $NetBSD: test.mk,v 1.21 2019/05/07 19:36:43 rillig Exp $ | |
2 | # | 2 | # | |
3 | # After the "build" phase, many packages provide some sort of self-test | 3 | # After the "build" phase, many packages provide some sort of self-test | |
4 | # that can be run on the not-yet installed package. To enable these | 4 | # that can be run on the not-yet installed package. To enable these | |
5 | # tests, the package must define TEST_TARGET or override the do-test | 5 | # tests, the package must define TEST_TARGET or override the do-test | |
6 | # target. Additionally, the pkgsrc user must define PKGSRC_RUN_TEST. | 6 | # target. Additionally, the pkgsrc user must define PKGSRC_RUN_TEST. | |
7 | # | 7 | # | |
8 | # User-settable variables: | 8 | # User-settable variables: | |
9 | # | 9 | # | |
10 | # PKGSRC_RUN_TEST | 10 | # PKGSRC_RUN_TEST | |
11 | # (See defaults/mk.conf) | 11 | # (See defaults/mk.conf) | |
12 | # | 12 | # | |
13 | # Package-settable variables: | 13 | # Package-settable variables: | |
14 | # | 14 | # | |
@@ -57,41 +57,41 @@ TEST_MAKE_CMD= \ | @@ -57,41 +57,41 @@ TEST_MAKE_CMD= \ | |||
57 | ### test (PUBLIC) | 57 | ### test (PUBLIC) | |
58 | ###################################################################### | 58 | ###################################################################### | |
59 | ### build is a public target to build the sources from the package. | 59 | ### build is a public target to build the sources from the package. | |
60 | ### | 60 | ### | |
61 | _TEST_TARGETS+= check-vulnerable | 61 | _TEST_TARGETS+= check-vulnerable | |
62 | _TEST_TARGETS+= build | 62 | _TEST_TARGETS+= build | |
63 | _TEST_TARGETS+= test-depends | 63 | _TEST_TARGETS+= test-depends | |
64 | _TEST_TARGETS+= acquire-test-lock | 64 | _TEST_TARGETS+= acquire-test-lock | |
65 | _TEST_TARGETS+= ${_COOKIE.test} | 65 | _TEST_TARGETS+= ${_COOKIE.test} | |
66 | _TEST_TARGETS+= release-test-lock | 66 | _TEST_TARGETS+= release-test-lock | |
67 | 67 | |||
68 | .PHONY: test | 68 | .PHONY: test | |
69 | .if !target(test) | 69 | .if !target(test) | |
70 | . if exists(${_COOKIE.test}) | 70 | . if exists(${_COOKIE.test}) && !${_CLEANING} | |
71 | test: | 71 | test: | |
72 | @${DO_NADA} | 72 | @${DO_NADA} | |
73 | . elif defined(_PKGSRC_BARRIER) | 73 | . elif defined(_PKGSRC_BARRIER) | |
74 | test: ${_TEST_TARGETS} | 74 | test: ${_TEST_TARGETS} | |
75 | . else | 75 | . else | |
76 | test: barrier | 76 | test: barrier | |
77 | . endif | 77 | . endif | |
78 | .endif | 78 | .endif | |
79 | 79 | |||
80 | .PHONY: acquire-test-lock release-test-lock | 80 | .PHONY: acquire-test-lock release-test-lock | |
81 | acquire-test-lock: acquire-lock | 81 | acquire-test-lock: acquire-lock | |
82 | release-test-lock: release-lock | 82 | release-test-lock: release-lock | |
83 | 83 | |||
84 | .if exists(${_COOKIE.test}) | 84 | .if exists(${_COOKIE.test}) && !${_CLEANING} | |
85 | ${_COOKIE.test}: | 85 | ${_COOKIE.test}: | |
86 | @${DO_NADA} | 86 | @${DO_NADA} | |
87 | .else | 87 | .else | |
88 | ${_COOKIE.test}: real-test | 88 | ${_COOKIE.test}: real-test | |
89 | .endif | 89 | .endif | |
90 | 90 | |||
91 | ###################################################################### | 91 | ###################################################################### | |
92 | ### retest (PUBLIC) | 92 | ### retest (PUBLIC) | |
93 | ###################################################################### | 93 | ###################################################################### | |
94 | ### retest is a special target to re-run the test target. | 94 | ### retest is a special target to re-run the test target. | |
95 | ### | 95 | ### | |
96 | .PHONY: retest | 96 | .PHONY: retest | |
97 | retest: test-clean | 97 | retest: test-clean |
@@ -1,39 +1,39 @@ | @@ -1,39 +1,39 @@ | |||
1 | # $NetBSD: bsd.configure.mk,v 1.11 2008/01/04 01:46:26 rillig Exp $ | 1 | # $NetBSD: bsd.configure.mk,v 1.12 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | 3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | |
4 | # variables and targets related to configuring packages for building. | 4 | # variables and targets related to configuring packages for building. | |
5 | # | 5 | # | |
6 | # The following are the "public" targets provided by this module: | 6 | # The following are the "public" targets provided by this module: | |
7 | # | 7 | # | |
8 | # configure | 8 | # configure | |
9 | # | 9 | # | |
10 | # The following targets may be overridden in a package Makefile: | 10 | # The following targets may be overridden in a package Makefile: | |
11 | # | 11 | # | |
12 | # pre-configure, do-configure, post-configure | 12 | # pre-configure, do-configure, post-configure | |
13 | # | 13 | # | |
14 | 14 | |||
15 | _COOKIE.configure= ${WRKDIR}/.configure_done | 15 | _COOKIE.configure= ${WRKDIR}/.configure_done | |
16 | 16 | |||
17 | ###################################################################### | 17 | ###################################################################### | |
18 | ### configure (PUBLIC) | 18 | ### configure (PUBLIC) | |
19 | ###################################################################### | 19 | ###################################################################### | |
20 | ### configure is a public target to configure the software for building. | 20 | ### configure is a public target to configure the software for building. | |
21 | ### | 21 | ### | |
22 | .PHONY: configure | 22 | .PHONY: configure | |
23 | .if !defined(NO_CONFIGURE) | 23 | .if !defined(NO_CONFIGURE) | |
24 | . include "configure.mk" | 24 | . include "configure.mk" | |
25 | .elif !target(configure) | 25 | .elif !target(configure) | |
26 | . if exists(${_COOKIE.configure}) | 26 | . if exists(${_COOKIE.configure}) && !${_CLEANING} | |
27 | configure: | 27 | configure: | |
28 | @${DO_NADA} | 28 | @${DO_NADA} | |
29 | . elif defined(_PKGSRC_BARRIER) | 29 | . elif defined(_PKGSRC_BARRIER) | |
30 | configure: wrapper _configure-cookie | 30 | configure: wrapper _configure-cookie | |
31 | . else | 31 | . else | |
32 | configure: barrier | 32 | configure: barrier | |
33 | . endif | 33 | . endif | |
34 | .endif | 34 | .endif | |
35 | 35 | |||
36 | # Creates the "configure" cookie file. | 36 | # Creates the "configure" cookie file. | |
37 | _configure-cookie: .PHONY | 37 | _configure-cookie: .PHONY | |
38 | ${RUN} [ ! -f ${_COOKIE.configure} ] # XXX: What's the purpose of this assertion? | 38 | ${RUN} [ ! -f ${_COOKIE.configure} ] # XXX: What's the purpose of this assertion? | |
39 | ${RUN} ${MKDIR} ${_COOKIE.configure:H} | 39 | ${RUN} ${MKDIR} ${_COOKIE.configure:H} |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: configure.mk,v 1.28 2019/04/28 13:18:18 rillig Exp $ | 1 | # $NetBSD: configure.mk,v 1.29 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # = Package-settable variables = | 3 | # = Package-settable variables = | |
4 | # | 4 | # | |
5 | # CONFIGURE_ENV is the shell environment that is exported to the | 5 | # CONFIGURE_ENV is the shell environment that is exported to the | |
6 | # configure script. | 6 | # configure script. | |
7 | # | 7 | # | |
8 | # CONFIG_SHELL is the shell that is used for interpreting the | 8 | # CONFIG_SHELL is the shell that is used for interpreting the | |
9 | # configure script. | 9 | # configure script. | |
10 | # | 10 | # | |
11 | # CONFIGURE_SCRIPT is the path to the script to run in order to | 11 | # CONFIGURE_SCRIPT is the path to the script to run in order to | |
12 | # configure the software for building. If the path is relative, | 12 | # configure the software for building. If the path is relative, | |
13 | # then it is assumed to be relative to each directory listed in | 13 | # then it is assumed to be relative to each directory listed in | |
14 | # CONFIGURE_DIRS. | 14 | # CONFIGURE_DIRS. | |
@@ -89,41 +89,41 @@ _BUILD_DEFS+= CONFIGURE_ENV CONFIGURE_A | @@ -89,41 +89,41 @@ _BUILD_DEFS+= CONFIGURE_ENV CONFIGURE_A | |||
89 | ###################################################################### | 89 | ###################################################################### | |
90 | ### configure (PUBLIC) | 90 | ### configure (PUBLIC) | |
91 | ###################################################################### | 91 | ###################################################################### | |
92 | ### configure is a public target to configure the sources for building. | 92 | ### configure is a public target to configure the sources for building. | |
93 | ### | 93 | ### | |
94 | _CONFIGURE_TARGETS+= check-vulnerable | 94 | _CONFIGURE_TARGETS+= check-vulnerable | |
95 | _CONFIGURE_TARGETS+= wrapper | 95 | _CONFIGURE_TARGETS+= wrapper | |
96 | _CONFIGURE_TARGETS+= acquire-configure-lock | 96 | _CONFIGURE_TARGETS+= acquire-configure-lock | |
97 | _CONFIGURE_TARGETS+= ${_COOKIE.configure} | 97 | _CONFIGURE_TARGETS+= ${_COOKIE.configure} | |
98 | _CONFIGURE_TARGETS+= release-configure-lock | 98 | _CONFIGURE_TARGETS+= release-configure-lock | |
99 | 99 | |||
100 | .PHONY: configure | 100 | .PHONY: configure | |
101 | .if !target(configure) | 101 | .if !target(configure) | |
102 | . if exists(${_COOKIE.configure}) | 102 | . if exists(${_COOKIE.configure}) && !${_CLEANING} | |
103 | configure: | 103 | configure: | |
104 | @${DO_NADA} | 104 | @${DO_NADA} | |
105 | . elif defined(_PKGSRC_BARRIER) | 105 | . elif defined(_PKGSRC_BARRIER) | |
106 | configure: ${_CONFIGURE_TARGETS} | 106 | configure: ${_CONFIGURE_TARGETS} | |
107 | . else | 107 | . else | |
108 | configure: barrier | 108 | configure: barrier | |
109 | . endif | 109 | . endif | |
110 | .endif | 110 | .endif | |
111 | 111 | |||
112 | .PHONY: acquire-configure-lock release-configure-lock | 112 | .PHONY: acquire-configure-lock release-configure-lock | |
113 | acquire-configure-lock: acquire-lock | 113 | acquire-configure-lock: acquire-lock | |
114 | release-configure-lock: release-lock | 114 | release-configure-lock: release-lock | |
115 | 115 | |||
116 | .if exists(${_COOKIE.configure}) | 116 | .if exists(${_COOKIE.configure}) && !${_CLEANING} | |
117 | ${_COOKIE.configure}: | 117 | ${_COOKIE.configure}: | |
118 | @${DO_NADA} | 118 | @${DO_NADA} | |
119 | .else | 119 | .else | |
120 | ${_COOKIE.configure}: real-configure | 120 | ${_COOKIE.configure}: real-configure | |
121 | .endif | 121 | .endif | |
122 | 122 | |||
123 | ###################################################################### | 123 | ###################################################################### | |
124 | ### real-configure (PRIVATE) | 124 | ### real-configure (PRIVATE) | |
125 | ###################################################################### | 125 | ###################################################################### | |
126 | ### real-configure is a helper target onto which one can hook all of the | 126 | ### real-configure is a helper target onto which one can hook all of the | |
127 | ### targets that do the actual configuration of the sources. | 127 | ### targets that do the actual configuration of the sources. | |
128 | ### | 128 | ### | |
129 | # | 129 | # |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.depends.mk,v 1.29 2019/05/04 11:45:14 leot Exp $ | 1 | # $NetBSD: bsd.depends.mk,v 1.30 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | 3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | |
4 | # variables and targets related to dependencies. | 4 | # variables and targets related to dependencies. | |
5 | # | 5 | # | |
6 | # The following are the "public" targets provided by this module: | 6 | # The following are the "public" targets provided by this module: | |
7 | # | 7 | # | |
8 | # depends, bootstrap-depends, install-depends, show-depends | 8 | # depends, bootstrap-depends, install-depends, show-depends | |
9 | # | 9 | # | |
10 | # The following variables may be set in a package Makefile: | 10 | # The following variables may be set in a package Makefile: | |
11 | # | 11 | # | |
12 | # DEPENDS | 12 | # DEPENDS | |
13 | # List of dependencies of the form "pattern:dir" needed by the | 13 | # List of dependencies of the form "pattern:dir" needed by the | |
14 | # package at run-time. | 14 | # package at run-time. | |
@@ -62,27 +62,27 @@ DEPENDS_TARGET= reinstall | @@ -62,27 +62,27 @@ DEPENDS_TARGET= reinstall | |||
62 | . endif | 62 | . endif | |
63 | .endif | 63 | .endif | |
64 | 64 | |||
65 | ###################################################################### | 65 | ###################################################################### | |
66 | ### depends (PUBLIC) | 66 | ### depends (PUBLIC) | |
67 | ###################################################################### | 67 | ###################################################################### | |
68 | ### depends is a public target to install missing dependencies for | 68 | ### depends is a public target to install missing dependencies for | |
69 | ### the package. | 69 | ### the package. | |
70 | ### | 70 | ### | |
71 | .PHONY: depends | 71 | .PHONY: depends | |
72 | .if ${SKIP_DEPENDS:M[Nn][Oo]} != "" | 72 | .if ${SKIP_DEPENDS:M[Nn][Oo]} != "" | |
73 | . include "depends.mk" | 73 | . include "depends.mk" | |
74 | .elif !target(depends) | 74 | .elif !target(depends) | |
75 | . if exists(${_COOKIE.depends}) | 75 | . if exists(${_COOKIE.depends}) && !${_CLEANING} | |
76 | depends: | 76 | depends: | |
77 | @${DO_NADA} | 77 | @${DO_NADA} | |
78 | . else | 78 | . else | |
79 | depends: depends-cookie | 79 | depends: depends-cookie | |
80 | . endif | 80 | . endif | |
81 | .endif | 81 | .endif | |
82 | 82 | |||
83 | ###################################################################### | 83 | ###################################################################### | |
84 | ### bootstrap-depends (PUBLIC, OVERRIDE) | 84 | ### bootstrap-depends (PUBLIC, OVERRIDE) | |
85 | ###################################################################### | 85 | ###################################################################### | |
86 | ### bootstrap-depends is a public target to install any missing | 86 | ### bootstrap-depends is a public target to install any missing | |
87 | ### dependencies needed during stages before the normal "depends" | 87 | ### dependencies needed during stages before the normal "depends" | |
88 | ### stage. These dependencies are listed in BOOTSTRAP_DEPENDS. | 88 | ### stage. These dependencies are listed in BOOTSTRAP_DEPENDS. |
@@ -1,40 +1,40 @@ | @@ -1,40 +1,40 @@ | |||
1 | # $NetBSD: depends.mk,v 1.18 2014/01/14 12:28:47 cheusov Exp $ | 1 | # $NetBSD: depends.mk,v 1.19 2019/05/07 19:36:44 rillig Exp $ | |
2 | 2 | |||
3 | ###################################################################### | 3 | ###################################################################### | |
4 | ### depends (PUBLIC) | 4 | ### depends (PUBLIC) | |
5 | ###################################################################### | 5 | ###################################################################### | |
6 | ### depends is a public target to install missing dependencies for | 6 | ### depends is a public target to install missing dependencies for | |
7 | ### the package. | 7 | ### the package. | |
8 | ### | 8 | ### | |
9 | _DEPENDS_TARGETS+= acquire-depends-lock | 9 | _DEPENDS_TARGETS+= acquire-depends-lock | |
10 | _DEPENDS_TARGETS+= ${_COOKIE.depends} | 10 | _DEPENDS_TARGETS+= ${_COOKIE.depends} | |
11 | _DEPENDS_TARGETS+= release-depends-lock | 11 | _DEPENDS_TARGETS+= release-depends-lock | |
12 | 12 | |||
13 | .PHONY: depends | 13 | .PHONY: depends | |
14 | .if !target(depends) | 14 | .if !target(depends) | |
15 | . if exists(${_COOKIE.depends}) | 15 | . if exists(${_COOKIE.depends}) && !${_CLEANING} | |
16 | depends: | 16 | depends: | |
17 | @${DO_NADA} | 17 | @${DO_NADA} | |
18 | . else | 18 | . else | |
19 | depends: ${_DEPENDS_TARGETS} | 19 | depends: ${_DEPENDS_TARGETS} | |
20 | . endif | 20 | . endif | |
21 | .endif | 21 | .endif | |
22 | 22 | |||
23 | .PHONY: acquire-depends-lock release-depends-lock | 23 | .PHONY: acquire-depends-lock release-depends-lock | |
24 | acquire-depends-lock: acquire-lock | 24 | acquire-depends-lock: acquire-lock | |
25 | release-depends-lock: release-lock | 25 | release-depends-lock: release-lock | |
26 | 26 | |||
27 | .if exists(${_COOKIE.depends}) | 27 | .if exists(${_COOKIE.depends}) && !${_CLEANING} | |
28 | ${_COOKIE.depends}: | 28 | ${_COOKIE.depends}: | |
29 | @${DO_NADA} | 29 | @${DO_NADA} | |
30 | .else | 30 | .else | |
31 | ${_COOKIE.depends}: real-depends | 31 | ${_COOKIE.depends}: real-depends | |
32 | .endif | 32 | .endif | |
33 | 33 | |||
34 | ###################################################################### | 34 | ###################################################################### | |
35 | ### real-depends (PRIVATE) | 35 | ### real-depends (PRIVATE) | |
36 | ###################################################################### | 36 | ###################################################################### | |
37 | ### real-depends is a helper target onto which one can hook all of the | 37 | ### real-depends is a helper target onto which one can hook all of the | |
38 | ### targets that do the actual dependency installation. | 38 | ### targets that do the actual dependency installation. | |
39 | ### | 39 | ### | |
40 | _REAL_DEPENDS_TARGETS+= ${_PKG_INSTALL_DEPENDS:Dpkg_install-depends} | 40 | _REAL_DEPENDS_TARGETS+= ${_PKG_INSTALL_DEPENDS:Dpkg_install-depends} |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: extract.mk,v 1.37 2014/03/02 09:45:42 obache Exp $ | 1 | # $NetBSD: extract.mk,v 1.38 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # The following variables may be set by the package Makefile and | 3 | # The following variables may be set by the package Makefile and | |
4 | # specify how extraction happens: | 4 | # specify how extraction happens: | |
5 | # | 5 | # | |
6 | # EXTRACT_DIR | 6 | # EXTRACT_DIR | |
7 | # The directory into which the files are extracted. | 7 | # The directory into which the files are extracted. | |
8 | # | 8 | # | |
9 | # Default value: ${WRKDIR} | 9 | # Default value: ${WRKDIR} | |
10 | # | 10 | # | |
11 | # EXTRACT_DIR.${file} | 11 | # EXTRACT_DIR.${file} | |
12 | # The directory into which the file ${file} is extracted. | 12 | # The directory into which the file ${file} is extracted. | |
13 | # | 13 | # | |
14 | # Default: ${EXTRACT_DIR} | 14 | # Default: ${EXTRACT_DIR} | |
@@ -61,41 +61,41 @@ _COOKIE.extract= ${WRKDIR}/.extract_done | @@ -61,41 +61,41 @@ _COOKIE.extract= ${WRKDIR}/.extract_done | |||
61 | ###################################################################### | 61 | ###################################################################### | |
62 | ### extract (PUBLIC) | 62 | ### extract (PUBLIC) | |
63 | ###################################################################### | 63 | ###################################################################### | |
64 | ### extract is a public target to perform extraction. | 64 | ### extract is a public target to perform extraction. | |
65 | ### | 65 | ### | |
66 | _EXTRACT_TARGETS+= check-vulnerable | 66 | _EXTRACT_TARGETS+= check-vulnerable | |
67 | _EXTRACT_TARGETS+= tools | 67 | _EXTRACT_TARGETS+= tools | |
68 | _EXTRACT_TARGETS+= acquire-extract-lock | 68 | _EXTRACT_TARGETS+= acquire-extract-lock | |
69 | _EXTRACT_TARGETS+= ${_COOKIE.extract} | 69 | _EXTRACT_TARGETS+= ${_COOKIE.extract} | |
70 | _EXTRACT_TARGETS+= release-extract-lock | 70 | _EXTRACT_TARGETS+= release-extract-lock | |
71 | 71 | |||
72 | .PHONY: extract | 72 | .PHONY: extract | |
73 | .if !target(extract) | 73 | .if !target(extract) | |
74 | . if exists(${_COOKIE.extract}) | 74 | . if exists(${_COOKIE.extract}) && !${_CLEANING} | |
75 | extract: | 75 | extract: | |
76 | @${DO_NADA} | 76 | @${DO_NADA} | |
77 | . elif defined(_PKGSRC_BARRIER) | 77 | . elif defined(_PKGSRC_BARRIER) | |
78 | extract: ${_EXTRACT_TARGETS} | 78 | extract: ${_EXTRACT_TARGETS} | |
79 | . else | 79 | . else | |
80 | extract: barrier | 80 | extract: barrier | |
81 | . endif | 81 | . endif | |
82 | .endif | 82 | .endif | |
83 | 83 | |||
84 | .PHONY: acquire-extract-lock release-extract-lock | 84 | .PHONY: acquire-extract-lock release-extract-lock | |
85 | acquire-extract-lock: acquire-lock | 85 | acquire-extract-lock: acquire-lock | |
86 | release-extract-lock: release-lock | 86 | release-extract-lock: release-lock | |
87 | 87 | |||
88 | .if exists(${_COOKIE.extract}) | 88 | .if exists(${_COOKIE.extract}) && !${_CLEANING} | |
89 | ${_COOKIE.extract}: | 89 | ${_COOKIE.extract}: | |
90 | @${DO_NADA} | 90 | @${DO_NADA} | |
91 | .else | 91 | .else | |
92 | ${_COOKIE.extract}: real-extract | 92 | ${_COOKIE.extract}: real-extract | |
93 | .endif | 93 | .endif | |
94 | 94 | |||
95 | ###################################################################### | 95 | ###################################################################### | |
96 | ### real-extract (PRIVATE) | 96 | ### real-extract (PRIVATE) | |
97 | ###################################################################### | 97 | ###################################################################### | |
98 | ### real-extract is a helper target onto which one can hook all of the | 98 | ### real-extract is a helper target onto which one can hook all of the | |
99 | ### targets that do the actual extraction work. | 99 | ### targets that do the actual extraction work. | |
100 | ### | 100 | ### | |
101 | _REAL_EXTRACT_TARGETS+= extract-check-interactive | 101 | _REAL_EXTRACT_TARGETS+= extract-check-interactive |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.install.mk,v 1.16 2016/04/10 15:58:02 joerg Exp $ | 1 | # $NetBSD: bsd.install.mk,v 1.17 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | 3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | |
4 | # variables and targets related to installing packages. | 4 | # variables and targets related to installing packages. | |
5 | # | 5 | # | |
6 | # The following are the "public" targets provided this module: | 6 | # The following are the "public" targets provided this module: | |
7 | # | 7 | # | |
8 | # install, stage-install, deinstall, reinstall, replace, undo-replace | 8 | # install, stage-install, deinstall, reinstall, replace, undo-replace | |
9 | # | 9 | # | |
10 | # The following targets may be overridden in a package Makefile: | 10 | # The following targets may be overridden in a package Makefile: | |
11 | # | 11 | # | |
12 | # pre-install, do-install, post-install | 12 | # pre-install, do-install, post-install | |
13 | # | 13 | # | |
14 | 14 | |||
@@ -28,27 +28,27 @@ install: stage-package-install | @@ -28,27 +28,27 @@ install: stage-package-install | |||
28 | install: package-install | 28 | install: package-install | |
29 | .endif | 29 | .endif | |
30 | 30 | |||
31 | ###################################################################### | 31 | ###################################################################### | |
32 | ### stage-install (PUBLIC) | 32 | ### stage-install (PUBLIC) | |
33 | ###################################################################### | 33 | ###################################################################### | |
34 | ### stage-install is a public target to install the package to | 34 | ### stage-install is a public target to install the package to | |
35 | ### to ${DESTDIR}${PREFIX}. | 35 | ### to ${DESTDIR}${PREFIX}. | |
36 | ### | 36 | ### | |
37 | .PHONY: stage-install | 37 | .PHONY: stage-install | |
38 | .if !defined(NO_INSTALL) | 38 | .if !defined(NO_INSTALL) | |
39 | . include "install.mk" | 39 | . include "install.mk" | |
40 | .else | 40 | .else | |
41 | . if exists(${_COOKIE.install}) | 41 | . if exists(${_COOKIE.install}) && !${_CLEANING} | |
42 | stage-install: | 42 | stage-install: | |
43 | @${DO_NADA} | 43 | @${DO_NADA} | |
44 | . elif defined(_PKGSRC_BARRIER) | 44 | . elif defined(_PKGSRC_BARRIER) | |
45 | stage-install: ${_PKGSRC_BUILD_TARGETS} install-cookie | 45 | stage-install: ${_PKGSRC_BUILD_TARGETS} install-cookie | |
46 | . else | 46 | . else | |
47 | stage-install: barrier | 47 | stage-install: barrier | |
48 | . endif | 48 | . endif | |
49 | .endif | 49 | .endif | |
50 | 50 | |||
51 | .include "deinstall.mk" | 51 | .include "deinstall.mk" | |
52 | .include "replace.mk" | 52 | .include "replace.mk" | |
53 | 53 | |||
54 | ###################################################################### | 54 | ###################################################################### |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: install.mk,v 1.75 2018/11/12 14:22:58 jperkin Exp $ | 1 | # $NetBSD: install.mk,v 1.76 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This file provides the code for the "install" phase. | 3 | # This file provides the code for the "install" phase. | |
4 | # | 4 | # | |
5 | # Public targets: | 5 | # Public targets: | |
6 | # | 6 | # | |
7 | # stage-install: | 7 | # stage-install: | |
8 | # Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}. | 8 | # Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}. | |
9 | # | 9 | # | |
10 | 10 | |||
11 | # Interface for other infrastructure components: | 11 | # Interface for other infrastructure components: | |
12 | # | 12 | # | |
13 | # Hooks for use by the infrastructure: | 13 | # Hooks for use by the infrastructure: | |
14 | # | 14 | # | |
@@ -67,41 +67,41 @@ | @@ -67,41 +67,41 @@ | |||
67 | ### install (PUBLIC) | 67 | ### install (PUBLIC) | |
68 | ###################################################################### | 68 | ###################################################################### | |
69 | ### install is a public target to install the package. It will | 69 | ### install is a public target to install the package. It will | |
70 | ### acquire elevated privileges just-in-time. | 70 | ### acquire elevated privileges just-in-time. | |
71 | ### | 71 | ### | |
72 | _INSTALL_TARGETS+= check-vulnerable | 72 | _INSTALL_TARGETS+= check-vulnerable | |
73 | _INSTALL_TARGETS+= ${_PKGSRC_BUILD_TARGETS} | 73 | _INSTALL_TARGETS+= ${_PKGSRC_BUILD_TARGETS} | |
74 | _INSTALL_TARGETS+= acquire-install-lock | 74 | _INSTALL_TARGETS+= acquire-install-lock | |
75 | _INSTALL_TARGETS+= ${_COOKIE.install} | 75 | _INSTALL_TARGETS+= ${_COOKIE.install} | |
76 | _INSTALL_TARGETS+= release-install-lock | 76 | _INSTALL_TARGETS+= release-install-lock | |
77 | 77 | |||
78 | .PHONY: stage-install | 78 | .PHONY: stage-install | |
79 | .if !target(stage-install) | 79 | .if !target(stage-install) | |
80 | . if exists(${_COOKIE.install}) | 80 | . if exists(${_COOKIE.install}) && !${_CLEANING} | |
81 | stage-install: | 81 | stage-install: | |
82 | @${DO_NADA} | 82 | @${DO_NADA} | |
83 | . elif defined(_PKGSRC_BARRIER) | 83 | . elif defined(_PKGSRC_BARRIER) | |
84 | stage-install: ${_INSTALL_TARGETS} | 84 | stage-install: ${_INSTALL_TARGETS} | |
85 | . else | 85 | . else | |
86 | stage-install: barrier | 86 | stage-install: barrier | |
87 | . endif | 87 | . endif | |
88 | .endif | 88 | .endif | |
89 | 89 | |||
90 | .PHONY: acquire-install-lock release-install-lock | 90 | .PHONY: acquire-install-lock release-install-lock | |
91 | acquire-install-lock: acquire-lock | 91 | acquire-install-lock: acquire-lock | |
92 | release-install-lock: release-lock | 92 | release-install-lock: release-lock | |
93 | 93 | |||
94 | .if exists(${_COOKIE.install}) | 94 | .if exists(${_COOKIE.install}) && !${_CLEANING} | |
95 | ${_COOKIE.install}: | 95 | ${_COOKIE.install}: | |
96 | @${DO_NADA} | 96 | @${DO_NADA} | |
97 | .else | 97 | .else | |
98 | ${_COOKIE.install}: real-install | 98 | ${_COOKIE.install}: real-install | |
99 | .endif | 99 | .endif | |
100 | 100 | |||
101 | ###################################################################### | 101 | ###################################################################### | |
102 | ### real-install (PRIVATE) | 102 | ### real-install (PRIVATE) | |
103 | ###################################################################### | 103 | ###################################################################### | |
104 | ### real-install is a helper target onto which one can hook all of the | 104 | ### real-install is a helper target onto which one can hook all of the | |
105 | ### targets that do the actual installing of the built objects. | 105 | ### targets that do the actual installing of the built objects. | |
106 | ### | 106 | ### | |
107 | _REAL_INSTALL_TARGETS+= install-check-interactive | 107 | _REAL_INSTALL_TARGETS+= install-check-interactive |
@@ -1,48 +1,48 @@ | @@ -1,48 +1,48 @@ | |||
1 | # $NetBSD: package.mk,v 1.26 2016/07/14 14:43:55 leot Exp $ | 1 | # $NetBSD: package.mk,v 1.27 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # This file provides the code for the "package" phase. | 3 | # This file provides the code for the "package" phase. | |
4 | # | 4 | # | |
5 | # Public targets: | 5 | # Public targets: | |
6 | # | 6 | # | |
7 | # package: | 7 | # package: | |
8 | # Generates a binary package. | 8 | # Generates a binary package. | |
9 | # It will acquire elevated privileges just-in-time. | 9 | # It will acquire elevated privileges just-in-time. | |
10 | # | 10 | # | |
11 | 11 | |||
12 | _PACKAGE_TARGETS+= check-vulnerable | 12 | _PACKAGE_TARGETS+= check-vulnerable | |
13 | _PACKAGE_TARGETS+= stage-install | 13 | _PACKAGE_TARGETS+= stage-install | |
14 | _PACKAGE_TARGETS+= stage-package-create | 14 | _PACKAGE_TARGETS+= stage-package-create | |
15 | _PACKAGE_TARGETS+= acquire-package-lock | 15 | _PACKAGE_TARGETS+= acquire-package-lock | |
16 | _PACKAGE_TARGETS+= ${_COOKIE.package} | 16 | _PACKAGE_TARGETS+= ${_COOKIE.package} | |
17 | _PACKAGE_TARGETS+= release-package-lock | 17 | _PACKAGE_TARGETS+= release-package-lock | |
18 | 18 | |||
19 | .PHONY: package | 19 | .PHONY: package | |
20 | .if !target(package) | 20 | .if !target(package) | |
21 | . if exists(${_COOKIE.package}) | 21 | . if exists(${_COOKIE.package}) && !${_CLEANING} | |
22 | package: | 22 | package: | |
23 | @${DO_NADA} | 23 | @${DO_NADA} | |
24 | . elif defined(_PKGSRC_BARRIER) | 24 | . elif defined(_PKGSRC_BARRIER) | |
25 | package: ${_PACKAGE_TARGETS} | 25 | package: ${_PACKAGE_TARGETS} | |
26 | . else | 26 | . else | |
27 | package: barrier | 27 | package: barrier | |
28 | . endif | 28 | . endif | |
29 | .endif | 29 | .endif | |
30 | 30 | |||
31 | .PHONY: acquire-package-lock release-package-lock | 31 | .PHONY: acquire-package-lock release-package-lock | |
32 | acquire-package-lock: acquire-lock | 32 | acquire-package-lock: acquire-lock | |
33 | release-package-lock: release-lock | 33 | release-package-lock: release-lock | |
34 | 34 | |||
35 | .if exists(${_COOKIE.package}) | 35 | .if exists(${_COOKIE.package}) && !${_CLEANING} | |
36 | ${_COOKIE.package}: | 36 | ${_COOKIE.package}: | |
37 | @${DO_NADA} | 37 | @${DO_NADA} | |
38 | .else | 38 | .else | |
39 | ${_COOKIE.package}: real-package | 39 | ${_COOKIE.package}: real-package | |
40 | .endif | 40 | .endif | |
41 | 41 | |||
42 | ###################################################################### | 42 | ###################################################################### | |
43 | ### real-package (PRIVATE) | 43 | ### real-package (PRIVATE) | |
44 | ###################################################################### | 44 | ###################################################################### | |
45 | ### real-package is a helper target onto which one can hook all of the | 45 | ### real-package is a helper target onto which one can hook all of the | |
46 | ### targets that do the actual packaging of the built objects. | 46 | ### targets that do the actual packaging of the built objects. | |
47 | ### | 47 | ### | |
48 | _REAL_PACKAGE_TARGETS+= package-message | 48 | _REAL_PACKAGE_TARGETS+= package-message |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: patch.mk,v 1.18 2009/03/17 21:43:54 rillig Exp $ | 1 | # $NetBSD: patch.mk,v 1.19 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # The following variables may be set in a package Makefile and control | 3 | # The following variables may be set in a package Makefile and control | |
4 | # how pkgsrc patches are applied. | 4 | # how pkgsrc patches are applied. | |
5 | # | 5 | # | |
6 | # PATCH_STRIP is a patch(1) argument that sets the pathname strip | 6 | # PATCH_STRIP is a patch(1) argument that sets the pathname strip | |
7 | # count to help find the correct files to patch. See the patch(1) | 7 | # count to help find the correct files to patch. See the patch(1) | |
8 | # man page for more details. Defaults to "-p0". | 8 | # man page for more details. Defaults to "-p0". | |
9 | # | 9 | # | |
10 | # PATCH_ARGS is the base set of arguments passed to patch(1). | 10 | # PATCH_ARGS is the base set of arguments passed to patch(1). | |
11 | # The default set of arguments will apply the patches to the | 11 | # The default set of arguments will apply the patches to the | |
12 | # files in ${WRKSRC} with any ${PATCH_STRIP} arguments set. | 12 | # files in ${WRKSRC} with any ${PATCH_STRIP} arguments set. | |
13 | # | 13 | # | |
14 | # The following variables may be set in a package Makefile and control | 14 | # The following variables may be set in a package Makefile and control | |
@@ -56,41 +56,41 @@ _COOKIE.patch= ${WRKDIR}/.patch_done | @@ -56,41 +56,41 @@ _COOKIE.patch= ${WRKDIR}/.patch_done | |||
56 | ### patch (PUBLIC) | 56 | ### patch (PUBLIC) | |
57 | ###################################################################### | 57 | ###################################################################### | |
58 | ### patch is a public target to apply the distribution and pkgsrc | 58 | ### patch is a public target to apply the distribution and pkgsrc | |
59 | ### patches to the extracted sources for the package. | 59 | ### patches to the extracted sources for the package. | |
60 | ### | 60 | ### | |
61 | _PATCH_TARGETS+= check-vulnerable | 61 | _PATCH_TARGETS+= check-vulnerable | |
62 | _PATCH_TARGETS+= extract | 62 | _PATCH_TARGETS+= extract | |
63 | _PATCH_TARGETS+= acquire-patch-lock | 63 | _PATCH_TARGETS+= acquire-patch-lock | |
64 | _PATCH_TARGETS+= ${_COOKIE.patch} | 64 | _PATCH_TARGETS+= ${_COOKIE.patch} | |
65 | _PATCH_TARGETS+= release-patch-lock | 65 | _PATCH_TARGETS+= release-patch-lock | |
66 | 66 | |||
67 | .PHONY: patch | 67 | .PHONY: patch | |
68 | .if !target(patch) | 68 | .if !target(patch) | |
69 | . if exists(${_COOKIE.patch}) | 69 | . if exists(${_COOKIE.patch}) && !${_CLEANING} | |
70 | patch: | 70 | patch: | |
71 | @${DO_NADA} | 71 | @${DO_NADA} | |
72 | . elif defined(_PKGSRC_BARRIER) | 72 | . elif defined(_PKGSRC_BARRIER) | |
73 | patch: ${_PATCH_TARGETS} | 73 | patch: ${_PATCH_TARGETS} | |
74 | . else | 74 | . else | |
75 | patch: barrier | 75 | patch: barrier | |
76 | . endif | 76 | . endif | |
77 | .endif | 77 | .endif | |
78 | 78 | |||
79 | .PHONY: acquire-patch-lock release-patch-lock | 79 | .PHONY: acquire-patch-lock release-patch-lock | |
80 | acquire-patch-lock: acquire-lock | 80 | acquire-patch-lock: acquire-lock | |
81 | release-patch-lock: release-lock | 81 | release-patch-lock: release-lock | |
82 | 82 | |||
83 | .if exists(${_COOKIE.patch}) | 83 | .if exists(${_COOKIE.patch}) && !${_CLEANING} | |
84 | ${_COOKIE.patch}: | 84 | ${_COOKIE.patch}: | |
85 | @${DO_NADA} | 85 | @${DO_NADA} | |
86 | .else | 86 | .else | |
87 | ${_COOKIE.patch}: real-patch | 87 | ${_COOKIE.patch}: real-patch | |
88 | .endif | 88 | .endif | |
89 | 89 | |||
90 | ###################################################################### | 90 | ###################################################################### | |
91 | ### real-patch (PRIVATE) | 91 | ### real-patch (PRIVATE) | |
92 | ###################################################################### | 92 | ###################################################################### | |
93 | ### real-patch is a helper target onto which one can hook all of the | 93 | ### real-patch is a helper target onto which one can hook all of the | |
94 | ### targets that do the actual patching work. | 94 | ### targets that do the actual patching work. | |
95 | ### | 95 | ### | |
96 | _REAL_PATCH_TARGETS+= patch-message | 96 | _REAL_PATCH_TARGETS+= patch-message |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.tools.mk,v 1.58 2019/03/22 16:17:50 rillig Exp $ | 1 | # $NetBSD: bsd.tools.mk,v 1.59 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. | 3 | # Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. | |
4 | # All rights reserved. | 4 | # All rights reserved. | |
5 | # | 5 | # | |
6 | # This code is derived from software contributed to The NetBSD Foundation | 6 | # This code is derived from software contributed to The NetBSD Foundation | |
7 | # by Johnny C. Lam. | 7 | # by Johnny C. Lam. | |
8 | # | 8 | # | |
9 | # Redistribution and use in source and binary forms, with or without | 9 | # Redistribution and use in source and binary forms, with or without | |
10 | # modification, are permitted provided that the following conditions | 10 | # modification, are permitted provided that the following conditions | |
11 | # are met: | 11 | # are met: | |
12 | # 1. Redistributions of source code must retain the above copyright | 12 | # 1. Redistributions of source code must retain the above copyright | |
13 | # notice, this list of conditions and the following disclaimer. | 13 | # notice, this list of conditions and the following disclaimer. | |
14 | # 2. Redistributions in binary form must reproduce the above copyright | 14 | # 2. Redistributions in binary form must reproduce the above copyright | |
@@ -52,41 +52,41 @@ _COOKIE.tools= ${WRKDIR}/.tools_done | @@ -52,41 +52,41 @@ _COOKIE.tools= ${WRKDIR}/.tools_done | |||
52 | ###################################################################### | 52 | ###################################################################### | |
53 | ### tools (PUBLIC) | 53 | ### tools (PUBLIC) | |
54 | ###################################################################### | 54 | ###################################################################### | |
55 | ### tools is a public target to create a private directory of tools | 55 | ### tools is a public target to create a private directory of tools | |
56 | ### specified by USE_TOOLS. | 56 | ### specified by USE_TOOLS. | |
57 | ### | 57 | ### | |
58 | _TOOLS_TARGETS+= check-vulnerable | 58 | _TOOLS_TARGETS+= check-vulnerable | |
59 | _TOOLS_TARGETS+= acquire-tools-lock | 59 | _TOOLS_TARGETS+= acquire-tools-lock | |
60 | _TOOLS_TARGETS+= ${_COOKIE.tools} | 60 | _TOOLS_TARGETS+= ${_COOKIE.tools} | |
61 | _TOOLS_TARGETS+= release-tools-lock | 61 | _TOOLS_TARGETS+= release-tools-lock | |
62 | 62 | |||
63 | .PHONY: tools | 63 | .PHONY: tools | |
64 | .if !target(tools) | 64 | .if !target(tools) | |
65 | . if exists(${_COOKIE.tools}) | 65 | . if exists(${_COOKIE.tools}) && !${_CLEANING} | |
66 | tools: | 66 | tools: | |
67 | @${DO_NADA} | 67 | @${DO_NADA} | |
68 | . elif defined(_PKGSRC_BARRIER) | 68 | . elif defined(_PKGSRC_BARRIER) | |
69 | tools: ${_TOOLS_TARGETS} | 69 | tools: ${_TOOLS_TARGETS} | |
70 | . else | 70 | . else | |
71 | tools: barrier | 71 | tools: barrier | |
72 | . endif | 72 | . endif | |
73 | .endif | 73 | .endif | |
74 | 74 | |||
75 | .PHONY: acquire-tools-lock release-tools-lock | 75 | .PHONY: acquire-tools-lock release-tools-lock | |
76 | acquire-tools-lock: acquire-lock | 76 | acquire-tools-lock: acquire-lock | |
77 | release-tools-lock: release-lock | 77 | release-tools-lock: release-lock | |
78 | 78 | |||
79 | .if exists(${_COOKIE.tools}) | 79 | .if exists(${_COOKIE.tools}) && !${_CLEANING} | |
80 | ${_COOKIE.tools}: | 80 | ${_COOKIE.tools}: | |
81 | @${DO_NADA} | 81 | @${DO_NADA} | |
82 | .else | 82 | .else | |
83 | ${_COOKIE.tools}: real-tools | 83 | ${_COOKIE.tools}: real-tools | |
84 | .endif | 84 | .endif | |
85 | 85 | |||
86 | ###################################################################### | 86 | ###################################################################### | |
87 | ### real-tools (PRIVATE) | 87 | ### real-tools (PRIVATE) | |
88 | ###################################################################### | 88 | ###################################################################### | |
89 | ### real-tools is a helper target onto which one can hook all of the | 89 | ### real-tools is a helper target onto which one can hook all of the | |
90 | ### targets that do the actual tool creation. | 90 | ### targets that do the actual tool creation. | |
91 | ### | 91 | ### | |
92 | _REAL_TOOLS_TARGETS+= tools-message | 92 | _REAL_TOOLS_TARGETS+= tools-message |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.wrapper.mk,v 1.100 2018/08/22 20:48:37 maya Exp $ | 1 | # $NetBSD: bsd.wrapper.mk,v 1.101 2019/05/07 19:36:44 rillig Exp $ | |
2 | # | 2 | # | |
3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | 3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | |
4 | # All rights reserved. | 4 | # All rights reserved. | |
5 | # | 5 | # | |
6 | # This code is derived from software contributed to The NetBSD Foundation | 6 | # This code is derived from software contributed to The NetBSD Foundation | |
7 | # by Johnny C. Lam. | 7 | # by Johnny C. Lam. | |
8 | # | 8 | # | |
9 | # Redistribution and use in source and binary forms, with or without | 9 | # Redistribution and use in source and binary forms, with or without | |
10 | # modification, are permitted provided that the following conditions | 10 | # modification, are permitted provided that the following conditions | |
11 | # are met: | 11 | # are met: | |
12 | # 1. Redistributions of source code must retain the above copyright | 12 | # 1. Redistributions of source code must retain the above copyright | |
13 | # notice, this list of conditions and the following disclaimer. | 13 | # notice, this list of conditions and the following disclaimer. | |
14 | # 2. Redistributions in binary form must reproduce the above copyright | 14 | # 2. Redistributions in binary form must reproduce the above copyright | |
@@ -44,27 +44,27 @@ | @@ -44,27 +44,27 @@ | |||
44 | 44 | |||
45 | .PHONY: generate-wrappers | 45 | .PHONY: generate-wrappers | |
46 | 46 | |||
47 | .include "../../mk/buildlink3/bsd.buildlink3.mk" | 47 | .include "../../mk/buildlink3/bsd.buildlink3.mk" | |
48 | 48 | |||
49 | # Prepend ${WRAPPER_BINDIR} to the PATH so that the wrappers are found | 49 | # Prepend ${WRAPPER_BINDIR} to the PATH so that the wrappers are found | |
50 | # first when searching for executables. | 50 | # first when searching for executables. | |
51 | # | 51 | # | |
52 | PREPEND_PATH+= ${WRAPPER_BINDIR} | 52 | PREPEND_PATH+= ${WRAPPER_BINDIR} | |
53 | 53 | |||
54 | ### | 54 | ### | |
55 | ### BEGIN: after the barrier | 55 | ### BEGIN: after the barrier | |
56 | ### | 56 | ### | |
57 | .if exists(${_COOKIE.barrier}) | 57 | .if exists(${_COOKIE.barrier}) && !${_CLEANING} | |
58 | 58 | |||
59 | _WRAPPER_DEBUG?= no | 59 | _WRAPPER_DEBUG?= no | |
60 | CONFIGURE_ENV+= WRAPPER_DEBUG=${_WRAPPER_DEBUG:Q} | 60 | CONFIGURE_ENV+= WRAPPER_DEBUG=${_WRAPPER_DEBUG:Q} | |
61 | MAKE_ENV+= WRAPPER_DEBUG=${_WRAPPER_DEBUG:Q} | 61 | MAKE_ENV+= WRAPPER_DEBUG=${_WRAPPER_DEBUG:Q} | |
62 | SCRIPTS_ENV+= WRAPPER_DEBUG="${_WRAPPER_DEBUG}" | 62 | SCRIPTS_ENV+= WRAPPER_DEBUG="${_WRAPPER_DEBUG}" | |
63 | 63 | |||
64 | # The caching code, which greatly speeds up the build process, doesn't | 64 | # The caching code, which greatly speeds up the build process, doesn't | |
65 | # work correctly on certain platforms. | 65 | # work correctly on certain platforms. | |
66 | # | 66 | # | |
67 | _WRAP_BROKEN_CACHE= Darwin-5.*-* | 67 | _WRAP_BROKEN_CACHE= Darwin-5.*-* | |
68 | 68 | |||
69 | .if !defined(WRAPPER_UPDATE_CACHE) | 69 | .if !defined(WRAPPER_UPDATE_CACHE) | |
70 | WRAPPER_UPDATE_CACHE?= yes | 70 | WRAPPER_UPDATE_CACHE?= yes | |
@@ -698,41 +698,41 @@ _SUBST_KEEP.unwrap= ${CP} -f "$$file" "$ | @@ -698,41 +698,41 @@ _SUBST_KEEP.unwrap= ${CP} -f "$$file" "$ | |||
698 | .endif | 698 | .endif | |
699 | ### | 699 | ### | |
700 | ### END: after the barrier | 700 | ### END: after the barrier | |
701 | ### | 701 | ### | |
702 | 702 | |||
703 | ###################################################################### | 703 | ###################################################################### | |
704 | ###################################################################### | 704 | ###################################################################### | |
705 | ###################################################################### | 705 | ###################################################################### | |
706 | 706 | |||
707 | _COOKIE.wrapper= ${WRKDIR}/.wrapper_done | 707 | _COOKIE.wrapper= ${WRKDIR}/.wrapper_done | |
708 | 708 | |||
709 | .PHONY: wrapper | 709 | .PHONY: wrapper | |
710 | .if !target(wrapper) | 710 | .if !target(wrapper) | |
711 | . if exists(${_COOKIE.wrapper}) | 711 | . if exists(${_COOKIE.wrapper}) && !${_CLEANING} | |
712 | wrapper: | 712 | wrapper: | |
713 | @${DO_NADA} | 713 | @${DO_NADA} | |
714 | . elif defined(_PKGSRC_BARRIER) | 714 | . elif defined(_PKGSRC_BARRIER) | |
715 | wrapper: check-vulnerable patch acquire-wrapper-lock ${_COOKIE.wrapper} release-wrapper-lock | 715 | wrapper: check-vulnerable patch acquire-wrapper-lock ${_COOKIE.wrapper} release-wrapper-lock | |
716 | . else | 716 | . else | |
717 | wrapper: barrier | 717 | wrapper: barrier | |
718 | . endif | 718 | . endif | |
719 | .endif | 719 | .endif | |
720 | 720 | |||
721 | .PHONY: acquire-wrapper-lock release-wrapper-lock | 721 | .PHONY: acquire-wrapper-lock release-wrapper-lock | |
722 | acquire-wrapper-lock: acquire-lock | 722 | acquire-wrapper-lock: acquire-lock | |
723 | release-wrapper-lock: release-lock | 723 | release-wrapper-lock: release-lock | |
724 | 724 | |||
725 | .if exists(${_COOKIE.wrapper}) | 725 | .if exists(${_COOKIE.wrapper}) && !${_CLEANING} | |
726 | ${_COOKIE.wrapper}: | 726 | ${_COOKIE.wrapper}: | |
727 | @${DO_NADA} | 727 | @${DO_NADA} | |
728 | .else | 728 | .else | |
729 | ${_COOKIE.wrapper}: real-wrapper | 729 | ${_COOKIE.wrapper}: real-wrapper | |
730 | .endif | 730 | .endif | |
731 | 731 | |||
732 | .PHONY: real-wrapper | 732 | .PHONY: real-wrapper | |
733 | real-wrapper: wrapper-message wrapper-vars pre-wrapper do-wrapper post-wrapper wrapper-cookie error-check | 733 | real-wrapper: wrapper-message wrapper-vars pre-wrapper do-wrapper post-wrapper wrapper-cookie error-check | |
734 | 734 | |||
735 | .PHONY: wrapper-message | 735 | .PHONY: wrapper-message | |
736 | wrapper-message: | 736 | wrapper-message: | |
737 | @${PHASE_MSG} "Creating toolchain wrappers for ${PKGNAME}" | 737 | @${PHASE_MSG} "Creating toolchain wrappers for ${PKGNAME}" | |
738 | 738 |