# Use kpsewhich (from the kpathsea suite) to find the absolute paths
# of the bibtex/mjotex files listed in in $(BIBS)/$(MJOTEX). The SRCS
# variable should contain all (Bib)TeX source files for the document.
-SRCS = $(PN).tex $(shell kpsewhich $(BIBS)) $(shell kpsewhich $(MJOTEX))
+SRCS = $(PN).tex
+ifdef BIBS
+BIBPATHS = $(shell kpsewhich $(BIBS))
+SRCS += $(BIBPATHS)
+endif
+ifdef MJOTEX
+MJOTEXPATHS = $(shell kpsewhich $(MJOTEX))
+SRCS += $(MJOTEXPATHS)
+endif
# The first target is the default, so put the PDF document first.
# Clean up leftover junk.
.PHONY: clean
clean:
- rm -f *.{aux,bbl,bcf,bib,blg,listing,lof,log,nav,out,pdf,snm,toc,xml}
+ rm -f *.{aux,bbl,bcf,bib,blg,listing,lof,log}
+ rm -f *.{nav,out,pdf,snm,spl,toc,xml}
rm -rf dist/
# If this document will be published, the publisher isn't going to
.PHONY: dist
dist: $(PN).bbl
mkdir -p dist
- cp $(SRCS) $(PN).bbl dist/
+ cp $(SRCS) $(PN).bbl $(BIBPATHS) $(MJOTEXPATHS) dist/