source: doc/user-guide/Makefile @ b38f655

Last change on this file since b38f655 was baa09cc, checked in by dequis <dx@…>, at 2015-05-17T03:41:41Z

Build only help.txt (with genhelp.py), create 'user-guide' target

Since user-guide.{txt,html} aren't normally needed for anything and add
xsltproc/xmlto as dependencies.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1-include ../../Makefile.settings
2ifdef _SRCDIR_
3_SRCDIR_ := $(_SRCDIR_)doc/user-guide/
4endif
5
6all: help.txt
7
8user-guide: user-guide.txt user-guide.html # user-guide.pdf user-guide.ps user-guide.rtf
9
10%.tex: %.db.xml
11        xsltproc --stringparam l10n.gentext.default.language "en" --stringparam latex.documentclass.common "" --stringparam latex.babel.language "" --output $@ http://db2latex.sourceforge.net/xsl/docbook.xsl $<
12
13%.txt: %.db.xml
14        xmlto --skip-validation txt $<
15        mv $*.db.txt $@
16
17%.html: %.db.xml
18        xsltproc --param generate.consistent.ids 1 --output $@ http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $<
19
20%.pdf: %.db.xml
21        xmlto --skip-validation pdf $<
22        mv $*.db.pdf $@
23
24%.ps: %.db.xml
25        xmlto --skip-validation ps $<
26        mv $*.db.ps $@
27
28help.xml: commands.xml
29
30%.db.xml: %.xml docbook.xsl
31        xsltproc --xinclude --output $@ docbook.xsl $<
32
33help.txt: help.xml help.xsl commands.xml misc.xml quickstart.xml
34        python genhelp.py $< $@
35
36clean: 
37        rm -f *.html *.pdf *.ps *.rtf *.txt *.db.xml
38
39install:
40        mkdir -p $(DESTDIR)$(DATADIR)
41        chmod 0755 $(DESTDIR)$(DATADIR)
42        rm -f $(DESTDIR)$(DATADIR)/help.txt # Prevent help function from breaking in running sessions
43        $(INSTALL) -m 0644 $(_SRCDIR_)help.txt $(DESTDIR)$(DATADIR)/help.txt
44
45uninstall:
46        rm -f $(DESTDIR)$(DATADIR)/help.txt
47        -rmdir $(DESTDIR)$(DATADIR)
48
49.PHONY: clean install uninstall user-guide
Note: See TracBrowser for help on using the repository browser.