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