1# latex.mk: build documentation from LaTeX sources 2# 3################################################################ 4# Copyright (C) 2001 Tom Lord 5# Copyright (C) 2003 Stig Brautaset 6# 7# See the file "COPYING" for further information about 8# the copyright and warranty status of this work. 9# 10 11 12 13ifndef latex-mk 14latex-mk := 1 15 16# Build documentation from LaTeX sources 17# 18# Optionally set on entry: 19# 20# $(latex-docs) LaTeX file to pass to `latex' 21# (default: "manual.tex") 22# 23# 24 25 26include $(makefiles)/rules.mk 27 28ifndef latex-docs 29latex-docs := manual.tex 30endif 31 32latex-files := $(wildcard *.tex) 33 34latex-build-dir := latex-tmp-dir 35 36 37 38link-latex-files: $(latex-files) 39 mkdir -p $(latex-build-dir) 40 cd $(latex-build-dir) ; \ 41 for f in * ,,fake.tex ; do \ 42 test ! -e $$f || rm -r $$f ; \ 43 done ; \ 44 ln -s $(srcdir)/* . 45 46 47clean: clean-latex-build-files 48 49clean-doc: clean-latex-build-files 50 51clean-latex-build-files: 52 for f in $(latex-build-dir) ; do \ 53 test ! -e $$f || rm -r $$f ; \ 54 done 55 56endif 57 58# arch-tag: Stig Brautaset Sat Mar 8 23:19:03 GMT 2003 (latex.mk) 59# 60