Not sure if this belongs here - but its bugging me. I have a makefile :
DOCNAME=SI16-SC13B038
D1=Abstract
D2=Bonafide
D3=Declaration
D4=Introduction
DBIB=References
TEXDEP=$(D1)/*tex $(D2)/*tex $(D3)/*tex $(D4)/*tex
all: $(DOCNAME).pdf
$(DOCNAME).pdf: $(DOCNAME).tex $(TEXDEP) $(DOCNAME).nls $(DOCNAME).bbl
pdflatex $(DOCNAME) && pdflatex $(DOCNAME)
$(DOCNAME).nls: $(DOCNAME).nlo
makeindex $^ -s nomencl.ist -o $@
$(DOCNAME).nlo: $(DOCNAME).tex $(TEXDEP)
pdflatex $(DOCNAME)
$(DOCNAME).bbl: $(DOCNAME).tex $(TEXDEP) $(DBIB)/*bib
pdflatex $(DOCNAME) && bibtex $(DOCNAME)
.PHONY: clean
clean:
rm -f *.pdf *.bbl *.nlo *.nls
As can be seen, the current directory contains SI16-SC13B038.tex, which is the main tex file - there are other tex files in directories (stored in variables D1,D2,D3,D4) which are included in the main one. I am using the nomencl package for nomenclatures and natbib for the bibliography (the references are in the directory name stored in DBIB).
The issue I am having is that the make file does not seem to evaluate dependencies - how many ever times I invoke make all the operations are done. Something's wrong with the makefile - help me out!
TEXDEP=$(DOCNAME).nloshould beTEXDEP=$(DOCNAME).nlsas the nlo file is written out each time so newer than your source – David Carlisle Jul 08 '16 at 16:02