makefile 2.0 KB

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