build-aux/Makefile.am (bootstrap-if-necessary): New target

This introduces an order-only prerequisite `bootstrap-if-necessary` for the
generation of `suppliers.mk`.  Projects utilizing TAME as a dependency may
include a `bootstrap.mk` that overrides this target to trigger any
bootstrapping scripts that may be necessary due to toolchain updates.

DEV-7145
main
Mike Gerwitz 2022-09-07 11:07:39 -04:00
parent 5edefde201
commit 0ac24baa87
1 changed files with 10 additions and 1 deletions

View File

@ -275,11 +275,20 @@ clean:
| sed 's/\.csvm$$/\.xml/; s/\.dat$$/\.xml/' \
| xargs rm -fv
# A target to be optionally overridden by `bootstrap.mk`.
.PHONY: bootstrap-if-necessary
bootstrap-if-necessary: FORCE
# Targets intended to be run before the generation of `suppliers.mk`.
# This should be used to re-bootstrap the system if necessary
# (see `bootstrap-if-necessary` target).
-include bootstrap.mk
# Generates a Makefile that will properly build all package
# dependencies. The redirect of ant to /dev/null is because it's still too
# noisy even with -q---the "BUILD SUCCESSFUL" line is confusing, considering
# it's merely a small part of a broader build.
suppliers.mk: $(src_suppliersmk)
suppliers.mk: $(src_suppliersmk) | bootstrap-if-necessary
$(ant) -q pkg-dep >/dev/null
find $(path_ui)/program/ -name '*.dep' | xargs cat $(path_ui)/program.dep | sort -u \
> $(path_ui)/package-dfns.dep