diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2015-11-17 16:00:31 +0800 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-11-19 14:09:53 +0200 |
commit | 08ab0bcb83a75c00d0e541b03892a609fb446e86 (patch) | |
tree | d19454975cf6355ac3d4bb9351382cc147208d4d | |
parent | b57f472c84592b0ec64c39d2e707892e58587aea (diff) | |
download | weston-08ab0bcb83a75c00d0e541b03892a609fb446e86.tar.gz |
Makefile.am: Make the external xml scanning rule version generic
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | Makefile.am | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 4c705593..04357025 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1415,13 +1415,21 @@ doc: $(DOXYGEN_INDICES) .SECONDEXPANSION: -protocol/%-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/$$*/$$*-unstable-v1.xml +define protostability +$(shell echo $1 | sed 's/.*\(\<unstable\>\|\<stable\>\).*/\1/') +endef + +define protoname +$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/') +endef + +protocol/%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@ -protocol/%-unstable-v1-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/$$*/$$*-unstable-v1.xml +protocol/%-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@ -protocol/%-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/$$*/$$*-unstable-v1.xml +protocol/%-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml |