Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2021-02-22 12:42:16 -0500
committerMike Gerwitz <mike.gerwitz@ryansg.com>2021-02-23 10:44:50 -0500
commit6f67a4d6fa7349deb63c8a2d6658f01095c469c2 (patch)
tree46efb054fc2ae1b606d0212d433a483ae60f34ef /build-aux
parent9f5517f0d9678b31e6c3f34cec06a872471266e2 (diff)
downloadtame-6f67a4d6fa7349deb63c8a2d6658f01095c469c2.tar.gz
tame-6f67a4d6fa7349deb63c8a2d6658f01095c469c2.tar.bz2
tame-6f67a4d6fa7349deb63c8a2d6658f01095c469c2.zip
build-aux/Makefile.am: Accommodate step-level packages from proguic
Note: this really belongs in liza-proguic, and should be moved in the near future. liza-proguic is being modified to generate step-level packages, which are significantly faster to build than larger ones (XSLT TAME scales terribly). These changes handle those new dependencies. One important thing to note with this change is that suppliers.mk now requires proguic to have run before generation so that those generated dependencies can be properly examined. This is a quick operation, so that is not problematic. This also depends on the .version.xml change that was previously made: when the timestamp changed every time, we got into an infinite build loop.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile.am24
1 files changed, 19 insertions, 5 deletions
diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am
index 583c39e..8fa28d4 100644
--- a/build-aux/Makefile.am
+++ b/build-aux/Makefile.am
@@ -65,12 +65,23 @@ dest_c1map := $(patsubst \
$(path_c1map)/%.php, \
$(src_c1map))
+# Program fragments combined to form one large program.expanded.xml
+# TODO: Move into liza-proguic
program_fragments=$(shell \
find $(path_ui)/program/ -name '*.xml' 2>/dev/null \
| LC_ALL=C sort \
| tr '\n' ' ' \
)
+# Packages associated with each program step.
+# TODO: Move into liza-proguic
+package_dfns_pkgs = $(shell \
+ find $(path_ui)/package/ -name 'progui-pkg-*.xml' 2>/dev/null 2>/dev/null \
+ | LC_ALL=C sort \
+ | tr '\n' ' ' \
+)
+package_dfns_xmlos = $(patsubst %.xml, %.xmlo, $(package_dfns_pkgs))
+
compiled_suppliers := $(src_suppliers:.xml=.xmlo)
linked_suppliers := $(src_suppliers:.xml=.xmle)
@@ -201,7 +212,7 @@ version: .version.xml
cmp $@ $@.new || mv $@.new $@
$(RM) $@.new
-ui/program.expanded.xml: ui/program.xml $(program_fragments)
+ui/program.expanded.xml: ui/program.xml $(program_fragments) .version.xml
$(TAME_TS)
$(TAME) progui-expand $< $@
ui/Program.js: ui/program.expanded.xml ui/package.js
@@ -210,11 +221,12 @@ ui/Program.js: ui/program.expanded.xml ui/package.js
ui/html/index.phtml: ui/program.expanded.xml
$(TAME_TS)
$(TAME) progui-html $< $@ out-path=./
-ui/package-dfns.xmlo: ui/package-dfns.xml
+ui/package-dfns.xmlo: ui/package-dfns.xml $(package_dfns_xmlos)
ui/package-dfns.xml: ui/program.expanded.xml
$(TAME_TS)
$(TAME) progui-pkg $< $@
-ui/package-map.xmlo: ui/package-map.xml ui/package-dfns.xmlo
+$(package_dfns_pkgs): ui/package-dfns.xml
+ui/package-map.xmlo: ui/package-map.xml ui/package-dfns.xmlo $(package_dfns_xmlos)
ui/package-map.xml: ui/program.expanded.xml ui/package-dfns.xml
$(TAME_TS)
$(TAME) progui-pkg-map $< $@
@@ -249,9 +261,11 @@ clean:
# 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:
+suppliers.mk: $(path_ui)/package-dfns.xml
$(ant) pkg-dep
- test ! -f $(path_ui)/program.dep || mv $(path_ui)/program.dep $(path_ui)/package-dfns.dep
+ find $(path_ui)/program/ -name '*.dep' | xargs cat $(path_ui)/program.dep | sort -u \
+ > $(path_ui)/package-dfns.dep
+ $(RM) $(path_ui)/program.dep
$(path_dsl)/tame/build-aux/gen-make $(SRCPATHS) > $@
test ! -d $(path_c1map) || $(path_dsl)/tame/build-aux/gen-c1make $(path_c1map)/*.xml >> $@