Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/bsd.port.mk
| Show First 20 Lines • Show All 699 Lines • ▼ Show 20 Lines | |||||
| # | # | ||||
| # check-sanity fetch checksum extract patch configure build | # check-sanity fetch checksum extract patch configure build | ||||
| # | # | ||||
| # Please read the comments in the targets section below; you | # Please read the comments in the targets section below; you | ||||
| # should be able to use the pre-* or post-* targets/scripts | # should be able to use the pre-* or post-* targets/scripts | ||||
| # (which are available for every stage except checksum) or | # (which are available for every stage except checksum) or | ||||
| # override the do-* targets to do pretty much anything you want. | # override the do-* targets to do pretty much anything you want. | ||||
| # | # | ||||
| # The TARGET_ORDER_OVERRIDE variable can be set to multiple <priority>:<target> | |||||
| # to change the ordering of targets, have a look at the _SEQ variables at the | |||||
| # end of this file for the default order and priorities. | |||||
| # | |||||
| # NEVER override the "regular" targets unless you want to open | # NEVER override the "regular" targets unless you want to open | ||||
| # a major can of worms. | # a major can of worms. | ||||
| # | # | ||||
| # Set these variables if your port doesn't need some of the steps. | # Set these variables if your port doesn't need some of the steps. | ||||
| # Note that there are no NO_PATCH or NO_CONFIGURE variables because | # Note that there are no NO_PATCH or NO_CONFIGURE variables because | ||||
| # those steps are empty by default. NO_EXTRACT is not allowed anymore | # those steps are empty by default. NO_EXTRACT is not allowed anymore | ||||
| # since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user | # since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user | ||||
| # variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. | # variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. | ||||
| ▲ Show 20 Lines • Show All 706 Lines • ▼ Show 20 Lines | |||||
| .endif | .endif | ||||
| .if !defined(UID) | .if !defined(UID) | ||||
| UID!= ${ID} -u | UID!= ${ID} -u | ||||
| .endif | .endif | ||||
| DESTDIRNAME?= DESTDIR | DESTDIRNAME?= DESTDIR | ||||
| # setup empty variables for USES targets | |||||
| .for target in sanity fetch extract patch configure build install package stage | |||||
| _USES_${target}?= | |||||
| .endfor | |||||
| # Loading features | # Loading features | ||||
| .for f in ${USES} | .for f in ${USES} | ||||
| _f:= ${f:C/\:.*//} | _f:= ${f:C/\:.*//} | ||||
| .if !defined(${_f}_ARGS) | .if !defined(${_f}_ARGS) | ||||
| ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} | ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} | ||||
| .endif | .endif | ||||
| .endfor | .endfor | ||||
| .for f in ${USES} | .for f in ${USES} | ||||
| ▲ Show 20 Lines • Show All 4,101 Lines • ▼ Show 20 Lines | |||||
| # Please note that the order of the following targets is important, and | # Please note that the order of the following targets is important, and | ||||
| # should not be modified. | # should not be modified. | ||||
| _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE STAGE | _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE STAGE | ||||
| # Define the SEQ of actions to take when each target is ran, and which targets | # Define the SEQ of actions to take when each target is ran, and which targets | ||||
| # it depends on before running its SEQ. | # it depends on before running its SEQ. | ||||
| # | |||||
| # Main target has a priority of 500, pre-target 300, post-target 700, | |||||
| # target-depends 150. Other targets are spaced in between those | |||||
| # | |||||
| # If you change the pre-foo and post-foo values here, go and keep them in sync | |||||
| # in _OPTIONS_TARGETS in bsd.options.mk | |||||
| _SANITY_SEQ= post-chroot pre-everything check-makefile \ | _SANITY_SEQ= 050:post-chroot 100:pre-everything 150:check-makefile \ | ||||
| show-warnings show-dev-warnings show-dev-errors \ | 200:show-warnings 210:show-dev-warnings 220:show-dev-errors \ | ||||
| check-categories check-makevars check-desktop-entries \ | 250:check-categories 300:check-makevars \ | ||||
| check-depends identify-install-conflicts check-deprecated \ | 350:check-desktop-entries 400:check-depends \ | ||||
| check-vulnerable check-license check-config buildanyway-message \ | 450:identify-install-conflicts 500:check-deprecated \ | ||||
| options-message | 550:check-vulnerable 600:check-license 650:check-config \ | ||||
| 700:buildanyway-message 750:options-message ${_USES_sanity} | |||||
| _PKG_DEP= check-sanity | _PKG_DEP= check-sanity | ||||
| _PKG_SEQ= pkg-depends | _PKG_SEQ= 500:pkg-depends | ||||
| _FETCH_DEP= pkg | _FETCH_DEP= pkg | ||||
| _FETCH_SEQ= fetch-depends pre-fetch ${_OPTIONS_pre_fetch} pre-fetch-script \ | _FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ | ||||
| do-fetch fetch-specials post-fetch ${_OPTIONS_post_fetch} post-fetch-script | 500:do-fetch 550:fetch-specials 700:post-fetch \ | ||||
| 850:post-fetch-script \ | |||||
| ${_OPTIONS_fetch} ${_USES_fetch} | |||||
| _EXTRACT_DEP= fetch | _EXTRACT_DEP= fetch | ||||
| _EXTRACT_SEQ= check-build-conflicts extract-message checksum extract-depends \ | _EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ | ||||
| clean-wrkdir ${WRKDIR} pre-extract ${_OPTIONS_pre_extract} pre-extract-script do-extract \ | 150:extract-depends 190:clean-wrkdir 200:${WRKDIR} \ | ||||
| post-extract ${_OPTIONS_post_extract} post-extract-script | 300:pre-extract 450:pre-extract-script 500:do-extract \ | ||||
| 700:post-extract 850:post-extract-script \ | |||||
| ${_OPTIONS_extract} ${_USES_extract} | |||||
| _PATCH_DEP= extract | _PATCH_DEP= extract | ||||
| _PATCH_SEQ= ask-license patch-message patch-depends pathfix dos2unix fix-shebang \ | _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ | ||||
| pre-patch ${_OPTIONS_pre_patch} \ | 300:pre-patch 450:pre-patch-script 500:do-patch \ | ||||
| pre-patch-script do-patch charsetfix-post-patch post-patch ${_OPTIONS_post_patch} post-patch-script | 700:post-patch 850:post-patch-script \ | ||||
| ${_OPTIONS_patch} ${_USES_patch} | |||||
| _CONFIGURE_DEP= patch | _CONFIGURE_DEP= patch | ||||
| _CONFIGURE_SEQ= build-depends lib-depends configure-message \ | _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 200:configure-message \ | ||||
| pre-configure ${_OPTIONS_pre_configure} pre-configure-script \ | 300:pre-configure 450:pre-configure-script 460:run-autotools \ | ||||
| run-autotools do-autoreconf patch-libtool run-autotools-fixup do-configure \ | 490:run-autotools-fixup 500:do-configure 700:post-configure \ | ||||
| post-configure ${_OPTIONS_post_configure} post-configure-script | 850:post-configure-script \ | ||||
| ${_OPTIONS_configure} ${_USES_configure} | |||||
| _BUILD_DEP= configure | _BUILD_DEP= configure | ||||
| _BUILD_SEQ= build-message pre-build ${_OPTIONS_pre_build} pre-build-script do-build \ | _BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ | ||||
| post-build ${_OPTIONS_post_build} post-build-script | 500:do-build 700:post-build 850:post-build-script \ | ||||
| ${_OPTIONS_build} ${_USES_build} | |||||
| _STAGE_DEP= build | _STAGE_DEP= build | ||||
| _STAGE_SEQ= stage-message stage-dir run-depends lib-depends apply-slist pre-install ${_OPTIONS_pre_install} ${_OPTIONS_pre_stage} generate-plist \ | # STAGE is special in its numbering as it has install and stage, so install is | ||||
| pre-su-install | # the main, and stage goes after. | ||||
| # ${POST_PLIST} must be after anything that modifies TMPPLIST | _STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ | ||||
| _STAGE_SEQ+= create-users-groups do-install \ | 151:lib-depends 200:apply-slist 300:pre-install \ | ||||
| kmod-post-install fix-perl-things \ | 400:generate-plist 450:pre-su-install 475:create-users-groups \ | ||||
| webplugin-post-install post-install ${_OPTIONS_post_install} post-install-script \ | 500:do-install 550:kmod-post-install 700:post-install \ | ||||
| move-uniquefiles patch-lafiles post-stage ${_OPTIONS_post_stage} compress-man \ | 750:post-install-script 800:post-stage 850:compress-man \ | ||||
| install-rc-script install-ldconfig-file install-license \ | 860:install-rc-script 870:install-ldconfig-file \ | ||||
| install-desktop-entries add-plist-info add-plist-docs \ | 880:install-license 890:install-desktop-entries \ | ||||
| add-plist-examples add-plist-data add-plist-post \ | 900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ | ||||
| move-uniquefiles-plist ${POST_PLIST} | 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ | ||||
| ${_OPTIONS_install} ${_USES_install} \ | |||||
| ${_OPTIONS_stage} ${_USES_stage} | |||||
| .if defined(DEVELOPER) | .if defined(DEVELOPER) | ||||
| _STAGE_SEQ+= stage-qa | _STAGE_SEQ+= 995:stage-qa | ||||
| .endif | .endif | ||||
| _INSTALL_DEP= stage | _INSTALL_DEP= stage | ||||
| _INSTALL_SEQ= install-message run-depends lib-depends check-already-installed | _INSTALL_SEQ= 100:install-message 150:run-depends 151:lib-depends \ | ||||
| _INSTALL_SUSEQ= fake-pkg security-check | 200:check-already-installed | ||||
| _INSTALL_SUSEQ= 300:fake-pkg 500:security-check | |||||
| _PACKAGE_DEP= stage | _PACKAGE_DEP= stage | ||||
| _PACKAGE_SEQ= package-message pre-package ${_OPTIONS_pre_package} pre-package-script do-package ${_OPTIONS_post_package} post-package-script | _PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ | ||||
| 500:do-package 850:post-package-script \ | |||||
| ${_OPTIONS_package} ${_USES_package} | |||||
| # Enforce order for -jN builds | # Enforce order for -jN builds | ||||
| .for _t in ${_TARGETS_STAGES} | .for _t in ${_TARGETS_STAGES} | ||||
| . for s in ${_${_t}_SEQ} | # Check if the port need to change the default order of some targets... | ||||
| . if defined(TARGET_ORDER_OVERRIDE) | |||||
| _tmp_seq:= | |||||
| . for _entry in ${_${_t}_SEQ} | |||||
| # for _target because :M${_target} does not work with fmake | |||||
| . for _target in ${_entry:C/^[0-9]+://} | |||||
| . if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} | |||||
| _tmp_seq:= ${_tmp_seq} ${TARGET_ORDER_OVERRIDE:M*\:${_target}} | |||||
| . else | |||||
| _tmp_seq:= ${_tmp_seq} ${_entry} | |||||
| . endif | |||||
| . endfor | |||||
| . endfor | |||||
| _${_t}_SEQ:= ${_tmp_seq} | |||||
| . endif | |||||
| . for s in ${_${_t}_SEQ:O:C/^[0-9]+://} | |||||
| . if target(${s}) | . if target(${s}) | ||||
| . if ! ${NOTPHONY:M${s}} | . if ! ${NOTPHONY:M${s}} | ||||
| _PHONY_TARGETS+= ${s} | _PHONY_TARGETS+= ${s} | ||||
| . endif | . endif | ||||
| _${_t}_REAL_SEQ+= ${s} | _${_t}_REAL_SEQ+= ${s} | ||||
| . endif | . endif | ||||
| . endfor | . endfor | ||||
| . for s in ${_${_t}_SUSEQ} | . for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} | ||||
| . if target(${s}) | . if target(${s}) | ||||
| . if ! ${NOTPHONY:M${s}} | . if ! ${NOTPHONY:M${s}} | ||||
| _PHONY_TARGETS+= ${s} | _PHONY_TARGETS+= ${s} | ||||
| . endif | . endif | ||||
| _${_t}_REAL_SUSEQ+= ${s} | _${_t}_REAL_SUSEQ+= ${s} | ||||
| . endif | . endif | ||||
| . endfor | . endfor | ||||
| .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} | .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} | ||||
| ▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines | |||||