X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=makefile;h=d9bd9d5f3a19f7ad0cc427d2ce7adaa0b0c86f61;hb=7b6c4a0dba2844a0ecc1fd96a951f9c4c021f0a4;hp=cfe6f2016f92e8f6fd580bad4267521ab6f00df4;hpb=c7fe6fa3e9c7f25fc3b14b7fc294dddad730fb32;p=mjotex.git diff --git a/makefile b/makefile index cfe6f20..d9bd9d5 100644 --- a/makefile +++ b/makefile @@ -6,11 +6,14 @@ LATEX = pdflatex -file-line-error -halt-on-error # The name of this document. -PN = paper +PN = examples # A space-separated list of bib files. These must all belong to paths # contained in your $BIBINPUTS environment variable. -BIBS = references.bib +# +# Leave commented if you don't use a bibliography file. +# +#BIBS = references.bib # A space-separated list of the mjotex files that you use. The path to # mjotex must be contain in your $TEXINPUTS environment variable. @@ -95,9 +98,16 @@ $(PN).aux: $(SRCS) # As a side effect, we now need to depend on $(SRCS) here, since we # won't pick it up transitively from $(PN).aux. # +# If the $BIBS variable is undefined, we presume that there are no +# references and create an empty bbl file. Otherwise, we risk trying +# to run biblatex on an aux file containing no citations. +# $(PN).bbl: $(SRCS) | $(PN).aux +ifdef BIBS bibtex $(PN).aux - +else + echo -n '' > $@ +endif # Run chktex to find silly mistakes. There is some exit code weirdness # (Savannah bug 45979), so we just look for empty output. @@ -108,7 +118,7 @@ check: # Clean up leftover junk. .PHONY: clean clean: - rm -f *.{aux,bbl,bcf,bib,blg,lof,log,nav,out,pdf,snm,toc,xml} + rm -f *.{aux,bbl,bcf,bib,blg,listing,lof,log,nav,out,pdf,snm,toc,xml} rm -rf dist/ # If this document will be published, the publisher isn't going to