# 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
+SRCS += $(shell kpsewhich $(BIBS))
+endif
+ifdef MJOTEX
+SRCS += $(shell kpsewhich $(MJOTEX))
+endif
# The first target is the default, so put the PDF document first.