Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .SUFFIXES: # we don't need default suffix rules
  2. ifeq ($(MAKELEVEL), 0)
  3. $(error This make needs to be started as a sub-make from the toplevel directory.)
  4. endif
  5. .PHONY: all info html pdf card manual guide install clean cleanall clean-install
  6. all: info html pdf card
  7. info: org
  8. html: org.html
  9. pdf: org.pdf orgguide.pdf
  10. card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
  11. manual guide::
  12. $(RMR) $@ ; $(MKDIR) $@
  13. manual:: org.texi
  14. $(TEXI2HTML) -o $@ $<
  15. ../UTILITIES/mansplit.pl $@/*
  16. guide:: orgguide.texi
  17. $(TEXI2HTML) -o $@ $<
  18. ../UTILITIES/guidesplit.pl $@/*
  19. git-describe.texi: org.texi
  20. @echo "@c automatically generated, do not edit" > git-describe.texi
  21. @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> git-describe.texi
  22. @echo "@set DATE $(DATE)" >> git-describe.texi
  23. install: org
  24. if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
  25. $(CP) org $(DESTDIR)$(infodir)
  26. $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
  27. clean:
  28. $(RM) org *.pdf *.html *_letter.tex \
  29. *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
  30. *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps git-describe.texi
  31. cleanall: clean
  32. $(RMR) guide manual
  33. clean-install:
  34. $(RM) $(DESTDIR)$(infodir)/org*
  35. $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
  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. $< > $@