Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 \
  6. clean cleanall clean-install
  7. all: $(ORG_MAKE_DOC)
  8. info: org
  9. html: org.html
  10. pdf: org.pdf orgguide.pdf
  11. card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
  12. manual guide::
  13. -$(RMR) $@
  14. $(MKDIR) $@
  15. manual:: org.texi org-version.inc
  16. $(TEXI2HTML) -o $@ $<
  17. ../utils/mansplit.pl $@/*
  18. guide:: orgguide.texi org-version.inc
  19. $(TEXI2HTML) -o $@ $<
  20. ../utils/guidesplit.pl $@/*
  21. org-version.inc: org.texi
  22. @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
  23. @echo "@c automatically generated, do not edit" > org-version.inc
  24. @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc
  25. @echo "@set DATE $(DATE)" >> org-version.inc
  26. install: org
  27. if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
  28. $(CP) org $(DESTDIR)$(infodir)
  29. $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
  30. clean:
  31. $(RM) org *.pdf *.html *_letter.tex org-version.inc \
  32. *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
  33. *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
  34. cleanall: clean
  35. $(RMR) guide manual
  36. clean-install:
  37. $(RM) $(DESTDIR)$(infodir)/org*
  38. $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
  39. .SUFFIXES: .texi .tex .txt _letter.tex
  40. %: %.texi org-version.inc
  41. $(MAKEINFO) --no-split $< -o $@
  42. %.pdf: LC_ALL=C # work around a bug in texi2dvi
  43. %.pdf: LANG=C # work around a bug in texi2dvi
  44. %.pdf: %.texi org-version.inc
  45. $(TEXI2PDF) $<
  46. %.pdf: %.tex
  47. PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
  48. %.html: %.texi org-version.inc
  49. $(TEXI2HTML) --no-split -o $@ $<
  50. ../utils/manfull.pl $@
  51. %.txt: %.tex
  52. perl ../utils/orgcard2txt.pl $< > $@
  53. %_letter.tex: %.tex
  54. $(BATCH) \
  55. --eval '(add-to-list '"'"'load-path "../lisp")' \
  56. --eval '(load "org-compat.el")' \
  57. --eval '(load "../utils/org-fixup.el")' \
  58. --eval '(org-make-letterformat "$(<F)" "$(@F)")'