1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
topsrc = @top_srcdir@
TEXDIR = $(topsrc)/doc/tex
PKG = gig
DOCDIR = $(topsrc)/addons/$(PKG)/doc
SRCS = $(PKG).bib $(PKG).tex gretl.bst gretlhds.sty graphs
$(PKG).pdf: $(SRCS)
@pdflatex $(PKG) && bibtex $(PKG) && pdflatex $(PKG) && pdflatex $(PKG)
@if grep 'Rerun to get' $(PKG).log ; then pdflatex $(PKG) ; fi
$(SRCS): | symlinks
.PHONY : symlinks clean
symlinks:
@for f in gretl.bst gretlhds.sty ; do \
if [ ! -f $$f ] || [ $(TEXDIR)/$$f -nt $$f ] ; then ln -sf $(TEXDIR)/$$f . ; fi ; done
@if [ ! -d graphs ] || [ $(DOCDIR)/graphs -nt graphs ] ; then ln -sf $(DOCDIR)/graphs . ; fi
@for f in $(PKG).bib $(PKG).tex ; do \
if [ ! -f $$f ] || [ $(DOCDIR)/$$f -nt $$f ] ; then ln -sf $(DOCDIR)/$$f . ; fi ; done
clean:
@rm -f *.log *.aux *.bbl *.blg *.toc $(PKG).pdf
|