summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2013-04-22 16:10:45 +0900
committerDaiki Ueno <ueno@unixuser.org>2013-04-22 16:10:45 +0900
commit09a1bcf5d83259cd909cd9b987f23b9375efc114 (patch)
tree8b3988d0c60debfb27d340a27d0544c5ab0157f4
parent5c929ff1a50fae2c29437b2fd4909a2ac4c8d21c (diff)
downloadcaribou-09a1bcf5d83259cd909cd9b987f23b9375efc114.tar.gz
build: use suffix rule to generates layouts
To handle dependencies on common/*.xml, use suffix rule instead of pattern rule.
-rw-r--r--data/layouts/fullscale/Makefile.am14
-rw-r--r--data/layouts/touch/Makefile.am16
2 files changed, 20 insertions, 10 deletions
diff --git a/data/layouts/fullscale/Makefile.am b/data/layouts/fullscale/Makefile.am
index 7d3eae9..1332b79 100644
--- a/data/layouts/fullscale/Makefile.am
+++ b/data/layouts/fullscale/Makefile.am
@@ -7,14 +7,18 @@ common_files = \
common/qwerty.xml \
common/symbols.xml
-%.xsl: %.xml.in
- xsltproc --xinclude $(top_srcdir)/tools/basic.xsl $< > $@
+us.xml: $(common_files)
-%.xml: %.xsl %.xml.in
- xsltproc --xinclude $^ > $@
+SUFFIXES = .xml.in .xml
+
+.xml.in.xml:
+ $(AM_V_GEN) \
+ rm -f $@ $@.xsl; \
+ xsltproc --xinclude $(top_srcdir)/tools/basic.xsl $@.in > $@.xsl && \
+ xsltproc --xinclude $@.xsl $@.in > $@
EXTRA_DIST = $(fullscalelayouts_in_files) $(common_files)
-CLEANFILES = $(fullscalelayouts_DATA) $(fullscalelayouts_in_files:.xml.in=.xsl)
+CLEANFILES = $(fullscalelayouts_DATA) $(fullscalelayouts_in_files:.xml.in=.xml.xsl)
-include $(top_srcdir)/git.mk
diff --git a/data/layouts/touch/Makefile.am b/data/layouts/touch/Makefile.am
index 755107f..3217a76 100644
--- a/data/layouts/touch/Makefile.am
+++ b/data/layouts/touch/Makefile.am
@@ -9,14 +9,20 @@ common_files = \
common/qwerty.xml \
common/symbols.xml
-%.xsl: %.xml.in
- xsltproc --xinclude $(top_srcdir)/tools/basic.xsl $< > $@
+ara.xml: $(common_files)
+il.xml: $(common_files)
+us.xml: $(common_files)
-%.xml: %.xsl %.xml.in
- xsltproc --xinclude $^ > $@
+SUFFIXES = .xml.in .xml
+
+.xml.in.xml:
+ $(AM_V_GEN) \
+ rm -f $@ $@.xsl; \
+ xsltproc --xinclude $(top_srcdir)/tools/basic.xsl $@.in > $@.xsl && \
+ xsltproc --xinclude $@.xsl $@.in > $@
EXTRA_DIST = $(touchlayouts_in_files) $(common_files)
-CLEANFILES = $(touchlayouts_DATA) $(touchlayouts_in_files:.xml.in=.xsl)
+CLEANFILES = $(touchlayouts_DATA) $(touchlayouts_in_files:.xml.in=.xml.xsl)
-include $(top_srcdir)/git.mk