2015-01-13 11:10:24 +01:00
|
|
|
###########################################################################
|
|
|
|
# Automating proposal management by make.
|
|
|
|
# The participants work on proposal.tex in "draft" mode, which gives a lot
|
|
|
|
# of information to the developers. Variants submit.tex and public.tex are
|
|
|
|
# used to prepare official versions (hiding development/private info).
|
|
|
|
###########################################################################
|
2014-02-15 12:01:14 +01:00
|
|
|
# possibly customize the following variables to your setting
|
|
|
|
PROPOSAL = proposal.tex # the proposal
|
|
|
|
BIB = ../lib/dummy.bib # bibTeX databases
|
|
|
|
PROP.dir = ../../..
|
|
|
|
###########################################################################
|
|
|
|
# the following are computed
|
|
|
|
TARGET = $(PROPOSAL) # all pdflatex targets
|
|
|
|
TARGET.pdf = $(TARGET:%.tex=%.pdf) # PDFs to be produced
|
|
|
|
TARGET.aux = $(TARGET:%.tex=%.aux) # their aux files.
|
|
|
|
PDATA = $(PROPOSAL:%.tex=%.pdata) # the proposal project data
|
|
|
|
SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
|
|
|
|
PDFLATEX = pdflatex -interaction batchmode -file-line-error
|
|
|
|
BBL.base = 1
|
2015-01-13 11:10:24 +01:00
|
|
|
BBL = $(PROPOSAL:%.tex=%.bbl) $(BBL.base:%=$(PROPOSAL:%.tex=%)%-blx.bbl)
|
2014-02-15 12:01:14 +01:00
|
|
|
PROPCLS.dir = $(PROP.dir)/base
|
|
|
|
PROPETC.dir = $(PROP.dir)/etc
|
|
|
|
DFGPROPCLS.dir = $(PROP.dir)/dfg
|
|
|
|
TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
|
|
|
|
BIBINPUTS := ../lib:$(BIBINPUTS)
|
|
|
|
PROPCLS.clssty = proposal.cls pdata.sty
|
|
|
|
PROPETC.sty = workaddress.sty metakeys.sty sref.sty
|
|
|
|
DFGPROPCLS.clssty = dfgproposal.cls dfgpdata.sty
|
|
|
|
PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
|
|
|
|
|
|
|
|
all: $(TARGET.pdf)
|
|
|
|
|
2015-01-13 11:10:24 +01:00
|
|
|
submit:
|
2015-08-06 15:04:50 +02:00
|
|
|
$(MAKE) -w PROPOSAL=submit.tex all
|
2015-01-13 11:10:24 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
$(MAKE) -w PROPOSAL=public.tex all
|
|
|
|
|
2014-02-15 12:01:14 +01:00
|
|
|
cd: # make cd will prepare CD for burning
|
|
|
|
mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
|
|
|
|
|
|
|
|
bbl: $(BBL)
|
|
|
|
$(BBL): %.bbl: %.aux
|
|
|
|
bibtex -min-crossrefs=100 -terse $<
|
|
|
|
|
|
|
|
$(PDATA): %.pdata: %.tex
|
|
|
|
$(PDFLATEX) $<
|
|
|
|
|
|
|
|
$(TARGET.aux): %.aux: %.tex
|
|
|
|
$(PDFLATEX) $<
|
|
|
|
|
|
|
|
$(TARGET.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
|
|
|
|
$(PDFLATEX) $< || $(RM) $@
|
|
|
|
# sort $(PROPOSAL:%.tex=%.delivs) > $(PROPOSAL:%.tex=%.deliverables)
|
|
|
|
@if (test -e $(patsubst %.tex, %.idx, $<));\
|
|
|
|
then makeindex $(patsubst %.tex, %.idx, $<); fi
|
|
|
|
$(MAKE) -$(MAKEFLAGS) $(BBL)
|
|
|
|
@if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
|
|
|
|
then $(MAKE) -B $(BBL); fi
|
|
|
|
$(PDFLATEX) $< || $(RM) $@
|
|
|
|
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
|
|
|
|
then $(PDFLATEX) $< || $(RM) $@; fi
|
|
|
|
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
|
|
|
|
then $(PDFLATEX) $< || $(RM) $@; fi
|
|
|
|
|
|
|
|
clean:
|
2016-06-12 10:54:23 +02:00
|
|
|
rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg *.run.xml *.synctex.gz *.cut
|
2014-02-15 12:01:14 +01:00
|
|
|
|
|
|
|
distclean: clean
|
2016-06-12 10:54:23 +02:00
|
|
|
rm -f *.aux *.ind *.gls *.ps *.dvi *.thm *.out *.run.xml *.bbl *.toc *.deliv* *.pdata
|
2014-02-15 12:01:14 +01:00
|
|
|
rm -Rf auto
|
|
|
|
|
|
|
|
echo:
|
2016-06-12 10:54:23 +02:00
|
|
|
@echo $(BIBINPUTS)
|