HomeFreeBSD

Rewrite the target ordering code.

Description

Rewrite the target ordering code.

The targets now have priority assigned to them, and, when the dependency
ordering magic is done at the end of bsd.port.mk, they are sorted
according to their priority.

This allows USES to add targets easily and have them run whenever they
want without touching bsd.port.mk.

To add a target that runs just before post-configure run, do:

_USES_configure+= 695:my-post-configure
my-post-configure:
do something

To fine tune when the target is ran, look at the values in the *_SEQ
variables at the end of bsd.port.mk, and the other USES.

Allow ports Makefiles to override the priority of targets with the
TARGET_ORDER_OVERRIDE variable. For example, to get post-install
running earlier, (its default is 700) do:

TARGET_ORDER_OVERRIDE= 650:post-install

While there, add options target helpers for the do-* targets when they
exist.

Reviewed by: antoine, bapt
Exp-run by: antoine
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D3099

Details

Provenance
matAuthored on
Reviewer
antoine
Differential Revision
D3099: Add a simple way to have USES add targets.
Parents
rP394502: - Fix *_DEPENDS
Branches
Unknown
Tags
Unknown