aboutsummaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/common.mk1
-rw-r--r--rules/ips-manifest.mk13
2 files changed, 13 insertions, 1 deletions
diff --git a/rules/common.mk b/rules/common.mk
index 7b1d829..0e4ba57 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -125,6 +125,7 @@ install : install-stamp
clean ::
rm -f *-stamp
rm -rf $(workdir)
+ [ -z "$(generated-files)" ] || rm -f $(generated-files)
__common_mk := included
diff --git a/rules/ips-manifest.mk b/rules/ips-manifest.mk
index 7eb9fdf..618e217 100644
--- a/rules/ips-manifest.mk
+++ b/rules/ips-manifest.mk
@@ -74,10 +74,21 @@ manifests := $(wildcard *.p5m)
# Manifest generators:
manifests-x := $(wildcard *.p5m.x)
-manifests += $(manifests-x:%.x=%)
+manifests-generated += $(manifests-x:%.x=%)
%.p5m: %.p5m.x
./$< > $@
+manifests-m4 := $(wildcard *.p5m.m4)
+ifneq (,$(manifests-m4))
+build-depends += gnu-m4
+endif
+manifests-generated += $(manifests-m4:%.m4=%)
+%.p5m: %.p5m.m4
+ gm4 $< > $@
+
+manifests += $(manifests-generated)
+generated-files += $(manifests-generated)
+
#TODO: Expand "glob" action in manifests:
globalizator := /usr/share/cibs/scripts/globalizator
glob-manifests := $(manifests:%=$(manifestdir)/glob-%)