From 104ccad880475f9bd7c78b3f3fb26050a2c42489 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 25 Jul 2005 23:01:43 +0000 Subject: [PATCH] Build the .ps/.pdf documentation by default when doing 'make dist'. Because this means installing lots of XML processing tools and supporting gunk, there is a hack at the top of docs/Makefile.am for disabling the .pdf/.ps build. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4257 --- docs/Makefile.am | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 0ff8fe5470..3935bc88fc 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,9 +1,26 @@ + +##------------------------------------------------------------- +## HACK: stuff to avoid making the print docs if installing the +## tools to do so is impractical / too difficult +##------------------------------------------------------------- + +# Comment out the next line to skip building print docs. The default +# is not to skip building print docs. Note, after changing it +# you of course need to re-run configure to make it take effect. +BUILD_ALL_DOCS=yes + +##------------------------------------------------------------- +## END OF HACK +##------------------------------------------------------------- + + SUBDIRS = xml lib images internals EXTRA_DIST = README dist_man_MANS = valgrind.1 + ##------------------------------------------------------------------- ## Below here is more ordinary make stuff... ##------------------------------------------------------------------- @@ -70,14 +87,40 @@ print-docs: # If the docs have been built, install them. But don't worry if they have # not -- developers do 'make install' not from a 'make dist'-ified distro all # the time. +# +# Note: this is done at 'make install' time. +# Note 2: the ifeq/else/endif have to be indented one space +# because otherwise it seems that automake thinks it should +# be the one to handle the else/endif parts, not GNU make +# as we intend. install-data-hook: if test -r html ; then \ mkdir -p $(DESTDIR)$(datadir)/doc/valgrind/; \ cp -r html $(DESTDIR)$(datadir)/doc/valgrind/; \ fi + ifeq ($(BUILD_ALL_DOCS),yes) + if test -r index.pdf ; then \ + mkdir -p $(DESTDIR)$(datadir)/doc/valgrind/; \ + cp index.pdf $(DESTDIR)$(datadir)/doc/valgrind/; \ + fi + if test -r index.ps ; then \ + mkdir -p $(DESTDIR)$(datadir)/doc/valgrind/; \ + cp index.ps $(DESTDIR)$(datadir)/doc/valgrind/; \ + fi + endif + +# This is done at 'make dist' time. It builds the html and print docs +# and copies them into the docs/ directory in the tarball. + ifeq ($(BUILD_ALL_DOCS),yes) +dist-hook: html-docs print-docs + cp -r html $(distdir) + cp print/index.pdf $(distdir) + cp print/index.ps $(distdir) + else dist-hook: html-docs - cp -r html $(distdir) + cp -r html $(distdir) + endif distclean-local: rm -rf html print -- 2.47.3