diff options
author | Igor Pashev <igor.pashev@nexenta.com> | 2012-11-14 01:40:26 +0400 |
---|---|---|
committer | Igor Pashev <igor.pashev@nexenta.com> | 2012-11-14 01:40:26 +0400 |
commit | 5c5be9c76ef1628329a6689f1e20927e96e631a8 (patch) | |
tree | 7866cc503731d2def2b245f459980f5a49f36004 /rules | |
parent | cdf36eb93fba1ad82ebb00d4e8ed5377acf5caf1 (diff) | |
download | cibs-5c5be9c76ef1628329a6689f1e20927e96e631a8.tar.gz |
Allow using GNU m4 for generating manifests
Diffstat (limited to 'rules')
-rw-r--r-- | rules/common.mk | 1 | ||||
-rw-r--r-- | rules/ips-manifest.mk | 13 |
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-%) |