95 lines
3.4 KiB
Makefile
95 lines
3.4 KiB
Makefile
BASENAME=Beschreibung_des_Vorhabens
|
|
|
|
TEXFILE=$(BASENAME).tex
|
|
PDFFILE=$(BASENAME).pdf
|
|
|
|
REVISION=349ccea82eb50cd94e2aa9e518aa00d97e9957a4
|
|
|
|
SUMMARY=summary
|
|
|
|
all: bib summary clean
|
|
|
|
bib :
|
|
-pdflatex $(TEXFILE)
|
|
-bibtex $(BASENAME)
|
|
-sed -i 's/{Ben.*da}/{\\bibemph{Benda}}/' $(BASENAME).bbl
|
|
-pdflatex $(TEXFILE)
|
|
-pdflatex $(TEXFILE)
|
|
-pdflatex $(TEXFILE)
|
|
@echo
|
|
@echo "BibTeX log:"
|
|
@sed -n -e '1,/You.ve used/p' $(BASENAME).blg
|
|
|
|
pdf: $(PDFFILE)
|
|
$(PDFFILE) : $(TEXFILE)
|
|
pdflatex -interaction=scrollmode $< | tee /dev/stderr | fgrep -q "Rerun to get" && pdflatex -interaction=scrollmode $< || true
|
|
|
|
again :
|
|
pdflatex $(TEXFILE)
|
|
|
|
diff :
|
|
#latexdiff-git -r $(REVISION) --pdf $(TEXFILE)
|
|
latexdiff-git -r $(REVISION) $(TEXFILE)
|
|
-pdflatex $(BASENAME)-diff$(REVISION)
|
|
-bibtex $(BASENAME)-diff$(REVISION)
|
|
-sed -i 's/{Benda}/{\\bibemph{Benda}}/' $(BASENAME)-diff$(REVISION).bbl
|
|
-pdflatex $(BASENAME)-diff$(REVISION)
|
|
-pdflatex $(BASENAME)-diff$(REVISION)
|
|
-pdflatex $(BASENAME)-diff$(REVISION)
|
|
mv $(BASENAME)-diff$(REVISION).pdf $(BASENAME)-diff.pdf
|
|
rm $(BASENAME)-diff$(REVISION).* $(BASENAME)-diff$(REVISION)-blx.*
|
|
|
|
# watch files ###############################################
|
|
watchpdf :
|
|
while true; do ! make -q pdf && make pdf; sleep 0.5; done
|
|
|
|
|
|
# statistics #########################################################
|
|
stats: $(PDFFILE)
|
|
# use \pagestyle{empty} and don't include any pictures!
|
|
@pdftotext -nopgbrk $(PDFFILE) - | fold -s > tmp.txt
|
|
@echo " words: " `wc -w tmp.txt 2> /dev/null | cut -d ' ' -f 1`
|
|
@echo "characters: " `wc -c tmp.txt 2> /dev/null | cut -d ' ' -f 1`
|
|
@rm tmp.txt
|
|
|
|
|
|
# summary #########################################################
|
|
summary: $(SUMMARY).pdf
|
|
$(SUMMARY).pdf : $(SUMMARY).tex
|
|
pdflatex -interaction=scrollmode $< | tee /dev/stderr | fgrep -q "Rerun to get" && pdflatex -interaction=scrollmode $< || true
|
|
|
|
# watch summary ###############################################
|
|
watchsummary :
|
|
while true; do ! make -q summary && make summary; sleep 0.5; done
|
|
|
|
summaryrtf: $(SUMMARY).pdf
|
|
latex2rtf $(SUMMARY).tex
|
|
|
|
|
|
# clean up ############################################################
|
|
clean :
|
|
rm -f *~ $(BASENAME).aux $(BASENAME).bbl $(BASENAME).blg $(BASENAME).bcf $(BASENAME).log $(BASENAME).out $(BASENAME)-blx.bib $(BASENAME).aux.blg $(BASENAME).run.xml $(BASENAME).rtf $(SUMMARY).aux $(SUMMARY).log $(SUMMARY).rtf
|
|
|
|
cleanall: clean
|
|
rm -f $(PDFFILE) $(BASENAME)-diff.pdf $(SUMMARY).pdf
|
|
|
|
|
|
# help ################################################################
|
|
help :
|
|
@echo \
|
|
"make pdf: make the pdf file of the proposal.\n"\
|
|
"make bib: run bibtex and make the pdf file of the proposal.\n"\
|
|
"make again: run latex and make the pdf file of the proposal,\n"\
|
|
" no matter whether you changed the .tex file or not.\n"\
|
|
"make watchpdf: make the pdf file of the paper\n"\
|
|
" whenever the tex file is modified.\n"\
|
|
"make diff: make a diff file since REVISION.\n"\
|
|
"make stats: print number of words and characters.\n"\
|
|
"make summary: make the pdf file of the summary.\n"\
|
|
"make watchsummary: make the pdf file of the summary\n"\
|
|
" whenever the tex file is modified.\n"\
|
|
"make summaryrtf: make a rtf file of the summary.\n"\
|
|
"make clean: remove all intermediate files,\n"\
|
|
" just leave the source files and the final .pdf files.\n"\
|
|
"make cleanall: clean and remove the final .pdf files."
|