diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2012-03-03 17:32:58 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-03-04 15:02:43 -0500 |
commit | 7ee21abef0d07df5d74475f63d4b2b5991af4937 (patch) | |
tree | 8f33e69ae58843cdf2212bb6e5c2e09c5c2c1ffd | |
parent | bbddbc482979817d734c0eb46942b1b689b70cb9 (diff) |
publican: support out-of-source tree build
When srcdir!=builddir, there is no way to tell publican that the source
is in srcdir rather than builldir. The workaround is to copy the source
files from srcdir to builddir. To retain the en-US final destination
name, the source directory is renamed to en_US.
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | doc/Wayland/.gitignore | 2 | ||||
-rw-r--r-- | doc/Wayland/Makefile.am | 98 | ||||
-rw-r--r-- | doc/Wayland/en_US/Architecture.xml (renamed from doc/Wayland/en-US/Architecture.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Author_Group.xml (renamed from doc/Wayland/en-US/Author_Group.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Book_Info.xml (renamed from doc/Wayland/en-US/Book_Info.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Chapter.xml (renamed from doc/Wayland/en-US/Chapter.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Preface.xml (renamed from doc/Wayland/en-US/Preface.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Revision_History.xml (renamed from doc/Wayland/en-US/Revision_History.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Wayland.ent (renamed from doc/Wayland/en-US/Wayland.ent) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/Wayland.xml (renamed from doc/Wayland/en-US/Wayland.xml) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/images/icon.svg (renamed from doc/Wayland/en-US/images/icon.svg) | 0 | ||||
-rw-r--r-- | doc/Wayland/en_US/images/wayland-architecture.png (renamed from doc/Wayland/en-US/images/wayland-architecture.png) | bin | 29162 -> 29162 bytes | |||
-rw-r--r-- | doc/Wayland/en_US/images/wayland.png (renamed from doc/Wayland/en-US/images/wayland.png) | bin | 5649 -> 5649 bytes | |||
-rw-r--r-- | doc/Wayland/en_US/images/x-architecture.png (renamed from doc/Wayland/en-US/images/x-architecture.png) | bin | 37306 -> 37306 bytes |
14 files changed, 58 insertions, 42 deletions
diff --git a/doc/Wayland/.gitignore b/doc/Wayland/.gitignore index cf78754..e366f17 100644 --- a/doc/Wayland/.gitignore +++ b/doc/Wayland/.gitignore @@ -1,2 +1,2 @@ Wayland -en-US/Protocol.xml +en-US/ diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am index 0ac9fff..5c53ff0 100644 --- a/doc/Wayland/Makefile.am +++ b/doc/Wayland/Makefile.am @@ -1,53 +1,69 @@ if HAVE_PUBLICAN -noinst_DATA = Wayland +noinst_DATA = Wayland $(publican_targets) +pubdir = $(docdir)/Wayland/en-US publican_sources = \ - $(srcdir)/en-US/Wayland.ent \ - $(srcdir)/en-US/Architecture.xml \ - $(srcdir)/en-US/Author_Group.xml \ - $(srcdir)/en-US/Book_Info.xml \ - $(srcdir)/en-US/Chapter.xml \ - $(srcdir)/en-US/Preface.xml \ - $(srcdir)/en-US/Wayland.xml \ - $(srcdir)/en-US/Revision_History.xml \ - $(srcdir)/en-US/images/icon.svg \ - $(srcdir)/en-US/images/wayland-architecture.png \ - $(srcdir)/en-US/images/wayland.png \ - $(srcdir)/en-US/images/x-architecture.png - -# publican does not support out-of-tree builds and during make distcheck the -# source tree is read-only so we can't chdir and/or dump the protocol there -# copy the tree into _build, leaving a marker file to clean up after -# distclean -# See https://bugzilla.redhat.com/show_bug.cgi?id=798484 for the chmod -copy-sources: - if ! test -e "en-US/"; then \ - mkdir en-US/; \ - touch en-US/need-distclean; \ - cp -r $(srcdir)/en-US/* en-US; \ - chmod u+w en-US/images; \ - fi - -Wayland: docbook-xsl publican.cfg $(publican_sources) - publican build --config=$(srcdir)/publican.cfg --lang en-US --format html,pdf - -# This must be run befor the publican run -docbook-xsl: copy-sources $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-to-docbook.xsl - $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-to-docbook.xsl $(top_srcdir)/protocol/wayland.xml > $(builddir)/en-US/Protocol.xml + $(srcdir)/en_US/Wayland.ent \ + $(srcdir)/en_US/Architecture.xml \ + $(srcdir)/en_US/Author_Group.xml \ + $(srcdir)/en_US/Book_Info.xml \ + $(srcdir)/en_US/Chapter.xml \ + $(srcdir)/en_US/Preface.xml \ + $(srcdir)/en_US/Wayland.xml \ + $(srcdir)/en_US/Revision_History.xml \ + $(srcdir)/en_US/images/icon.svg \ + $(srcdir)/en_US/images/wayland-architecture.png \ + $(srcdir)/en_US/images/wayland.png \ + $(srcdir)/en_US/images/x-architecture.png + +publican_targets = $(publican_sources:$(srcdir)/en_US%=$(builddir)/en-US%) \ + en-US/Protocol.xml + +# The Protocol.xml is purely generated and required before running publican +en-US/Protocol.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-to-docbook.xsl + $(AM_V_GEN)$(MKDIR_P) en-US/images + $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-to-docbook.xsl \ + $(top_srcdir)/protocol/wayland.xml > en-US/Protocol.xml + +# Copy the en_US source files into en-US destination +# This is required for out-of-source-tree build as publican does not allow us +# to specify the location of the source code. +$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/Protocol.xml $(publican_sources) + $(AM_V_GEN)cp -f $< $@ + +# Run publican for the builddir on the generated (or copied) source +# The output formats are generated in the Wayland sub directory +Wayland: $(publican_targets) + $(AM_V_GEN)$(PUBLICAN) build --lang en-US --format html,pdf \ + --config $(srcdir)/publican.cfg + +CLEANFILES = en-US/Protocol.xml $(publican_targets) clean-local: - -rm -rf Wayland - if test -e "en-US/need-distclean"; then \ - rm -rf en-US; \ - fi + $(AM_V_at)rm -fr en-US + $(AM_V_at)rm -fr Wayland install-data-local: - $(MKDIR_P) $(DESTDIR)$(docdir) - cp -R $(builddir)/Wayland $(DESTDIR)$(docdir) + test -z "$(pubdir)/html/Common_Content/css" || $(mkdir_p) "$(DESTDIR)$(pubdir)/html/Common_Content/css" + test -z "$(pubdir)/html/Common_Content/images" || $(mkdir_p) "$(DESTDIR)$(pubdir)/html/Common_Content/images" + test -z "$(pubdir)/html/images" || $(mkdir_p) "$(DESTDIR)$(pubdir)/html/images" + test -z "$(pubdir)/pdf" || $(mkdir_p) "$(DESTDIR)$(pubdir)/pdf" + test -z "$(pubdir)/xml/Common_Content/css" || $(mkdir_p) "$(DESTDIR)$(pubdir)/xml/Common_Content/css" + test -z "$(pubdir)/xml/Common_Content/images" || $(mkdir_p) "$(DESTDIR)$(pubdir)/xml/Common_Content/images" + test -z "$(pubdir)/xml/images" || $(mkdir_p) "$(DESTDIR)$(pubdir)/xml/images" + list=`find $(builddir)/Wayland/en-US -path './Wayland/en-US/xml_tmp' -prune -o -type f`; \ + for p in $$list; do \ + echo " $(INSTALL_DATA) '$$p' '$(DESTDIR)$(docdir)/$$p'"; \ + $(INSTALL_DATA) "$$p" "$(DESTDIR)$(docdir)/$$p"; \ + done; uninstall-local: - -rm -rf $(DESTDIR)$(docdir)/Wayland/* - -rmdir $(DESTDIR)$(docdir)/Wayland + @if test -n $(DESTDIR)$(docdir); then \ + if test -d $(DESTDIR)$(docdir); then \ + echo " rm -fr $(DESTDIR)$(docdir)/Wayland;"; \ + rm -fr $(DESTDIR)$(docdir)/Wayland; \ + fi; \ + fi; EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl diff --git a/doc/Wayland/en-US/Architecture.xml b/doc/Wayland/en_US/Architecture.xml index d10260a..d10260a 100644 --- a/doc/Wayland/en-US/Architecture.xml +++ b/doc/Wayland/en_US/Architecture.xml diff --git a/doc/Wayland/en-US/Author_Group.xml b/doc/Wayland/en_US/Author_Group.xml index 7a70760..7a70760 100644 --- a/doc/Wayland/en-US/Author_Group.xml +++ b/doc/Wayland/en_US/Author_Group.xml diff --git a/doc/Wayland/en-US/Book_Info.xml b/doc/Wayland/en_US/Book_Info.xml index 4b134eb..4b134eb 100644 --- a/doc/Wayland/en-US/Book_Info.xml +++ b/doc/Wayland/en_US/Book_Info.xml diff --git a/doc/Wayland/en-US/Chapter.xml b/doc/Wayland/en_US/Chapter.xml index f89f28b..f89f28b 100644 --- a/doc/Wayland/en-US/Chapter.xml +++ b/doc/Wayland/en_US/Chapter.xml diff --git a/doc/Wayland/en-US/Preface.xml b/doc/Wayland/en_US/Preface.xml index 610170a..610170a 100644 --- a/doc/Wayland/en-US/Preface.xml +++ b/doc/Wayland/en_US/Preface.xml diff --git a/doc/Wayland/en-US/Revision_History.xml b/doc/Wayland/en_US/Revision_History.xml index ef0907a..ef0907a 100644 --- a/doc/Wayland/en-US/Revision_History.xml +++ b/doc/Wayland/en_US/Revision_History.xml diff --git a/doc/Wayland/en-US/Wayland.ent b/doc/Wayland/en_US/Wayland.ent index da18a95..da18a95 100644 --- a/doc/Wayland/en-US/Wayland.ent +++ b/doc/Wayland/en_US/Wayland.ent diff --git a/doc/Wayland/en-US/Wayland.xml b/doc/Wayland/en_US/Wayland.xml index 829d362..829d362 100644 --- a/doc/Wayland/en-US/Wayland.xml +++ b/doc/Wayland/en_US/Wayland.xml diff --git a/doc/Wayland/en-US/images/icon.svg b/doc/Wayland/en_US/images/icon.svg index b2f16d0..b2f16d0 100644 --- a/doc/Wayland/en-US/images/icon.svg +++ b/doc/Wayland/en_US/images/icon.svg diff --git a/doc/Wayland/en-US/images/wayland-architecture.png b/doc/Wayland/en_US/images/wayland-architecture.png Binary files differindex 4f92e0f..4f92e0f 100644 --- a/doc/Wayland/en-US/images/wayland-architecture.png +++ b/doc/Wayland/en_US/images/wayland-architecture.png diff --git a/doc/Wayland/en-US/images/wayland.png b/doc/Wayland/en_US/images/wayland.png Binary files differindex c993792..c993792 100644 --- a/doc/Wayland/en-US/images/wayland.png +++ b/doc/Wayland/en_US/images/wayland.png diff --git a/doc/Wayland/en-US/images/x-architecture.png b/doc/Wayland/en_US/images/x-architecture.png Binary files differindex 098205b..098205b 100644 --- a/doc/Wayland/en-US/images/x-architecture.png +++ b/doc/Wayland/en_US/images/x-architecture.png |