28 lines
531 B
Makefile
28 lines
531 B
Makefile
# Syntax
|
|
# <target>: <dependencies>
|
|
# <command>
|
|
# ...
|
|
|
|
# variables
|
|
LATEX = pdflatex
|
|
BIB = bibtex
|
|
|
|
all: linux-24.pdf
|
|
|
|
# creating a pdf outof tex and bib file
|
|
# % = filename without ending
|
|
# $* = filename corresponding to %
|
|
%.pdf: %.tex %.bib
|
|
$(LATEX) $*
|
|
$(BIB) $*
|
|
$(LATEX) $*
|
|
|
|
# check if "undefined references" in Log-File
|
|
# using shell commands
|
|
if grep -q "undefined references" $*.log; then \
|
|
$(LATEX) $*; \
|
|
fi
|
|
|
|
# remove all created files
|
|
clean:
|
|
rm -f *.pdf *.aux *.log *.bbl *.blg *.fdb_latexmk *.fls *.synctex.gz
|