|
From: <sv...@va...> - 2005-07-25 23:01:48
|
Author: sewardj Date: 2005-07-26 00:01:43 +0100 (Tue, 26 Jul 2005) New Revision: 4257 Log: 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. Modified: trunk/docs/Makefile.am Modified: trunk/docs/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/Makefile.am 2005-07-25 22:36:52 UTC (rev 4256) +++ trunk/docs/Makefile.am 2005-07-25 23:01:43 UTC (rev 4257) @@ -1,3 +1,19 @@ + +##------------------------------------------------------------- +## 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=3Dyes + +##------------------------------------------------------------- +## END OF HACK +##------------------------------------------------------------- + + SUBDIRS =3D xml lib images internals =20 EXTRA_DIST =3D README @@ -4,6 +20,7 @@ =20 dist_man_MANS =3D valgrind.1 =20 + ##------------------------------------------------------------------- ## Below here is more ordinary make stuff... ##------------------------------------------------------------------- @@ -70,14 +87,40 @@ # If the docs have been built, install them. But don't worry if they ha= ve=20 # not -- developers do 'make install' not from a 'make dist'-ified distr= o all # the time. +# +# Note: this is done at 'make install' time. +# Note 2: the ifeq/else/endif have to be indented one space=20 +# 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 =20 + +# 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)=09 + cp -r html $(distdir) + endif =20 distclean-local: rm -rf html print |