topsrc = @top_srcdir@ TEXDIR = $(topsrc)/doc/tex PKG = SVAR DOCDIR = $(topsrc)/addons/$(PKG)/doc FIGS = awm-irfc.pdf \ awm-irfi.pdf \ awm-irfy.pdf \ bqhdu.pdf \ bqhdy.pdf \ bq_ud.pdf \ bq_us.pdf \ bq_Yd.pdf \ bq_Ys.pdf \ Cmodel_hd.pdf \ dynamic_IS.pdf \ FEVD_1.pdf \ FEVD_2.pdf \ GUI_SVAR.png \ dialog_mat.png \ Output.png \ simpleC_11_noboot.pdf \ simpleC_11.pdf \ simpleC_12.pdf \ simpleC_21.pdf \ simpleC_22.pdf \ simpleC_gretl.pdf \ TMPL.png SRCS = $(PKG).bib $(PKG).tex $(FIGS) gretl.bst gretlhds.sty $(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 @for f in $(PKG).bib $(PKG).tex $(FIGS) ; do \ if [ ! -f $$f ] || [ $(DOCDIR)/$$f -nt $$f ] ; then ln -sf $(DOCDIR)/$$f . ; fi ; done clean : @rm -f *.aux *.log *.bbl *.blg *.toc $(PKG).pdf