[PATCH 4/6] Hook up autotools for publican

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 28 18:57:32 PST 2012


automake doesn't seem to provide a sensible method to install a directory of
stuff in $(docdir). Do it manually then.

CC: Gaetan Nadon <gaetan.nadon at videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Gaetan - can you check this please, it seems less-than-ideal, especially
since it builds every time I run make, even if no source has changed.

 Makefile.am              |    2 +-
 configure.ac             |    5 +++++
 doc/Makefile.am          |    1 +
 doc/Wayland/.gitignore   |    1 +
 doc/Wayland/Makefile.am  |   35 +++++++++++++++++++++++++++++++++++
 doc/Wayland/publican.cfg |    2 ++
 6 files changed, 45 insertions(+), 1 deletions(-)
 create mode 100644 doc/Makefile.am
 create mode 100644 doc/Wayland/.gitignore
 create mode 100644 doc/Wayland/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index 016bb76..332f9b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src protocol
+SUBDIRS = src protocol doc
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
diff --git a/configure.ac b/configure.ac
index fc623e8..b709e3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,8 +51,13 @@ fi
 AC_PATH_PROG(XSLTPROC, xsltproc)
 AM_CONDITIONAL([HAVE_XSLTPROC], [test $XSLTPROC != ""])
 
+AC_PATH_PROG(PUBLICAN, publican)
+AM_CONDITIONAL([HAVE_PUBLICAN], [test $PUBLICAN != ""])
+
 AC_CONFIG_FILES([Makefile
 		 wayland-scanner.m4
+		 doc/Makefile
+		 doc/Wayland/Makefile
 		 src/Makefile
 		 src/wayland-server.pc
 		 src/wayland-client.pc
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..f8046e7
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = Wayland
diff --git a/doc/Wayland/.gitignore b/doc/Wayland/.gitignore
new file mode 100644
index 0000000..33b78ca
--- /dev/null
+++ b/doc/Wayland/.gitignore
@@ -0,0 +1 @@
+Wayland
diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am
new file mode 100644
index 0000000..854da79
--- /dev/null
+++ b/doc/Wayland/Makefile.am
@@ -0,0 +1,35 @@
+if HAVE_PUBLICAN
+EXTRA_DIST = Wayland
+noinst_DATA = Wayland
+
+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
+
+
+Wayland: publican.cfg $(publican_sources)
+	publican build --lang en-US --format html,pdf
+
+clean-local:
+	-rm -rf Wayland
+
+install-data-local:
+	$(MKDIR_P) $(DESTDIR)$(docdir)
+	cp -R $(builddir)/Wayland $(DESTDIR)$(docdir)
+
+uninstall-local:
+	-rm -rf $(DESTDIR)$(docdir)/Wayland/*
+	-rmdir $(DESTDIR)$(docdir)/Wayland
+
+EXTRA_DIST = $(publican_sources) publican.cfg
+endif
diff --git a/doc/Wayland/publican.cfg b/doc/Wayland/publican.cfg
index 80ff134..810c735 100644
--- a/doc/Wayland/publican.cfg
+++ b/doc/Wayland/publican.cfg
@@ -4,3 +4,5 @@
 xml_lang: "en-US"
 type: Book
 brand: common
+tmp_dir: Wayland
+
-- 
1.7.7.6



More information about the wayland-devel mailing list