Debian Codegraph @

documentation/Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #
2 # Makefile for the Fast Light Tool Kit (FLTK) documentation.
3 #
4 # Copyright 1998-2020 by Bill Spitzak and others.
5 #
6 # This library is free software. Distribution and use rights are outlined in
7 # the file "COPYING" which should have been included with this file. If this
8 # file is missing or damaged, see the license at:
9 #
10 # https://www.fltk.org/COPYING.php
11 #
12 # Please see the following page on how to report bugs and issues:
13 #
14 # https://www.fltk.org/bugs.php
15 #
16
17 # Get configuration stuff...
18 include ../makeinclude
19
20 # make sure that all docs are (re-)created independent of missing deps
21 .PHONY: pdf html refman.pdf
22
23 SRC_DOCDIR = ./src
24
25 # These are the HTML "source" files...
26 HTMLFILES = \
27 $(SRC_DOCDIR)/index.dox \
28 $(SRC_DOCDIR)/preface.dox \
29 $(SRC_DOCDIR)/intro.dox \
30 $(SRC_DOCDIR)/basics.dox \
31 $(SRC_DOCDIR)/common.dox \
32 $(SRC_DOCDIR)/editor.dox \
33 $(SRC_DOCDIR)/drawing.dox \
34 $(SRC_DOCDIR)/events.dox \
35 $(SRC_DOCDIR)/subclassing.dox \
36 $(SRC_DOCDIR)/opengl.dox \
37 $(SRC_DOCDIR)/fluid.dox \
38 $(SRC_DOCDIR)/advanced.dox \
39 $(SRC_DOCDIR)/unicode.dox \
40 $(SRC_DOCDIR)/enumerations.dox \
41 $(SRC_DOCDIR)/glut.dox \
42 $(SRC_DOCDIR)/forms.dox \
43 $(SRC_DOCDIR)/osissues.dox \
44 $(SRC_DOCDIR)/migration_1_1.dox \
45 $(SRC_DOCDIR)/migration_1_3.dox \
46 $(SRC_DOCDIR)/development.dox \
47 $(SRC_DOCDIR)/license.dox \
48 $(SRC_DOCDIR)/examples.dox \
49 $(SRC_DOCDIR)/faq.dox
50
51 MANPAGES = $(SRC_DOCDIR)/fltk.$(CAT3EXT) $(SRC_DOCDIR)/fltk-config.$(CAT1EXT) \
52 $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(SRC_DOCDIR)/blocks.$(CAT6EXT) \
53 $(SRC_DOCDIR)/checkers.$(CAT6EXT) $(SRC_DOCDIR)/sudoku.$(CAT6EXT)
54
55 all: $(MANPAGES)
56
57 # Use `make docs' to create all docs for distribution files.
58 # You need installed versions of Doxygen and LaTeX for this.
59
60 docs: all html pdf
61
62 # Synonyms for docs:
63
64 alldocs: docs
65 dist: docs
66
67 clean:
68 $(RM) Doxyfile Doxybook
69 $(RM) fltk.pdf refman.pdf src/fltk-book.tex src/fltk-book.tex.in
70 $(RMDIR) html latex
71 $(RM) *~ *.bck *.bak *.log
72 $(RM) $(MANPAGES) $(SRC_DOCDIR)/*.0
73
74 depend:
75
76 install: $(MANPAGES)
77 echo "Installing documentation files in $(DESTDIR)$(docdir) ..."
78 -$(INSTALL_DIR) $(DESTDIR)$(docdir)
79 if test -f html/index.html ; then \
80 for file in html/* ; do \
81 $(INSTALL_DATA) $$file $(DESTDIR)$(docdir); \
82 done \
83 fi
84 if test -f fltk.pdf ; then \
85 echo "Installing fltk.pdf in $(DESTDIR)$(docdir) ..."; \
86 $(INSTALL_DATA) fltk.pdf $(DESTDIR)$(docdir); \
87 fi
88 echo "Installing man pages in $(DESTDIR)$(mandir) ..."
89 -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat1
90 $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
91 $(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
92 -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat3
93 $(INSTALL_MAN) $(SRC_DOCDIR)/fltk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3
94 -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1
95 $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.man $(DESTDIR)$(mandir)/man1/fluid.1
96 $(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.man $(DESTDIR)$(mandir)/man1/fltk-config.1
97 -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man3
98 $(INSTALL_MAN) $(SRC_DOCDIR)/fltk.man $(DESTDIR)$(mandir)/man3/fltk.3
99
100 install-linux install-osx:
101 -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat6
102 $(INSTALL_MAN) $(SRC_DOCDIR)/blocks.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
103 $(INSTALL_MAN) $(SRC_DOCDIR)/checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
104 $(INSTALL_MAN) $(SRC_DOCDIR)/sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
105 -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man6
106 $(INSTALL_MAN) $(SRC_DOCDIR)/blocks.man $(DESTDIR)$(mandir)/man6/blocks.6
107 $(INSTALL_MAN) $(SRC_DOCDIR)/checkers.man $(DESTDIR)$(mandir)/man6/checkers.6
108 $(INSTALL_MAN) $(SRC_DOCDIR)/sudoku.man $(DESTDIR)$(mandir)/man6/sudoku.6
109
110
111 uninstall:
112 $(RMDIR) $(DESTDIR)$(docdir)
113 $(RM) $(DESTDIR)$(mandir)/cat1/fluid.$(CAT1EXT)
114 $(RM) $(DESTDIR)$(mandir)/man1/fluid.1
115 $(RM) $(DESTDIR)$(mandir)/cat1/fltk-config.$(CAT1EXT)
116 $(RM) $(DESTDIR)$(mandir)/man1/fltk-config.1
117 $(RM) $(DESTDIR)$(mandir)/cat3/fltk.$(CAT3EXT)
118 $(RM) $(DESTDIR)$(mandir)/man3/fltk.3
119
120 uninstall-linux uninstall-osx:
121 $(RM) $(DESTDIR)$(mandir)/cat6/blocks.$(CAT6EXT)
122 $(RM) $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT)
123 $(RM) $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT)
124 $(RM) $(DESTDIR)$(mandir)/man6/blocks.6
125 $(RM) $(DESTDIR)$(mandir)/man6/checkers.6
126 $(RM) $(DESTDIR)$(mandir)/man6/sudoku.6
127
128 # The documentation is generated using doxygen. There are two control files
129 # for doxygen: Doxyfile for html documentation and Doxybook for pdf docs.
130 # Both files are generated from the common source file Doxyfile.in.
131 # Note that Doxyfile.in is shared with CMake to configure these files.
132
133 Doxyfile: Doxyfile.in
134 echo "Generating Doxyfile ..."
135 sed -e's,@FLTK_VERSION@,$(FLTK_VERSION),' \
136 -e's,@GENERATE_HTML@,YES,' \
137 -e's,@GENERATE_LATEX@,NO,' \
138 -e's, @LATEX_HEADER@,,' \
139 -e's,@CMAKE_CURRENT_SOURCE_DIR@/,,' \
140 -e's,@FLTK_SOURCE_DIR@/,../,' \
141 < $< > $@
142
143 Doxybook: Doxyfile.in
144 echo "Generating Doxybook ..."
145 sed -e's,@FLTK_VERSION@,$(FLTK_VERSION),' \
146 -e's,@GENERATE_HTML@,NO,' \
147 -e's,@GENERATE_LATEX@,YES,' \
148 -e's,@LATEX_HEADER@,src/fltk-book.tex,' \
149 -e's,@CMAKE_CURRENT_SOURCE_DIR@/,,' \
150 -e's,@FLTK_SOURCE_DIR@/,../,' \
151 < $< > $@
152
153 # The HTML files are generated using doxygen, and this needs
154 # an installed doxygen version and may take some time, so this target
155 # is not made by default.
156 # Use `make html' or `make docs' to create the html docs.
157
158 html: $(HTMLFILES) Doxyfile
159 echo "Generating HTML documentation..."
160 -$(RMDIR) html
161 -$(INSTALL_DIR) html
162 -$(DOXYDOC)
163 if test "x$(DOXYDOC)" = "x" ; then \
164 echo "Sorry - doxygen not found. Please install doxygen and run configure."; \
165 fi
166 test -d html && cp src/tiny.png html/
167
168 # The PDF documentation (fltk.pdf) is generated using doxygen and LaTeX, and
169 # this needs installed Doxygen and LaTeX programs and may take some time, so
170 # this target is not made by default.
171 # Use `make pdf' or `make docs' to create the PDF docs.
172
173 pdf: refman.pdf
174 cp -f latex/refman.pdf fltk.pdf
175
176 refman.pdf: $(HTMLFILES) Doxybook src/fltk-book.tex
177 -$(RMDIR) latex
178 echo "Generating PDF documentation ..."
179 $(DOXYDOC) Doxybook
180 ./make_pdf
181
182 src/fltk-book.tex: src/fltk-book.tex.in
183 echo "Generating $@ ..."
184 DOXY_VERSION=`$(DOXYDOC) --version|cut -f1 -d' '`; \
185 YEAR=`date +%Y`; \
186 sed -e"s/@YEAR@/$$YEAR/g" \
187 -e"s/@FLTK_VERSION@/$(FLTK_VERSION)/g" \
188 -e"s/@DOXY_VERSION@/$$DOXY_VERSION/g" \
189 < $< > $@
190
191 src/fltk-book.tex.in: src/fltk-title.tex.in
192 echo "Generating $@ ..."
193 ./make_header src/fltk-title.tex.in src/fltk-book.tex.in