Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ifeq ($(MAKELEVEL), 0)
  2. $(error This make needs to be started as a sub-make from the toplevel directory.)
  3. endif
  4. .PHONY: all info html pdf card manual guide install clean cleanall clean-install
  5. all: info html pdf card
  6. info: org
  7. html: org.html
  8. pdf: org.pdf orgguide.pdf
  9. card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
  10. manual guide::
  11. $(RMR) $@ ; $(MKDIR) $@
  12. manual:: org.texi
  13. $(TEXI2HTML) -o $@ $<
  14. ../UTILITIES/mansplit.pl $@/*
  15. guide:: orgguide.texi
  16. $(TEXI2HTML) -o $@ $<
  17. ../UTILITIES/guidesplit.pl $@/*
  18. git-describe.texi: org.texi
  19. @echo "@c automatically generated, do not edit" > git-describe.texi
  20. @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> git-describe.texi
  21. @echo "@set DATE $(DATE)" >> git-describe.texi
  22. install: org
  23. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  24. $(CP) org $(infodir)
  25. $(INSTALL_INFO) --infodir=$(infodir) org
  26. clean:
  27. $(RM) org *.pdf *.html *_letter.tex \
  28. *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
  29. *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps git-describe.texi
  30. cleanall: clean
  31. $(RMR) guide manual
  32. clean-install:
  33. $(RM) $(infodir)/org*
  34. $(INSTALL_INFO) --infodir=$(infodir) --remove org
  35. .SUFFIXES: # we don't need default suffix rules
  36. .SUFFIXES: .texi .tex .txt
  37. %: %.texi
  38. $(MAKE) git-describe.texi
  39. $(MAKEINFO) --no-split $< -o $@
  40. %.pdf: LC_ALL=C # work around a bug in texi2dvi
  41. %.pdf: LANG=C # work around a bug in texi2dvi
  42. %.pdf: %.texi
  43. $(TEXI2PDF) $<
  44. %.pdf: %.tex
  45. PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
  46. %.html: %.texi
  47. $(TEXI2HTML) --no-split -o $@ $<
  48. ../UTILITIES/manfull.pl $@
  49. %.txt: %.tex
  50. perl ../UTILITIES/orgcard2txt.pl $< > $@
  51. %_letter.tex: %.tex
  52. $(SED) -e 's/\\pdflayout=(0l)/\\pdflayout=(1l)/' \
  53. $< > $@