]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Build the .ps/.pdf documentation by default when doing 'make dist'.
authorJulian Seward <jseward@acm.org>
Mon, 25 Jul 2005 23:01:43 +0000 (23:01 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 25 Jul 2005 23:01:43 +0000 (23:01 +0000)
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

index 0ff8fe5470867b5bb9c4ad3a728ce83d29a202f8..3935bc88fc914bd1511ce2528fd88997cbc7632b 100644 (file)
@@ -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