|
From: Ralf W. <Ral...@gm...> - 2005-06-25 12:39:48
|
* Ralf Wildenhues wrote on Sat, Jun 25, 2005 at 10:21:44AM CEST: > CHANGES: > * docs/Makefile.am (valid, html-docs, print-docs): > Build documentation below srcdir: cd to srcdir before doing anything; > correctly bail out on the first error. > (print-docs): Output pdfxmltex errors also to terminal, in order to > allow sensible, possibly necessary user interaction with latex. > (dist-hook): Adjust for docs in srcdir. > (install-data-hook): Fix for DESTDIR install. I omitted a part here, without purpose: the last two commands of print-docs were run even if the previous failed. Fixed in patch below. Sorry for the inconvenience. Regards, Ralf Index: docs/Makefile.am =================================================================== --- docs/Makefile.am (Revision 4015) +++ docs/Makefile.am (Arbeitskopie) @@ -37,47 +37,49 @@ all-docs: html-docs print-docs valid: - $(XMLLINT) $(XMLLINT_FLAGS) $(xmldir)/index.xml + cd $(srcdir) && $(XMLLINT) $(XMLLINT_FLAGS) $(xmldir)/index.xml # chunked html html-docs: @echo "Generating html files..." - export XML_CATALOG_FILES=$(XML_CATALOG_FILES) - mkdir -p $(htmldir) - /bin/rm -fr $(htmldir)/ - mkdir -p $(htmldir)/ - mkdir -p $(htmldir)/images - cp $(libdir)/vg_basic.css $(htmldir)/ - cp $(imgdir)/*.png $(htmldir)/images + cd $(srcdir) && \ + export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \ + mkdir -p $(htmldir) && \ + /bin/rm -fr $(htmldir)/ && \ + mkdir -p $(htmldir)/ && \ + mkdir -p $(htmldir)/images && \ + cp $(libdir)/vg_basic.css $(htmldir)/ && \ + cp $(imgdir)/*.png $(htmldir)/images && \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(htmldir)/ $(XSL_HTML_CHUNK_STYLE) $(xmldir)/index.xml # pdf and postscript print-docs: - @echo "Generating PDF file: $(printdir)/index.pdf (please be patient)..."; - export XML_CATALOG_FILES=$(XML_CATALOG_FILES); - mkdir -p $(printdir); - mkdir -p $(printdir)/images; - cp $(imgdir)/massif-graph-sm.png $(printdir)/images; - $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(printdir)/index.fo $(XSL_FO_STYLE) $(xmldir)/index.xml; - (cd $(printdir); \ - pdfxmltex index.fo &> $(LOGFILE); \ - pdfxmltex index.fo &> $(LOGFILE); \ - pdfxmltex index.fo &> $(LOGFILE); \ - echo "Generating PS file: $(printdir)/index.ps ..."; \ - pdftops index.pdf; \ - rm *.log *.aux *.fo *.out) + @echo "Generating PDF file: $(printdir)/index.pdf (please be patient)..." + cd $(srcdir) && \ + export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \ + mkdir -p $(printdir) && \ + mkdir -p $(printdir)/images && \ + cp $(imgdir)/massif-graph-sm.png $(printdir)/images && \ + $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(printdir)/index.fo $(XSL_FO_STYLE) $(xmldir)/index.xml && \ + (cd $(printdir) && \ + ( pdfxmltex index.fo && \ + pdfxmltex index.fo && \ + pdfxmltex index.fo ) 2>&1 | tee $(LOGFILE) && \ + echo "Generating PS file: $(printdir)/index.ps ..." && \ + pdftops index.pdf && \ + rm -f *.log *.aux *.fo *.out) # 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. install-data-hook: if test -r html ; then \ - mkdir -p $(datadir)/doc/valgrind/; \ - cp -r html $(datadir)/doc/valgrind/; \ + mkdir -p $(DESTDIR)$(datadir)/doc/valgrind/; \ + cp -r $(srcdir)/html $(DESTDIR)$(datadir)/doc/valgrind/; \ fi dist-hook: html-docs - cp -r html $(distdir) + cp -r $(srcdir)/html $(distdir) distclean-local: - rm -rf html print + cd $(srcdir) && rm -rf html print |