From 43b25d1948718e2c0328e726ee0bec49d2739fa7 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Wed, 17 Oct 2012 10:09:26 +1100 Subject: build: Extract building of manpages in a separate Makefile This can then be used to build manpages/html when creating tarball. Do not build docs during a regular build, but only for install. Signed-off-by: Amitay Isaacs (This used to be ctdb commit 3274cffe2052953b34141a82de6053b747532a88) --- ctdb/Makefile.in | 19 +++++-------------- ctdb/doc/Makefile | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 ctdb/doc/Makefile (limited to 'ctdb') diff --git a/ctdb/Makefile.in b/ctdb/Makefile.in index efc6622febb..cffcf4ac066 100755 --- a/ctdb/Makefile.in +++ b/ctdb/Makefile.in @@ -110,9 +110,9 @@ SBINS = bin/ctdbd DIRS = lib bin tests/bin -.SUFFIXES: .c .o .h .1 .1.xml .1.html +.SUFFIXES: .c .o .h -all: showflags dirs doc $(CTDB_SERVER_OBJ) $(CTDB_CLIENT_OBJ) $(CTDB_LIB_OBJ) $(BINS) $(SBINS) $(TEST_BINS) +all: showflags dirs $(CTDB_SERVER_OBJ) $(CTDB_CLIENT_OBJ) $(CTDB_LIB_OBJ) $(BINS) $(SBINS) $(TEST_BINS) showflags: @echo 'ctdb will be compiled with flags:' @@ -285,17 +285,8 @@ tests/bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) ib/ibwrapper_test.o @echo Linking $@ @$(CC) $(CFLAGS) -o $@ ib/ibwrapper_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS) -.1.xml.1: - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -.1.xml.1.html: - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< - -doc: doc/ctdb.1 doc/ctdb.1.html \ - doc/ctdbd.1 doc/ctdbd.1.html \ - doc/onnode.1 doc/onnode.1.html \ - doc/ltdbtool.1 doc/ltdbtool.1.html \ - doc/ping_pong.1 doc/ping_pong.1.html +manpages: + $(MAKE) -C doc clean: rm -f *.o */*.o */*.a */*/*.o */*~ @@ -308,7 +299,7 @@ distclean: clean rm -f config.log config.status config.cache config.h rm -f Makefile -install: all $(PMDA_INSTALL) +install: all manpages $(PMDA_INSTALL) mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(sbindir) diff --git a/ctdb/doc/Makefile b/ctdb/doc/Makefile new file mode 100644 index 00000000000..2f7d41d239e --- /dev/null +++ b/ctdb/doc/Makefile @@ -0,0 +1,16 @@ +DOCS = ctdb.1 ctdb.1.html \ + ctdbd.1 ctdbd.1.html \ + onnode.1 onnode.1.html \ + ltdbtool.1 ltdbtool.1.html \ + ping_pong.1 ping_pong.1.html + +all: $(DOCS) + +%.1: %.1.xml + xsltproc -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + +%.1.html: %.1.xml + xsltproc -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< + +distclean: + rm -f $(DOCS) -- cgit