Makefile 2.0 KB

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