summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-04-04 11:28:59 +1000
committerKristian Høgsberg <krh@bitplanet.net>2013-04-04 16:57:28 -0400
commit5cf14f4b57bbe63f996610a71779bbf15c06ce9b (patch)
tree7755a44d0c180985966f144eb3699ed3d00810a1
parentb1d7131c36a853ff688377fc077a0999cfc3a1b9 (diff)
doc: create a fake make target to de-duplicate the xml merging process
The only difference between the server and client xml files is the directories and files being named *server* and *client*, respectively. Add a new make target to get that process done to avoid duplication Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--doc/publican/Makefile.am37
1 files changed, 16 insertions, 21 deletions
diff --git a/doc/publican/Makefile.am b/doc/publican/Makefile.am
index 202633e..5579bd0 100644
--- a/doc/publican/Makefile.am
+++ b/doc/publican/Makefile.am
@@ -55,34 +55,29 @@ en-US/ProtocolInterfaces.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/proto
$(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-interfaces-to-docbook.xsl \
$(top_srcdir)/protocol/wayland.xml > en-US/ProtocolInterfaces.xml
-# WaylandClientAPI.xml:
-# * we don't want wayland-client_8h.xml to avoid duplicating output methods,
+combine_xml: server client
+
+# * we don't want wayland-{server|client}_8h.xml to avoid duplicating output methods,
# move it out of the way first.
# * use doxygen's combine.xslt to merge the xml files into one single file
-# * move wayland-client_8h.xml back to its original location
-# * transform the combined XML file into docbook format
-en-US/WaylandClientAPI.xml: $(top_builddir)/doc/doxygen/xml/client/index.xml $(srcdir)/doxygen-to-publican.xsl
- $(AM_V_GEN)$(MKDIR_P) en-US/images
- $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/client/wayland-client_8h.xml \
+# * move wayland-<foo>_8h.xml back to its original location
+server client:
+ $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/$@/wayland-$@_8h.xml \
$(top_builddir)/doc/doxygen/xml/
- $(AM_V_GEN)$(XSLTPROC) $(top_builddir)/doc/doxygen/xml/client/combine.xslt \
- $(top_builddir)/doc/doxygen/xml/client/index.xml > \
- $(top_builddir)/doc/doxygen/xml/client/clientAPI.xml
- $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/wayland-client_8h.xml \
- $(top_builddir)/doc/doxygen/xml/client
+ $(AM_V_GEN)$(XSLTPROC) $(top_builddir)/doc/doxygen/xml/$@/combine.xslt \
+ $(top_builddir)/doc/doxygen/xml/$@/index.xml > \
+ $(top_builddir)/doc/doxygen/xml/$@/$@API.xml
+ $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/wayland-$@_8h.xml \
+ $(top_builddir)/doc/doxygen/xml/$@
+
+# WaylandClientAPI.xml:
+# merge doxygen xml files into one single file (see combine_xml), then transform the combined XML file into docbook format
+en-US/WaylandClientAPI.xml: combine_xml $(top_builddir)/doc/doxygen/xml/client/index.xml $(srcdir)/doxygen-to-publican.xsl
$(AM_V_GEN)$(XSLTPROC) --stringparam which Client $(srcdir)/doxygen-to-publican.xsl \
$(top_builddir)/doc/doxygen/xml/client/clientAPI.xml > en-US/WaylandClientAPI.xml
# WaylandServerAPI.xml: see WaylandClientAPI.xml
-en-US/WaylandServerAPI.xml: $(top_builddir)/doc/doxygen/xml/server/index.xml $(srcdir)/doxygen-to-publican.xsl
- $(AM_V_GEN)$(MKDIR_P) en-US/images
- $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/server/wayland-server_8h.xml \
- $(top_builddir)/doc/doxygen/xml
- $(AM_V_GEN)$(XSLTPROC) $(top_builddir)/doc/doxygen/xml/server/combine.xslt \
- $(top_builddir)/doc/doxygen/xml/server/index.xml > \
- $(top_builddir)/doc/doxygen/xml/server/serverAPI.xml
- $(AM_V_GEN)mv $(top_builddir)/doc/doxygen/xml/wayland-server_8h.xml \
- $(top_builddir)/doc/doxygen/xml/server
+en-US/WaylandServerAPI.xml: combine_xml $(top_builddir)/doc/doxygen/xml/client/index.xml $(srcdir)/doxygen-to-publican.xsl
$(AM_V_GEN)$(XSLTPROC) --stringparam which Server $(srcdir)/doxygen-to-publican.xsl \
$(top_builddir)/doc/doxygen/xml/server/serverAPI.xml > en-US/WaylandServerAPI.xml