aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-08-17 13:31:25 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-08-17 13:31:25 +0000
commite8796ef61223223030544d2fe1b51be11e5e648b (patch)
tree15b8ce30f8e7f1a99871e40ce43b8bd49254597d /Mk
parent37e858edd18cfdef0c487e4ed9d4a989c8972609 (diff)
downloadports-e8796ef61223223030544d2fe1b51be11e5e648b.tar.gz
ports-e8796ef61223223030544d2fe1b51be11e5e648b.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/autoreconf.mk1
-rw-r--r--Mk/Uses/charsetfix.mk1
-rw-r--r--Mk/Uses/cran.mk5
-rw-r--r--Mk/Uses/display.mk6
-rw-r--r--Mk/Uses/dos2unix.mk1
-rw-r--r--Mk/Uses/erlang.mk21
-rw-r--r--Mk/Uses/kmod.mk2
-rw-r--r--Mk/Uses/libtool.mk2
-rw-r--r--Mk/Uses/ncurses.mk3
-rw-r--r--Mk/Uses/pathfix.mk1
-rw-r--r--Mk/Uses/perl5.mk1
-rw-r--r--Mk/Uses/shebangfix.mk1
-rw-r--r--Mk/Uses/uniquefiles.mk2
-rw-r--r--Mk/Uses/webplugin.mk1
-rw-r--r--Mk/Uses/zope.mk3
-rw-r--r--Mk/bsd.options.mk31
-rw-r--r--Mk/bsd.port.mk121
17 files changed, 127 insertions, 76 deletions
diff --git a/Mk/Uses/autoreconf.mk b/Mk/Uses/autoreconf.mk
index 5cb691805dd4..de92a6788f61 100644
--- a/Mk/Uses/autoreconf.mk
+++ b/Mk/Uses/autoreconf.mk
@@ -70,6 +70,7 @@ BUILD_DEPENDS+= libtoolize:${PORTSDIR}/devel/libtool
_INCLUDE_USES_AUTORECONF_POST_MK= yes
.if ! ${autoreconf_ARGS:Mbuild}
+_USES_configure+= 470:do-autoreconf
do-autoreconf:
.for f in AUTHORS ChangeLog INSTALL NEWS README
# Don't modify time stamps if the files already exist
diff --git a/Mk/Uses/charsetfix.mk b/Mk/Uses/charsetfix.mk
index 33c4f13ab806..7f99da0e6c3d 100644
--- a/Mk/Uses/charsetfix.mk
+++ b/Mk/Uses/charsetfix.mk
@@ -17,6 +17,7 @@ IGNORE= USES=charsetfix does not require args
CHARSETFIX_MAKEFILEIN?= Makefile.in
+_USES_patch+= 600:charsetfix-post-patch
charsetfix-post-patch:
@${FIND} ${WRKSRC} -name "${CHARSETFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} \
-e 's|need_charset_alias=true|need_charset_alias=false|g ; \
diff --git a/Mk/Uses/cran.mk b/Mk/Uses/cran.mk
index 350a23001876..dd6006409330 100644
--- a/Mk/Uses/cran.mk
+++ b/Mk/Uses/cran.mk
@@ -70,11 +70,10 @@ do-install:
.endif
.if ${cran_ARGS:Mauto-plist}
-.if !target(post-install-script)
-post-install-script:
+_USES_install+= 750:cran-auto-plist
+cran-auto-plist:
@${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \
${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST}
.endif
-.endif
.endif #_INCLUDE_USES_CRAN_MK
diff --git a/Mk/Uses/display.mk b/Mk/Uses/display.mk
index b3aec5a49f33..de7e1bc42b29 100644
--- a/Mk/Uses/display.mk
+++ b/Mk/Uses/display.mk
@@ -26,11 +26,7 @@ XVFBPORT!= port=0; while test -S /tmp/.X11-unix/X$${port} ; do port=$$(( port +
XVFBPIDFILE= /tmp/.xvfb-${XVFBPORT}.pid
MAKE_ENV+= DISPLAY=":${XVFBPORT}"
-.PHONY: start-display stop-display
-pre-${display_ARGS}: start-display
-
-post-${display_ARGS}: stop-display
-
+_USES_${display_ARGS}+= 290:start-display 860:stop-display
start-display:
daemon -p ${XVFBPIDFILE} Xvfb :${XVFBPORT}
diff --git a/Mk/Uses/dos2unix.mk b/Mk/Uses/dos2unix.mk
index a6c9994cdb15..7a5e83ea7e98 100644
--- a/Mk/Uses/dos2unix.mk
+++ b/Mk/Uses/dos2unix.mk
@@ -15,6 +15,7 @@ _INCLUDE_USES_DOS2UNIX_MK= yes
_DOS2UNIX_ALL= yes
.endif
+_USES_patch+= 200:dos2unix
dos2unix:
@${ECHO_MSG} "===> Converting DOS text files to UNIX text files"
.if defined(_DOS2UNIX_ALL)
diff --git a/Mk/Uses/erlang.mk b/Mk/Uses/erlang.mk
index ac22d99da6da..c81499e4edfd 100644
--- a/Mk/Uses/erlang.mk
+++ b/Mk/Uses/erlang.mk
@@ -65,18 +65,7 @@ ERLANG_COMPILE= ${REBAR_CMD}
ERLANG_COMPILE= ${REBAR3_CMD}
.endif
-.if !target(post-patch)
-post-patch: post-patch-erlang
-.endif
-
-.if !target(do-build)
-do-build: do-build-erlang
-.endif
-
-.if !target(do-install)
-do-install: do-install-erlang
-.endif
-
+_USES_patch+= 650:post-patch-erlang
post-patch-erlang:
@${FIND} ${WRKSRC} -name .gitignore -delete
# Attempt to remove all traces of {vsn, ....}; replace with actual PORTVERSION
@@ -99,7 +88,8 @@ post-patch-erlang:
fi
@${RM} -f ${WRKSRC}/src/*.orig ${WRKSRC}/include/*.orig
-do-build-erlang:
+.if !target(do-build)
+do-build:
# This will cause calls to local rebar and rebar3 to fail; makes it easier to spot them
@${RM} -f ${WRKSRC}/rebar ${WRKSRC}/rebar3
.for target in ${REBAR_TARGETS}
@@ -107,8 +97,10 @@ do-build-erlang:
@${RM} ${WRKSRC}/rebar.lock
@cd ${WRKSRC} && REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target}
.endfor
+.endif # !target(do-build)
-do-install-erlang:
+.if !target(do-install)
+do-install:
@${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}
@${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/src
cd ${WRKSRC}/src && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/src
@@ -141,5 +133,6 @@ do-install-erlang:
@${MKDIR} ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
.endif
+.endif # !target(do-install)
.endif #!defined(_INCLUDE_USES_ERLANG_MK)
diff --git a/Mk/Uses/kmod.mk b/Mk/Uses/kmod.mk
index ce37c1171842..f9aa4be155fb 100644
--- a/Mk/Uses/kmod.mk
+++ b/Mk/Uses/kmod.mk
@@ -39,7 +39,7 @@ STRIP_CMD+= --strip-debug # do not strip kernel symbols
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_KMOD_POST_MK)
_INCLUDE_USES_KMOD_POST_MK= yes
-pre-install: ${STAGEDIR}${KMODDIR}
+_USES_install+= 290:${STAGEDIR}${KMODDIR}
${STAGEDIR}${KMODDIR}:
@${MKDIR} ${.TARGET}
diff --git a/Mk/Uses/libtool.mk b/Mk/Uses/libtool.mk
index 3149cd75fa31..96596278dc34 100644
--- a/Mk/Uses/libtool.mk
+++ b/Mk/Uses/libtool.mk
@@ -25,6 +25,7 @@ BUILD_DEPENDS+= libtool:${PORTSDIR}/devel/libtool
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK)
_INCLUDE_USES_LIBTOOL_POST_MK= yes
+_USES_configure+= 480:patch-libtool
patch-libtool:
@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \
-type f | while read i; do ${SED} -i.libtool.bak \
@@ -66,6 +67,7 @@ patch-libtool:
-e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \
-e 's/|-p|-pg|/|-B*|-fstack-protector*|-p|-pg|/'
+_USES_stage+= 790:patch-lafiles
patch-lafiles:
.if ${libtool_ARGS:Mkeepla}
@${FIND} ${STAGEDIR} -type f -name '*.la' | \
diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk
index 413a8f8132a9..8e7400160508 100644
--- a/Mk/Uses/ncurses.mk
+++ b/Mk/Uses/ncurses.mk
@@ -39,7 +39,8 @@ NCURSESBASE= /usr
NCURSESINC= ${NCURSESBASE}/include
. if exists(${LOCALBASE}/lib/libncurses.so)
-check-depends::
+_USES_sanity+= 400:check-depends-ncurses
+check-depends-ncurses:
@${ECHO_CMD} "Dependency error: this port wants the ncurses library from the FreeBSD"
@${ECHO_CMD} "base system. You can't build against it, while a newer"
@${ECHO_CMD} "version is installed by a port."
diff --git a/Mk/Uses/pathfix.mk b/Mk/Uses/pathfix.mk
index adc1b8beb2e0..6db22811ffca 100644
--- a/Mk/Uses/pathfix.mk
+++ b/Mk/Uses/pathfix.mk
@@ -18,6 +18,7 @@ IGNORE= USES=pathfix does not require args
PATHFIX_MAKEFILEIN?= Makefile.in
+_USES_patch+= 190:pathfix
pathfix:
@${FIND} ${WRKSRC} -name "${PATHFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \
diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk
index 93d01d041c9d..bb1454ea1ca9 100644
--- a/Mk/Uses/perl5.mk
+++ b/Mk/Uses/perl5.mk
@@ -274,6 +274,7 @@ PACKLIST_DIR?= ${PREFIX}/${SITE_ARCH_REL}/auto
# In all those, don't use - before the command so that the user does
# not wonder what has been ignored by this message "*** Error code 1 (ignored)"
+_USES_install+= 560:fix-perl-things
fix-perl-things:
# Remove STAGEDIR from .packlist and add the file to the plist.
@(if [ -d ${STAGEDIR}${PACKLIST_DIR} ] ; then \
diff --git a/Mk/Uses/shebangfix.mk b/Mk/Uses/shebangfix.mk
index 14443dc32a79..df3634be12df 100644
--- a/Mk/Uses/shebangfix.mk
+++ b/Mk/Uses/shebangfix.mk
@@ -64,6 +64,7 @@ IGNORE+= missing definition for ${lang}_OLD_CMD
_SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${${lang}_OLD_CMD}|\#!${${lang}_CMD}|"
.endfor
+_USES_patch+= 210:fix-shebang
fix-shebang:
@cd ${WRKSRC}; \
${ECHO_CMD} ${SHEBANG_FILES} | ${XARGS} ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS}
diff --git a/Mk/Uses/uniquefiles.mk b/Mk/Uses/uniquefiles.mk
index c29fe9d00678..8285a4fa6d63 100644
--- a/Mk/Uses/uniquefiles.mk
+++ b/Mk/Uses/uniquefiles.mk
@@ -101,6 +101,7 @@ _DO_CONDITIONAL_SYMLINK= \
_DO_CONDITIONAL_SYMLINK= ${DO_NADA}
.endif
+_USES_stage+= 775:move-uniquefiles
move-uniquefiles:
.if ${UNIQUE_PREFIX_FILES} || ${UNIQUE_FIND_PREFIX_FILES}
@${ECHO_MSG} "===> Creating unique files: Move files needing PREFIX";
@@ -166,6 +167,7 @@ move-uniquefiles:
# Using .if exists(${_UNIQUEPKGPLIST} below instead of the sh test
# does not work in poudriere. It works fine on the CLI, though...
+_USES_stage+= 950:move-uniquefiles-plist
move-uniquefiles-plist:
@if [ -e ${_UNIQUEPKGLIST} ]; then \
orgIFS=$$IFS; IFS=":"; while read command entry newentry; do \
diff --git a/Mk/Uses/webplugin.mk b/Mk/Uses/webplugin.mk
index 4108ceccf2a7..0d19b70d8d8e 100644
--- a/Mk/Uses/webplugin.mk
+++ b/Mk/Uses/webplugin.mk
@@ -167,6 +167,7 @@ PLIST_FILES+= ${d}/${l}
.endfor
.endfor
+_USES_install+= 600:webplugin-post-install
webplugin-post-install:
.for d in ${_WEBPLUGIN_LINKFARMS}
${MKDIR} ${STAGEDIR}${d}
diff --git a/Mk/Uses/zope.mk b/Mk/Uses/zope.mk
index b58c8b85eeb4..5165c89abb64 100644
--- a/Mk/Uses/zope.mk
+++ b/Mk/Uses/zope.mk
@@ -79,7 +79,8 @@ IGNORE+= Zope requires Python ${_PYTHON_VER_REQUIRED}.\
.if ${ZOPE_VERSION} == ${_ZOPE_PORTBRANCH}
RUN_DEPENDS+= zope213>0:${PORTSDIR}/www/zope213
.else
-check-makevars::
+_USES_sanity+= 300:check-makevars-zope
+check-makevars-zope:
@${ECHO} "Makefile error: bad value for ZOPE_VERSION: ${ZOPE_VERSION}."
@${ECHO} "Legal values are: ${_ZOPE_PORTBRANCH} (default)"
@${FALSE}
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 71413e6b42ee..7a198af8dd04 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -137,7 +137,16 @@ _OPTIONS_FLAGS= ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \
PATCH_SITES PLIST_DIRS PLIST_DIRSTRY PLIST_FILES PLIST_SUB \
PORTDOCS SUB_FILES SUB_LIST USES
_OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN
-_OPTIONS_TARGETS= fetch extract patch configure build install package stage
+
+# The format here is target_family:priority:target-type
+_OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch:700:post \
+ extract:300:pre extract:500:do extract:700:post \
+ patch:300:pre patch:500:do patch:700:post \
+ configure:300:pre configure:500:do configure:700:post \
+ build:300:pre build:500:do build:700:post \
+ install:300:pre install:500:do install:700:post \
+ package:300:pre package:500:do package:700:post \
+ stage:800:post
# Set the default values for the global options, as defined by portmgr
.if !defined(NOPORTDOCS)
@@ -413,10 +422,8 @@ WITH_DEBUG= yes
ALL_OPTIONS= ${OPTIONS_DEFINE}
.endif
-.for target in ${_OPTIONS_TARGETS}
-.for prepost in pre post
-_OPTIONS_${prepost}_${target}?=
-.endfor
+.for target in ${_OPTIONS_TARGETS:C/:.*//:u}
+_OPTIONS_${target}?=
.endfor
.for opt in ${COMPLETE_OPTIONS_LIST} ${OPTIONS_SLAVE} ${OPTIONS_EXCLUDE_${ARCH}} ${OPTIONS_EXCLUDE}
@@ -473,9 +480,10 @@ ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS}
. endif
. endfor
. for target in ${_OPTIONS_TARGETS}
-. for prepost in pre post
-_OPTIONS_${prepost}_${target}+= ${prepost}-${target}-${opt}-on
-. endfor
+_target= ${target:C/:.*//}
+_prio= ${target:C/.*:(.*):.*/\1/}
+_type= ${target:C/.*://}
+_OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-on
. endfor
. else
. if defined(${opt}_USE_OFF)
@@ -510,9 +518,10 @@ ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS_OFF}
. endif
. endfor
. for target in ${_OPTIONS_TARGETS}
-. for prepost in pre post
-_OPTIONS_${prepost}_${target}+= ${prepost}-${target}-${opt}-off
-. endfor
+_target= ${target:C/:.*//}
+_prio= ${target:C/.*:(.*):.*/\1/}
+_type= ${target:C/.*://}
+_OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-off
. endfor
. endif
.endfor
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 60f7bb6cb826..cc537724937b 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -705,6 +705,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# (which are available for every stage except checksum) or
# 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
# a major can of worms.
#
@@ -1427,6 +1431,11 @@ UID!= ${ID} -u
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
.for f in ${USES}
_f:= ${f:C/\:.*//}
@@ -5544,62 +5553,94 @@ _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL PACKAGE
# Define the SEQ of actions to take when each target is ran, and which targets
# 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 \
- show-warnings show-dev-warnings show-dev-errors \
- check-categories check-makevars check-desktop-entries \
- check-depends identify-install-conflicts check-deprecated \
- check-vulnerable check-license check-config buildanyway-message \
- options-message
+_SANITY_SEQ= 050:post-chroot 100:pre-everything 150:check-makefile \
+ 200:show-warnings 210:show-dev-warnings 220:show-dev-errors \
+ 250:check-categories 300:check-makevars \
+ 350:check-desktop-entries 400:check-depends \
+ 450:identify-install-conflicts 500:check-deprecated \
+ 550:check-vulnerable 600:check-license 650:check-config \
+ 700:buildanyway-message 750:options-message ${_USES_sanity}
_PKG_DEP= check-sanity
-_PKG_SEQ= pkg-depends
+_PKG_SEQ= 500:pkg-depends
_FETCH_DEP= pkg
-_FETCH_SEQ= fetch-depends pre-fetch ${_OPTIONS_pre_fetch} pre-fetch-script \
- do-fetch fetch-specials post-fetch ${_OPTIONS_post_fetch} post-fetch-script
+_FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \
+ 500:do-fetch 550:fetch-specials 700:post-fetch \
+ 850:post-fetch-script \
+ ${_OPTIONS_fetch} ${_USES_fetch}
_EXTRACT_DEP= fetch
-_EXTRACT_SEQ= check-build-conflicts extract-message checksum extract-depends \
- clean-wrkdir ${WRKDIR} pre-extract ${_OPTIONS_pre_extract} pre-extract-script do-extract \
- post-extract ${_OPTIONS_post_extract} post-extract-script
+_EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \
+ 150:extract-depends 190:clean-wrkdir 200:${WRKDIR} \
+ 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_SEQ= ask-license patch-message patch-depends pathfix dos2unix fix-shebang \
- pre-patch ${_OPTIONS_pre_patch} \
- pre-patch-script do-patch charsetfix-post-patch post-patch ${_OPTIONS_post_patch} post-patch-script
+_PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \
+ 300:pre-patch 450:pre-patch-script 500:do-patch \
+ 700:post-patch 850:post-patch-script \
+ ${_OPTIONS_patch} ${_USES_patch}
_CONFIGURE_DEP= patch
-_CONFIGURE_SEQ= build-depends lib-depends configure-message \
- pre-configure ${_OPTIONS_pre_configure} pre-configure-script \
- run-autotools do-autoreconf patch-libtool run-autotools-fixup do-configure \
- post-configure ${_OPTIONS_post_configure} post-configure-script
+_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 200:configure-message \
+ 300:pre-configure 450:pre-configure-script 460:run-autotools \
+ 490:run-autotools-fixup 500:do-configure 700:post-configure \
+ 850:post-configure-script \
+ ${_OPTIONS_configure} ${_USES_configure}
_BUILD_DEP= configure
-_BUILD_SEQ= build-message pre-build ${_OPTIONS_pre_build} pre-build-script do-build \
- post-build ${_OPTIONS_post_build} post-build-script
-
+_BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \
+ 500:do-build 700:post-build 850:post-build-script \
+ ${_OPTIONS_build} ${_USES_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 \
- pre-su-install
-# ${POST_PLIST} must be after anything that modifies TMPPLIST
-_STAGE_SEQ+= create-users-groups do-install \
- kmod-post-install fix-perl-things \
- webplugin-post-install post-install ${_OPTIONS_post_install} post-install-script \
- move-uniquefiles patch-lafiles post-stage ${_OPTIONS_post_stage} compress-man \
- install-rc-script install-ldconfig-file install-license \
- install-desktop-entries add-plist-info add-plist-docs \
- add-plist-examples add-plist-data add-plist-post \
- move-uniquefiles-plist ${POST_PLIST}
+# STAGE is special in its numbering as it has install and stage, so install is
+# the main, and stage goes after.
+_STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \
+ 151:lib-depends 200:apply-slist 300:pre-install \
+ 400:generate-plist 450:pre-su-install 475:create-users-groups \
+ 500:do-install 550:kmod-post-install 700:post-install \
+ 750:post-install-script 800:post-stage 850:compress-man \
+ 860:install-rc-script 870:install-ldconfig-file \
+ 880:install-license 890:install-desktop-entries \
+ 900:add-plist-info 910:add-plist-docs 920:add-plist-examples \
+ 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \
+ ${_OPTIONS_install} ${_USES_install} \
+ ${_OPTIONS_stage} ${_USES_stage}
.if defined(DEVELOPER)
-_STAGE_SEQ+= stage-qa
+_STAGE_SEQ+= 995:stage-qa
.endif
_INSTALL_DEP= stage
-_INSTALL_SEQ= install-message run-depends lib-depends check-already-installed
-_INSTALL_SUSEQ= fake-pkg security-check
+_INSTALL_SEQ= 100:install-message 150:run-depends 151:lib-depends \
+ 200:check-already-installed
+_INSTALL_SUSEQ= 300:fake-pkg 500:security-check
_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
-
.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 ! ${NOTPHONY:M${s}}
_PHONY_TARGETS+= ${s}
@@ -5607,7 +5648,7 @@ _PHONY_TARGETS+= ${s}
_${_t}_REAL_SEQ+= ${s}
. endif
. endfor
-. for s in ${_${_t}_SUSEQ}
+. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://}
. if target(${s})
. if ! ${NOTPHONY:M${s}}
_PHONY_TARGETS+= ${s}