Debian Codegraph @

doc/Makefile

raw ◀ ▶
1 Debian patch touch this file
1 #
2 # Makefile for HTMLDOC documentation files.
3 #
4 # Copyright © 2011-2024 by Michael R Sweet.
5 # Copyright © 1997-2010 by Easy Software Products.
6 #
7 # This program is free software. Distribution and use rights are outlined in
8 # the file "COPYING".
9 #
10
11 #
12 # Include common definitions...
13 #
14
15 include ../Makedefs
16
17
18 #
19 # Documentation files...
20 #
21
22 SOURCES = 1-intro.html \
23 2-using.html \
24 3-cmdref.html \
25 4-htmlref.html \
26 5-mdref.html \
27 a-license.html \
28 b-book.html
29
30 DOCUMENTS = htmldoc.epub htmldoc.html htmldoc.pdf htmldoc.ps
•31 DOCFILES = help.html htmldoc.html
32
33 HTMLDOC = ../htmldoc/htmldoc$(EXEEXT) --datadir .. --strict
34
35
36 #
37 # Make everything...
38 #
39
40 all: $(DOCUMENTS)
41
42
43 #
44 # Install everything...
45 #
46
47 install: $(DOCUMENTS)
48 $(INSTALL_DIR) $(BUILDROOT)$(datadir)/doc/htmldoc;
49 for file in $(DOCFILES); do \
50 $(INSTALL_DATA) $$file $(BUILDROOT)$(datadir)/doc/htmldoc; \
51 done
52 $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man1;
53 $(INSTALL_MAN) htmldoc.man $(BUILDROOT)$(mandir)/man1/htmldoc.1
54
55
56 #
57 # Clean out document files...
58 #
59
60 clean:
61 $(RM) $(DOCUMENTS)
62
63
64 #
65 # htmldoc program (dummy rule)
66 #
67
68 ../htmldoc/htmldoc$(EXEEXT):
69 echo Rebuilding documentation...
70
71
72 #
73 # htmldoc.d (directory)
74 #
75
76 .PHONY: htmldoc.d
77 htmldoc.d: $(SOURCES) ../htmldoc/htmldoc$(EXEEXT)
78 echo Formatting htmldoc.d...
79 if test -d htmldoc.d; then \
80 $(RM) -r htmldoc.d; \
81 fi
82 $(MKDIR) htmldoc.d
83 $(VALGRIND) $(HTMLDOC) --batch htmldoc.book --strict -t htmlsep -d htmldoc.d
84
85
86 #
87 # htmldoc.epub
88 #
89
90 htmldoc.epub: $(SOURCES) ../htmldoc/htmldoc$(EXEEXT)
91 echo Formatting htmldoc.epub...
92 $(VALGRIND) $(HTMLDOC) --batch htmldoc.book --strict --titleimage htmldoc-cover.png -f htmldoc.epub
93
94
95 #
96 # htmldoc.html
97 #
98
99 htmldoc.html: $(SOURCES) ../htmldoc/htmldoc$(EXEEXT)
100 echo Formatting htmldoc.html...
101 $(VALGRIND) $(HTMLDOC) --batch htmldoc.book --strict -f htmldoc.html
102
103
104 #
105 # htmldoc.pdf
106 #
107
108 htmldoc.pdf: $(SOURCES) ../htmldoc/htmldoc$(EXEEXT)
109 echo Formatting htmldoc.pdf...
110 $(VALGRIND) $(HTMLDOC) --batch htmldoc.book --strict -f htmldoc.pdf
111
112
113 #
114 # htmldoc.ps
115 #
116
117 htmldoc.ps: $(SOURCES) ../htmldoc/htmldoc$(EXEEXT)
118 echo Formatting htmldoc.ps...
119 $(VALGRIND) $(HTMLDOC) --batch htmldoc.book --strict -f htmldoc.ps