source: doc/user-guide/Makefile @ fd45e859

Last change on this file since fd45e859 was fd45e859, checked in by dequis <dx@…>, at 2015-06-04T17:13:22Z

Allow building docs from any directory

Also just remove the .git check completely - just rely on make skipping
it if it exists already.

  • Property mode set to 100644
File size: 1.4 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: $(_SRCDIR_)help.xml $(_SRCDIR_)commands.xml $(_SRCDIR_)misc.xml $(_SRCDIR_)quickstart.xml
34        python $(_SRCDIR_)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.