Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Makefile for Presentation
  2. #
  3. # You can change the PRESENTATION_BASE below, or if you like, or set it as
  4. # an environment variable before you type make.
  5. ifndef PRESENTATION_BASE
  6. PRESENTATION_BASE=non-copyright
  7. endif
  8. DO_INCREMENTAL_POINTS = -i -s
  9. # This should be the path to your checkout of the repository. Under that
  10. # directory, you must have a checkout of /Admin/Forms/TeX.
  11. PATH := $(PATH):/usr/share/tex4ht
  12. PANDOC=/usr/bin/pandoc
  13. TEX4HT=tex4ht
  14. T4HT=t4ht
  15. PDFLATEX = pdflatex
  16. LATEX = /usr/bin/latex
  17. BIBTEX = bibtex
  18. FIG2DEV = fig2dev
  19. DVIPS=/usr/bin/dvips
  20. PDF_FIGS = ui/conservancy/logo.pdf
  21. EPS_FIGS = ui/conservancy/logo.eps
  22. all: err $(PRESENTATION_BASE).ps $(PRESENTATION_BASE).html
  23. all: $(PRESENTATION_BASE).html
  24. .SUFFIXES: .fig .postscript .eps .pdf .pstex_t .pstex .ps .dvi .tex
  25. .postscript.pdf:
  26. ps2pdf $< $@
  27. .postscript.eps:
  28. ps2epsi $< $@
  29. .dvi.ps:
  30. $(DVIPS) $< -o $@
  31. .tex.dvi:
  32. $(LATEX) $<
  33. .fig.pdf:
  34. $(FIG2DEV) -L pdf -p "portrait" -c $< > $@
  35. .fig.pstex_t:
  36. $(FIG2DEV) -L pstex_t $< > $@
  37. .fig.pstex:
  38. $(FIG2DEV) -L pstex $< > $@
  39. $(PRESENTATION_BASE).tex: $(PDF_FIGS) $(PRESENTATION_BASE).md
  40. $(PANDOC) -S -s -f markdown -t latex $(PRESENTATION_BASE).md -o $(PRESENTATION_BASE).tex
  41. $(PRESENTATION_BASE).pdf: $(PRESENTATION_BASE).tex $(PDF_FIGS)
  42. $(PANDOC) -S -s -f markdown -t latex $(PRESENTATION_BASE).md -o $(PRESENTATION_BASE).tex
  43. $(PDFLATEX) $(PRESENTATION_BASE).tex
  44. $(PDFLATEX) $(PRESENTATION_BASE).tex
  45. $(PRESENTATION_BASE).html: $(PRESENTATION_BASE).md
  46. $(PANDOC) $(DO_INCREMENTAL_POINTS) -s -S --template ./ui/conservancy/pandoc-s5-template.html -f markdown -t s5 $(PRESENTATION_BASE).md -o $(PRESENTATION_BASE).html
  47. $(PRESENTATION_BASE).dvi: $(PRESENTATION_BASE).tex $(EPS_FIGS)
  48. $(LATEX) $(PRESENTATION_BASE).tex
  49. $(LATEX) $(PRESENTATION_BASE).tex
  50. clean:
  51. /bin/rm -f $(PRESENTATION_BASE).ps $(PRESENTATION_BASE).pdf $(PRESENTATION_BASE).log texput.log $(PRESENTATION_BASE).lg $(PRESENTATION_BASE).tmp $(PRESENTATION_BASE).xref *.4ct *.4tc *.aux *.dvi $(PRESENTATION_BASE)*.html *.idv *.lg *.tmp $(PRESENTATION_BASE).css $(PRESENTATION_BASE).log $(PRESENTATION_BASE).out $(PRESENTATION_BASE)-js.* $(PRESENTATION_BASE).tex
  52. err: ; $(ERR)
  53. install: all
  54. /usr/bin/rsync -HavP --exclude ui ./ copyleft.org:/var/www/presentations/$(PRESENTATION_BASE)/
  55. -ssh copyleft.org 'mkdir -p /var/www/presentations/$(PRESENTATION_BASE)/ui/conservancy/'
  56. /usr/bin/rsync -HavP ui/conservancy/ copyleft.org:/var/www/presentations/$(PRESENTATION_BASE)/ui/conservancy/
  57. -ssh copyleft.org 'find /var/www/presentations/$(PRESENTATION_BASE) -exec chmod gou+r {} \;'
  58. -ssh copyleft.org 'find /var/www/presentations/$(PRESENTATION_BASE) -type d -exec chmod gou+rx {} \;'
  59. ./pres-cmd