Fix build process of PDF docs on macOS and update .gitignore

Note: the syntax of command/switch `sed -i` is slightly different
  on macOS vs. Linux and should not be used.

Move .gitignore parts referring to /documentation/ to their own file
  'documentation/.gitignore' and add new generated file(s).
This commit is contained in:
Albrecht Schlosser 2022-09-23 15:27:05 +02:00
parent eb0bba4058
commit 6472f9b041
3 changed files with 58 additions and 45 deletions

37
.gitignore vendored
View File

@ -51,42 +51,7 @@ etc/FLTKConfig.cmake
/cairo/*.dll /cairo/*.dll
# /documentation/ # /documentation/
/documentation/.xvpics # see documentation/.gitignore
/documentation/blocks.0
/documentation/blocks.6
/documentation/blocks.z
/documentation/checkers.0
/documentation/checkers.6
/documentation/checkers.z
/documentation/Doxybook
/documentation/Doxyfile
/documentation/fltk.0
/documentation/fltk.3
/documentation/fltk-config.0
/documentation/fltk-config.1
/documentation/fltk-config.z
/documentation/fltk.d
/documentation/fltk.pdf
/documentation/fltk.z
/documentation/fluid.0
/documentation/fluid.1
/documentation/fluid.z
/documentation/html
/documentation/latex
/documentation/sudoku.0
/documentation/sudoku.6
/documentation/sudoku.z
/documentation/*.bck
/documentation/*.bak
/documentation/*.log
# /documentation/src/
/documentation/src/*.0
/documentation/src/*.1
/documentation/src/*.3
/documentation/src/*.6
/documentation/src/*.z
/documentation/src/fltk-book.tex
# /examples/ # /examples/
# see examples/.gitignore # see examples/.gitignore

45
documentation/.gitignore vendored Normal file
View File

@ -0,0 +1,45 @@
#
# Files to be ignored by Git (do not commit)
#
# /documentation/
.xvpics
blocks.0
blocks.6
blocks.z
checkers.0
checkers.6
checkers.z
copyright.dox
Doxybook
Doxyfile
fltk.0
fltk.3
fltk-config.0
fltk-config.1
fltk-config.z
fltk.d
fltk.pdf
fltk.z
fluid.0
fluid.1
fluid.z
generated.dox
html
latex
sudoku.0
sudoku.6
sudoku.z
*.bck
*.bak
*.log
# /documentation/src/
src/*.0
src/*.1
src/*.3
src/*.6
src/*.z
src/fltk-book.tex
src/fltk-book.tex.in
src/fltk-title.tex

View File

@ -68,7 +68,7 @@ dist: docs
clean: clean:
$(RM) Doxyfile Doxybook $(RM) Doxyfile Doxybook
$(RM) copyright.dox generated.dox $(RM) copyright.dox generated.dox
$(RM) fltk.pdf refman.pdf src/fltk-book.tex src/fltk-book.tex.in $(RM) fltk.pdf refman.pdf src/fltk-title.tex src/fltk-book.tex.in src/fltk-book.tex
$(RMDIR) html latex $(RMDIR) html latex
$(RM) *~ *.bck *.bak *.log $(RM) *~ *.bck *.bak *.log
$(RM) $(MANPAGES) $(SRC_DOCDIR)/*.0 $(RM) $(MANPAGES) $(SRC_DOCDIR)/*.0
@ -182,6 +182,16 @@ refman.pdf: $(HTMLFILES) Doxybook src/fltk-book.tex
$(DOXYDOC) Doxybook $(DOXYDOC) Doxybook
./make_pdf ./make_pdf
src/fltk-title.tex: src/fltk-title.tex.in
echo "Generating $@ ..."
GIT_REVISION=`git rev-parse --short=10 HEAD`; \
sed -e"s/@GIT_REVISION@/$$GIT_REVISION/g" \
< $< > $@
src/fltk-book.tex.in: src/fltk-title.tex
echo "Generating $@ ..."
./make_header $< $@
src/fltk-book.tex: src/fltk-book.tex.in src/fltk-book.tex: src/fltk-book.tex.in
echo "Generating $@ ..." echo "Generating $@ ..."
DOXY_VERSION=`$(DOXYDOC) --version|cut -f1 -d' '`; \ DOXY_VERSION=`$(DOXYDOC) --version|cut -f1 -d' '`; \
@ -189,14 +199,7 @@ src/fltk-book.tex: src/fltk-book.tex.in
sed -e"s/@YEAR@/$$YEAR/g" \ sed -e"s/@YEAR@/$$YEAR/g" \
-e"s/@FLTK_VERSION@/$(FLTK_VERSION)/g" \ -e"s/@FLTK_VERSION@/$(FLTK_VERSION)/g" \
-e"s/@DOXY_VERSION@/$$DOXY_VERSION/g" \ -e"s/@DOXY_VERSION@/$$DOXY_VERSION/g" \
< $< > $@ < $< > $@
src/fltk-book.tex.in: src/fltk-title.tex.in
echo "Generating $@ ..."
GIT_REVISION=`git rev-parse --short=10 HEAD`; \
./make_header $< $@; \
sed -i -e"s/@GIT_REVISION@/$$GIT_REVISION/g" $@
generated.dox: generated.dox.in generated.dox: generated.dox.in
echo "Generating $@ ..." echo "Generating $@ ..."