1ifeq ($V,1) 2silent= 3silent_stdout= 4else 5silent=@ 6silent_stdout= > /dev/null 7endif 8 9#Files left over from making the crypt.pdf. 10LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out *.lof 11 12#build the doxy files (requires Doxygen, tetex and patience) 13.PHONY: doxygen 14doxygen: 15 doxygen $(silent_stdout) 16 17patched_doxygen: 18 (cat Doxyfile && echo "HAVE_DOT=no") | doxygen - $(silent_stdout) 19 20doxy: patched_doxygen 21 ${MAKE} -C doxygen/latex $(silent_stdout) && mv -f doxygen/latex/refman.pdf . 22 @echo The huge doxygen PDF should be available as doc/refman.pdf 23 24#This builds the crypt.pdf file. Note that the rm -f *.pdf has been removed 25#from the clean command! This is because most people would like to keep the 26#nice pre-compiled crypt.pdf that comes with libtomcrypt! We only need to 27#delete it if we are rebuilding it. 28docs crypt.pdf: crypt.tex 29 rm -f crypt.pdf $(LEFTOVERS) 30 cp crypt.tex crypt.bak 31 touch -r crypt.tex crypt.bak 32 (printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y crypt.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > crypt-deterministic.tex 33 printf "%s\n" "\pdfinfo{" >> crypt-deterministic.tex 34 printf "%s\n" " /CreationDate (\fixedpdfdate)" >> crypt-deterministic.tex 35 printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> crypt-deterministic.tex 36 cat crypt.tex >> crypt-deterministic.tex 37 mv crypt-deterministic.tex crypt.tex 38 touch -r crypt.bak crypt.tex 39 echo "hello" > crypt.ind 40 latex crypt $(silent_stdout) 41 latex crypt $(silent_stdout) 42 makeindex crypt.idx $(silent_stdout) 43 perl ../helper.pl --fixupind crypt.ind 44 pdflatex crypt $(silent_stdout) 45 sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' crypt.pdf 46 mv crypt.bak crypt.tex 47 rm -f $(LEFTOVERS) 48 49docdvi: crypt.tex 50 echo hello > crypt.ind 51 latex crypt $(silent_stdout) 52 latex crypt $(silent_stdout) 53 makeindex crypt.idx 54 perl ../helper.pl --fixupind crypt.ind 55 latex crypt $(silent_stdout) 56 latex crypt $(silent_stdout) 57 58termdoc: docdvi 59 dvi2tty crypt.dvi -w120 60 61clean: 62 rm -f $(LEFTOVERS) 63 rm -rf doxygen/ 64