# Last edited on 2011-10-18 18:55:41 by stolfi JOBNAME := collatz-tr SIZE := letter FMT := pdf PARTS := NOTPARTS := MACROS := \ macros-jsmath.tex \ techrep-ic.sty BIBS := \ stolfi.bib \ students.bib \ others.bib SUBDIRS := \ figures NEWTEX := export TEXINPUTS=".:${STOLFIHOME}/tex/inputs::" RUN_LATEX := ${STOLFIHOME}/bin/run-latex PSVIEW := gv # PDFVIEW := acroread PDFVIEW := gv .PHONY: all clean subdirs display-ps display-pdf all: subdirs ${JOBNAME}.dvi ${JOBNAME}.${FMT} display-${FMT} subdirs: for dir in ${SUBDIRS} ; do \ ${MAKE} -f ${JOBNAME}.make SUBDIR=$$dir $$dir.done ; \ done ###################################################################### # For recursive make - caller must define SUBDIR SUBDIR := SUBDIR.IS.UNDEFINED ifneq "${SUBDIR}/" "SUBDIR.IS.UNDEFINED/" ${SUBDIR}.done: ${SUBDIR} ( cd ${SUBDIR} && ${MAKE} all ) ; /bin/touch ${SUBDIR}.done endif # End SUBDIR make ###################################################################### ${JOBNAME}.dvi: ${JOBNAME}.tex ${PARTS} ${BIBS} ${SUBDIRS} ${MACROS} @echo '= PARTS =' @echo ${PARTS} | tr ' ' '\012' ${RUN_LATEX} ${JOBNAME}.tex ${JOBNAME}.ps: ${JOBNAME}.dvi ${SUBDIRS} ${NEWTEX}; dvips -t ${SIZE} -o ${JOBNAME}.ps -D600 ${JOBNAME} display-ps: ${JOBNAME}.ps ${PSVIEW} ${JOBNAME}.ps ${JOBNAME}.pdf: ${JOBNAME}.ps ps-to-pdf < ${JOBNAME}.ps > ${JOBNAME}.pdf display-pdf: ${JOBNAME}.pdf ${PDFVIEW} ${JOBNAME}.pdf scratch: /bin/rm -f ${JOBNAME}.dvi ${JOBNAME}.ps ${JOBNAME}.pdf tidy: /bin/rm -f ${JOBNAME}.aux ${JOBNAME}.blg ${JOBNAME}.bbl /bin/rm -f ${JOBNAME}.log ${JOBNAME}.errs /bin/rm -f *.dvi~ *.ps~ .pdf~ /bin/rm -f *.dvi~~ *.ps~~ .pdf~~ /bin/rm -f *.aux~ *.blg~ *.bbl~ *.log~ *.errs~ core /bin/rm -f *.aux~~ *.blg~~ *.bbl~~ *.log~~ *.errs~~