build-aux/Makefile.am (suppliers.mk): Regenerate when any sources change

This should have been done many years ago.  This will determine if any of
the dependencies have changed for the included suppliers.mk and regenerate
it as needed, without the developer having to do so manually when imports
change.
master
Mike Gerwitz 2021-02-22 16:47:07 -05:00
parent cda3e845b8
commit 566d9f6536
2 changed files with 18 additions and 7 deletions

View File

@ -39,8 +39,11 @@ Build System
accommodate liza-proguic's step-level package generation. accommodate liza-proguic's step-level package generation.
- Step-level program packages are now properly accounted for as dependencies - Step-level program packages are now properly accounted for as dependencies
for builds. for builds.
- `supplier.mk` generation will no longer be verbose (it'll instead be only - `supplier.mk` is now automatically regenerated when source files
one line), which makes it more amenable to more frequent regeneration. change. This previously needed to be done manually when imports changed.
- `supplier.mk` generation will no longer be verbose (it'll instead be
only one line), which makes it more amenable to more frequent
regeneration.
v17.7.0 (2020-12-09) v17.7.0 (2020-12-09)

View File

@ -82,6 +82,13 @@ package_dfns_pkgs = $(shell \
) )
package_dfns_xmlos = $(patsubst %.xml, %.xmlo, $(package_dfns_pkgs)) package_dfns_xmlos = $(patsubst %.xml, %.xmlo, $(package_dfns_pkgs))
# Dependencies for suppliers.mk.
src_suppliersmk = $(src_common) \
$(shell find $(path_suppliers) ui/package ui/map rater/core -name '*.xml') \
$(program_fragments) \
ui/program.xml \
ui/package-dfns.xml
compiled_suppliers := $(src_suppliers:.xml=.xmlo) compiled_suppliers := $(src_suppliers:.xml=.xmlo)
linked_suppliers := $(src_suppliers:.xml=.xmle) linked_suppliers := $(src_suppliers:.xml=.xmle)
@ -258,11 +265,12 @@ clean:
| sed 's/\.csvm$$/\.xml/; s/\.dat$$/\.xml/' \ | sed 's/\.csvm$$/\.xml/; s/\.dat$$/\.xml/' \
| xargs rm -fv | xargs rm -fv
# generates a Makefile that will properly build all package dependencies; note # Generates a Makefile that will properly build all package
# that territory and rate packages also have includes; see top of this file for # dependencies. The redirect of ant to /dev/null is because it's still too
# an explanation # noisy even with -q---the "BUILD SUCCESSFUL" line is confusing, considering
suppliers.mk: $(path_ui)/package-dfns.xml # it's merely a small part of a broader build.
$(ant) -q pkg-dep suppliers.mk: $(src_suppliersmk)
$(ant) -q pkg-dep >/dev/null
find $(path_ui)/program/ -name '*.dep' | xargs cat $(path_ui)/program.dep | sort -u \ find $(path_ui)/program/ -name '*.dep' | xargs cat $(path_ui)/program.dep | sort -u \
> $(path_ui)/package-dfns.dep > $(path_ui)/package-dfns.dep
$(RM) $(path_ui)/program.dep $(RM) $(path_ui)/program.dep