From 566d9f6536658356dcfdbb213d8461ccdb84d1ab Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 22 Feb 2021 16:47:07 -0500 Subject: [PATCH] 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. --- RELEASES.md | 7 +++++-- build-aux/Makefile.am | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index c9b8cd7e..00c8e518 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -39,8 +39,11 @@ Build System accommodate liza-proguic's step-level package generation. - Step-level program packages are now properly accounted for as dependencies for builds. -- `supplier.mk` generation will no longer be verbose (it'll instead be only - one line), which makes it more amenable to more frequent regeneration. +- `supplier.mk` is now automatically regenerated when source files + 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) diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am index bcdaa46a..76b96e99 100644 --- a/build-aux/Makefile.am +++ b/build-aux/Makefile.am @@ -82,6 +82,13 @@ package_dfns_pkgs = $(shell \ ) 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) linked_suppliers := $(src_suppliers:.xml=.xmle) @@ -258,11 +265,12 @@ clean: | sed 's/\.csvm$$/\.xml/; s/\.dat$$/\.xml/' \ | xargs rm -fv -# generates a Makefile that will properly build all package dependencies; note -# that territory and rate packages also have includes; see top of this file for -# an explanation -suppliers.mk: $(path_ui)/package-dfns.xml - $(ant) -q pkg-dep +# 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) + $(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 $(RM) $(path_ui)/program.dep