-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (50 loc) · 1.64 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This file is part of proScientia.ltx
# (c) 2022 Karsten Reincke (https://github.com/kreincke/proScientia.ltx)
# It is distributed under the terms of the creative commons license
# CC-BY-4.0 (= https://creativecommons.org/licenses/by/4.0/)
#LATEX=latex
LATEX=pdflatex
AUX_EXTS=url bbl blg aux dvi toc log lof nlo nls ilg ils ent out log bcf xml
RES_EXTS=ps pdf
SUBDIRS=snippets tools
default: proScientia-de.pdf
help:
echo "make | make YOURFILE.pdf"
.SUFFIXES: .tex .dvi .ps .pdf .rtf
.tex.pdf:
@ echo "### `date +'%Y%m%dT%H%M%S'`"
@ echo "### converting $< to $@"
@ $(LATEX) $<
@ biber `basename $< .tex`
@ makeindex `basename $< .tex`.nlo -s cfg/nomencl.ist -o `basename $< .tex`.nls
@ $(LATEX) $<
@ $(LATEX) $<
ifneq ($(LATEX),pdflatex)
@ echo "### converting DVI to PostScript"
@ dvips $<
@ echo "### converting PostScript to PDF"
@ ps2pdf $<
endif
@ mv $@ `basename $@ .pdf`-`cat cfg/inc.rel.tex`.pdf
@ make clearAuxFiles
.tex.dvi:
@ echo "### `date +'%Y%m%dT%H%M%S'`"
@ echo "### converting $< to $@"
@ latex $<
@ biber `basename $< .tex`
@ makeindex `basename $< .tex`.nlo -s cfg/nomencl.ist -o `basename $< .tex`.nls
@ latex $<
@ latex $<
.dvi.ps:
@ echo "### `date +'%Y%m%dT%H%M%S'`"
@ echo "### converting $< to $@"
@ dvips $<
clearAuxFiles:
$(foreach EXT, ${AUX_EXTS}, if [ ! "x`ls *.${EXT} 2>/dev/null`" = "x" ]; then rm *.${EXT}; fi;)
clear: clearAuxFiles
clean: clearAuxFiles
$(foreach EXT, ${RES_EXTS}, if [ ! "x`ls *.${EXT} 2>/dev/null`" = "x" ]; then rm *.${EXT}; fi;)
dclear: clear
$(foreach DIR, ${SUB_DIRS}, cd ${DIR} && make clear && cd ..;)
dclean: clean
$(foreach DIR, ${SUB_DIRS}, cd ${DIR} && make clean && cd ..;)