summaryrefslogtreecommitdiff
path: root/documentation/Makefile
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-09-20 14:44:14 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-09-21 14:32:46 +0200
commitb713b919756fd420063e7defc30bfc21996de636 (patch)
tree59e0f3bcd8dcb4c27413f3f533c27a6e2d2bea87 /documentation/Makefile
parentf072cec13fb7afcc7726bda38869825f963bb483 (diff)
PDF docs: generate LaTeX header file from source
The LaTeX header file used when creating PDF documentation depends on the doxygen and latex versions, respectively. The old header file 'documentation/src/fltk-book.tex.in' had been generated manually and needed to be updated for new doxygen versions which made the PDF documentation generation dependent on the doxygen/latex versions on the build system. The new LaTeX header file 'fltk-book.tex' is generated by doxygen, i.e. taking into account the doxygen and latex versions on the build system and "edited" to include the page title defined in the new file 'documentation/src/fltk-title.tex.in'. This makes the PDF documentation independent of the doxygen and latex versions of the build system.
Diffstat (limited to 'documentation/Makefile')
-rw-r--r--documentation/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
index 5e95ad5b8..43be79ffd 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -66,7 +66,7 @@ dist: docs
clean:
$(RM) Doxyfile Doxybook
- $(RM) fltk.pdf refman.pdf src/fltk-book.tex
+ $(RM) fltk.pdf refman.pdf src/fltk-book.tex src/fltk-book.tex.in
$(RMDIR) html latex
$(RM) *~ *.bck *.bak *.log
$(RM) $(MANPAGES) $(SRC_DOCDIR)/*.0
@@ -180,9 +180,14 @@ refman.pdf: $(HTMLFILES) Doxybook src/fltk-book.tex
./make_pdf
src/fltk-book.tex: src/fltk-book.tex.in
- DOXY_VERSION=`$(DOXYDOC) --version`; \
+ echo "Generating $@ ..."
+ DOXY_VERSION=`$(DOXYDOC) --version|cut -f1 -d' '`; \
YEAR=`date +%Y`; \
sed -e"s/@YEAR@/$$YEAR/g" \
-e"s/@FLTK_VERSION@/$(FLTK_VERSION)/g" \
-e"s/@DOXY_VERSION@/$$DOXY_VERSION/g" \
< $< > $@
+
+src/fltk-book.tex.in: src/fltk-title.tex.in
+ echo "Generating $@ ..."
+ ./make_header src/fltk-title.tex.in src/fltk-book.tex.in