1 # Autogenerated -- Do not edit!
2 # This is the final logic which controls the build sequence.
3 # This is very similar to FreeBSD Ports Collection sequence logic.
5 # The order of _TARGET_STAGES is signficant.
6 # Consider returning SANITY stage if required
8 _TARGETS_STAGES= FETCH EXTRACT PATCH CONFIGURE BUILD STAGE TEST
10 # --------------------------------------------------------------------------
11 # -- Sequence definition
12 # --------------------------------------------------------------------------
14 # Define the SEQ of actions to take when each target is run, and which targets
15 # they depend on before executing its SEQ.
17 # The main target has a priority of 500, pre-target priority is 300,
18 # post-target priority is 700, and target-depends has a priority of 150.
19 # The remaining targets are slotted according to sequence requirements.
21 _FETCH_DEP= # none currently
22 _FETCH_SEQ= 100:fetch-message \
24 350:pre-fetch-option \
26 450:pre-fetch-script \
31 750:post-fetch-option \
32 800:post-fetch-opsys \
33 850:post-fetch-script \
37 _EXTRACT_SEQ= 100:extract-message \
41 250:create-extract-dirs \
43 350:pre-extract-option \
44 400:pre-extract-opsys \
45 450:pre-extract-script \
47 525:do-extract-option \
48 550:do-extract-opsys \
50 576:github-relocation \
51 577:crate-relocation \
53 625:extract-licenses \
54 650:compile-package-desc \
56 750:post-extract-option \
57 800:post-extract-opsys \
58 850:post-extract-script \
59 999:extract-fixup-modes \
64 _PATCH_SEQ= 100:patch-message \
66 350:pre-patch-option \
68 450:pre-patch-script \
73 750:post-patch-option \
74 800:post-patch-opsys \
75 850:post-patch-script \
79 _CONFIGURE_SEQ= 200:configure-message \
81 350:pre-configure-option \
82 400:pre-configure-opsys \
83 450:pre-configure-script \
85 525:do-configure-option \
86 550:do-configure-opsys \
88 750:post-configure-option \
89 800:post-configure-opsys \
90 850:post-configure-script \
94 _BUILD_SEQ= 100:build-message \
96 350:pre-build-option \
98 450:pre-build-script \
100 525:do-build-option \
103 750:post-build-option \
104 800:post-build-opsys \
105 850:post-build-script \
108 # STAGE is special in its numbering as it has install and stage,
109 # so install is the main, and stage goes after.
111 # Some ports use the compiler and binutils in stage, which means
112 # they are still building when they should be installing. To force
113 # correctness, provide an alternative sequence where pre-install
114 # and do-install are done during the build stage.
116 .if defined(INSTALL_REQ_TOOLCHAIN)
117 _BUILD_SEQ+= 852:stage-dir \
119 856:pre-install-option \
120 858:pre-install-opsys \
122 862:create-users-groups \
124 866:do-install-option \
129 _STAGE_SEQ= 100:stage-message
130 .if !defined(INSTALL_REQ_TOOLCHAIN)
131 _STAGE_SEQ+= 200:stage-dir \
133 325:pre-install-option \
134 350:pre-install-opsys \
136 450:create-users-groups \
138 525:do-install-option \
141 _STAGE_SEQ+= 700:post-install \
142 725:post-install-option \
143 750:post-install-opsys \
144 775:post-install-script \
146 820:post-stage-option \
147 840:post-stage-opsys \
149 860:install-rc-script \
150 870:install-smf-manifest \
151 880:install-license \
152 890:install-desktop-entries \
155 920:add-plist-examples \
157 930:add-plist-licenses \
159 ${POST_PLIST_TARGET:C/^/990:/} \
165 _TEST_SEQ= 100:test-message \
167 325:pre-test-option \
173 750:post-test-option \
174 800:post-test-opsys \
177 # --------------------------------------------------------------------------
179 # --------------------------------------------------------------------------
181 # Enforce order for -jN builds
182 .for _t in ${_TARGETS_STAGES}
183 . for s in ${_${_t}_SEQ:O:C/^[0-9]+://}
185 _PHONY_TARGETS+= ${s}
186 _${_t}_REAL_SEQ+= ${s}
189 .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ}
192 # --------------------------------------------------------------------------
193 # -- pre-* and post-script targets
194 # --------------------------------------------------------------------------
196 .for subphase in pre post
197 . for name in fetch extract patch configure build install
198 . if exists(${SCRIPTDIR}/${subphase}-${name})
199 . if !target(${subphase}-${name}-script)
200 ${subphase}-${name}-script:
201 @cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} \
202 ${SH} ${SCRIPTDIR}/${subphase}-${name}
208 # --------------------------------------------------------------------------
209 # -- Phase target definition
210 # --------------------------------------------------------------------------
212 # Define all of the main targets which depend on a sequence of other targets.
213 # See above *_SEQ and *_DEP. The _DEP will run before this defined target is
214 # ran. The _SEQ will run as this target once _DEP is satisfied.
216 # Names of cookies used to skip already completed stages
218 EXTRACT_COOKIE= ${WRKDIR}/.done_extract
219 PATCH_COOKIE= ${WRKDIR}/.done_patch
220 CONFIGURE_COOKIE= ${WRKDIR}/.done_configure
221 BUILD_COOKIE= ${WRKDIR}/.done_build
222 STAGE_COOKIE= ${WRKDIR}/.done_stage
225 .if defined(NO_BUILD)
227 @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE}
236 .for target in extract patch configure build stage
238 . if !target(${target})
239 _PHONY_TARGETS+= ${target}
240 ${target}: ${${target:tu}_COOKIE}
243 . if exists(${${target:tu}_COOKIE})
244 ${${target:tu}_COOKIE}::
245 @if [ -e ${.TARGET} ]; then \
248 cd ${.CURDIR} && ${MAKE} ${.TARGET}; \
251 ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ}
252 @${TOUCH} -f ${.TARGET}
255 .endfor # foreach(targets)
257 .for target in fetch test
258 . if !target(${target})
259 _PHONY_TARGETS+= ${target}
260 ${target}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ}
264 .PHONY: ${_PHONY_TARGETS}
266 # --------------------------------------------------------------------------
268 # --------------------------------------------------------------------------
272 @${RM} -r ${STAGEDIR} ${STAGE_COOKIE} ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
273 @cd ${.CURDIR} && ${MAKE} stage