njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 1 | SUBDIRS = xml lib images |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 2 | |
njn | 4452e60 | 2004-11-30 19:27:02 +0000 | [diff] [blame] | 3 | EXTRA_DIST = README porting-HOWTO |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 4 | |
njn | c88614a | 2005-03-12 21:06:06 +0000 | [diff] [blame] | 5 | dist_man_MANS = valgrind.1 # Unsure about this --njn |
| 6 | |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 7 | ##------------------------------------------------------------------- |
| 8 | ## Below here is more ordinary make stuff... |
| 9 | ##------------------------------------------------------------------- |
| 10 | docdir = ./ |
| 11 | xmldir = $(docdir)xml |
| 12 | imgdir = $(docdir)images |
| 13 | libdir = $(docdir)lib |
| 14 | htmldir = $(docdir)html |
| 15 | printdir = $(docdir)print |
| 16 | |
| 17 | XML_CATALOG_FILES = /etc/xml/catalog |
| 18 | |
| 19 | # file to log print output to |
| 20 | LOGFILE = print.log |
| 21 | |
| 22 | # validation stuff |
| 23 | XMLLINT = xmllint |
| 24 | LINT_FLAGS = --noout --xinclude --noblanks --postvalid |
| 25 | VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd |
| 26 | XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS) |
| 27 | |
| 28 | # stylesheet processor |
| 29 | XSLTPROC = xsltproc |
| 30 | XSLTPROC_FLAGS = --nonet --xinclude |
| 31 | |
| 32 | # stylesheets |
| 33 | XSL_HTML_CHUNK_STYLE = $(libdir)/vg-html-chunk.xsl |
| 34 | XSL_HTML_SINGLE_STYLE = $(libdir)/vg-html-single.xsl |
| 35 | XSL_FO_STYLE = $(libdir)/vg-fo.xsl |
| 36 | |
| 37 | all-docs: html-docs print-docs |
| 38 | |
| 39 | valid: |
| 40 | $(XMLLINT) $(XMLLINT_FLAGS) $(xmldir)/index.xml |
| 41 | |
| 42 | # chunked html |
| 43 | html-docs: |
| 44 | @echo "Generating html files..." |
| 45 | export XML_CATALOG_FILES=$(XML_CATALOG_FILES) |
| 46 | mkdir -p $(htmldir) |
| 47 | /bin/rm -fr $(htmldir)/ |
| 48 | mkdir -p $(htmldir)/ |
| 49 | mkdir -p $(htmldir)/images |
| 50 | cp $(libdir)/vg_basic.css $(htmldir)/ |
| 51 | cp $(imgdir)/*.png $(htmldir)/images |
| 52 | $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(htmldir)/ $(XSL_HTML_CHUNK_STYLE) $(xmldir)/index.xml |
| 53 | |
| 54 | # pdf and postscript |
| 55 | print-docs: |
njn | c11a29e | 2004-11-30 14:05:38 +0000 | [diff] [blame] | 56 | @echo "Generating PDF file: $(printdir)/index.pdf (please be patient)..."; |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 57 | export XML_CATALOG_FILES=$(XML_CATALOG_FILES); |
| 58 | mkdir -p $(printdir); |
| 59 | mkdir -p $(printdir)/images; |
| 60 | cp $(imgdir)/massif-graph-sm.png $(printdir)/images; |
| 61 | $(XSLTPROC) $(XSLTPROC_FLAGS) -o $(printdir)/index.fo $(XSL_FO_STYLE) $(xmldir)/index.xml; |
njn | c11a29e | 2004-11-30 14:05:38 +0000 | [diff] [blame] | 62 | (cd $(printdir); \ |
| 63 | pdfxmltex index.fo &> $(LOGFILE); \ |
| 64 | pdfxmltex index.fo &> $(LOGFILE); \ |
| 65 | pdfxmltex index.fo &> $(LOGFILE); \ |
| 66 | echo "Generating PS file: $(printdir)/index.ps ..."; \ |
| 67 | pdftops index.pdf; \ |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 68 | rm *.log *.aux *.fo *.out) |
| 69 | |
| 70 | # If the docs have been built, install them. But don't worry if they have |
| 71 | # not -- developers do 'make install' not from a 'make dist'-ified distro all |
| 72 | # the time. |
| 73 | install-data-hook: |
| 74 | if test -r html ; then \ |
njn | 671319b | 2004-11-30 11:10:01 +0000 | [diff] [blame] | 75 | mkdir -p $(datadir)/doc/valgrind/; \ |
| 76 | cp -r html $(datadir)/doc/valgrind/; \ |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 77 | fi |
| 78 | |
| 79 | dist-hook: html-docs |
| 80 | cp -r html $(distdir) |
| 81 | |
| 82 | distclean-local: |
| 83 | rm -rf html print |