Articles I've written for customers on IT issues.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.6 KiB

5 years ago
  1. #
  2. # Makefile for erdc package
  3. #
  4. # This file is in public domain
  5. #
  6. # $Id: Makefile,v 1.5 2009-07-02 16:11:45 boris Exp $
  7. #
  8. PACKAGE=erdc
  9. SAMPLES = sample.tex
  10. IMAGES = \
  11. red_corps_castle2.eps\
  12. nola.eps
  13. PDFIMAGES = ${IMAGES:%.eps=%.pdf}
  14. PDF = $(PACKAGE).pdf ${SAMPLES:%.tex=%.pdf}
  15. WD = $(shell pwd)
  16. CURRDIR = $(notdir ${WD})
  17. all: ${PDF} ${PDFIMAGES}
  18. %.pdf: %.dtx $(PACKAGE).cls ${PDFIMAGES}
  19. pdflatex $<
  20. - bibtex $*
  21. pdflatex $<
  22. - makeindex -s gind.ist -o $*.ind $*.idx
  23. - makeindex -s gglo.ist -o $*.gls $*.glo
  24. pdflatex $<
  25. while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
  26. do pdflatex $<; done
  27. %.cls: %.ins %.dtx
  28. pdflatex $<
  29. %.pdf: %.tex $(PACKAGE).cls
  30. pdflatex $<
  31. - bibtex $*
  32. pdflatex $<
  33. pdflatex $<
  34. while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
  35. do pdflatex $<; done
  36. %.pdf: %.eps
  37. epstopdf $<
  38. .PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls
  39. clean:
  40. $(RM) $(PACKAGE).cls *.log *.aux \
  41. *.glo *.idx *.toc *.tbc \
  42. *.ilg *.ind *.out *.lof \
  43. *.lot *.bbl *.blg *.gls *.sty *.ist \
  44. *.dvi *.ps *.thm *.tgz *.zip
  45. distclean: clean
  46. $(RM) $(PDF) $(PDFIMAGES)
  47. #
  48. # Archive for the distribution. Includes typeset documentation
  49. #
  50. archive: all clean
  51. cd ..; \
  52. tar -czvf $(PACKAGE).tgz --exclude 'debug*' \
  53. --exclude '*~' --exclude '*.tgz' --exclude '*.zip' \
  54. --exclude CVS $(CURRDIR); \
  55. mv $(PACKAGE).tgz $(CURRDIR); \
  56. cd $(CURRDIR)
  57. zip: all clean
  58. cd ..; \
  59. zip -r $(PACKAGE).zip $(CURRDIR) \
  60. -x 'debug*' -x '*~' -x '*.tgz' -x '*.zip' -x CVS -x 'CVS/*'; \
  61. mv $(PACKAGE).zip $(CURRDIR); \
  62. cd $(CURRDIR)