Debian Codegraph @

texmf-dist/doc/latex/proposal/dfg/report/Makefile

raw
1 # possibly customize the following variables to your setting
2 REPORT = finalreport.tex # the report
3 BIB = ../lib/dummy.bib # bibTeX databases
4 PROP.dir = ../../..
5 ###########################################################################
6 # the following are computed
7 #CVP = $(shell ls CV_PubList*.tex) # CVs of the proposers
8 #TSIMP = letter_submission.tex # pdflatex Targets without bibTeX
9 #TSIMP.pdf = $(TSIMP:%.tex=%.pdf) # PDFs to be produced
10 TBIB = $(REPORT) #$(CVP) # pdflatex Targets with bibTeX
11 TARGET = $(TSIMP) $(TBIB) # all pdflatex targets
12 TBIB.pdf = $(TBIB:%.tex=%.pdf) # PDFs to be produced
13 TBIB.aux = $(TBIB:%.tex=%.aux) # their aux files.
14 PDATA = $(REPORT:%.tex=%.pdata) # the proposal project data
15 SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
16 PDFLATEX = pdflatex -interaction batchmode -file-line-error
17 BBL = $(REPORT:%.tex=%.bbl) $(REPORT:%.tex=%1-blx.bbl) $(REPORT:%.tex=%2-blx.bbl) #$(CVP:%.tex=%.bbl)
18 PROPCLS.dir = $(PROP.dir)/base
19 PROPETC.dir = $(PROP.dir)/etc
20 DFGPROPCLS.dir = $(PROP.dir)/dfg
21 TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
22 BIBINPUTS := ../lib:$(BIBINPUTS)
23 PROPCLS.clssty = reporting.cls pdata.sty
24 PROPETC.sty = workaddress.sty metakeys.sty sref.sty
25 DFGPROPCLS.clssty = dfgreporting.cls dfgpdata.sty
26 PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
27
28 all: $(TBIB.pdf) $(TSIMP.pdf)
29
30 cd: # make cd will prepare CD for burning
31 mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
32
33 $(BBL): %.bbl: %.aux
34 bibtex -min-crossrefs=100 -terse $<
35
36 $(TSIMP.pdf): %.pdf: %.tex $(PROPCLS) $(PDATA)
37 $(PDFLATEX) $< || $(RM) $@
38
39 $(PDATA): %.pdata: %.tex
40 $(PDFLATEX) $<
41
42 $(TBIB.aux): %.aux: %.tex
43 $(PDFLATEX) $<
44
45 $(TBIB.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
46 $(PDFLATEX) $< || $(RM) $@
47 # sort $(REPORT:%.tex=%.delivs) > $(REPORT:%.tex=%.deliverables)
48 @if (test -e $(patsubst %.tex, %.idx, $<));\
49 then makeindex $(patsubst %.tex, %.idx, $<); fi
50 $(MAKE) -$(MAKEFLAGS) $(BBL)
51 @if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
52 then $(MAKE) -B $(BBL); fi
53 $(PDFLATEX) $< || $(RM) $@
54 @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
55 then $(PDFLATEX) $< || $(RM) $@; fi
56 @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
57 then $(PDFLATEX) $< || $(RM) $@; fi
58
59 clean:
60 rm -f *.log *.blg *~ *.synctex.gz *.cut
61
62 distclean: clean
63 rm -f *.aux *.out *.run.xml *.bbl *.toc *.deliv* *.pdata
64 rm -Rf auto
65
66 echo:
67 echo $(BIBINPUTS)