doc/Makefile: rename/add auto-generated files to be compatible with Emacs
[org-mode/org-tableheadings.git] / doc / Makefile
blob7672664afcd219dba352b3ddfc38a4f52ede85db
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
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 org-version.inc:
27 @echo "@c automatically generated, do not edit" > org-version.inc
28 @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc
29 @echo "@set DATE $(DATE)" >> org-version.inc
32 install: org
33 if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
34 $(CP) org $(DESTDIR)$(infodir)
35 $(INSTALL_INFO) --infodir=$(DESTDIR)$(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 org-version.inc
41 cleanall: clean
42 $(RMR) guide manual
44 clean-install:
45 $(RM) $(DESTDIR)$(infodir)/org*
46 $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
48 .SUFFIXES: .texi .tex .txt
50 %: %.texi
51 $(MAKE) org-version.inc
52 $(MAKEINFO) --no-split $< -o $@
54 %.pdf: LC_ALL=C # work around a bug in texi2dvi
55 %.pdf: LANG=C # work around a bug in texi2dvi
56 %.pdf: %.texi
57 $(TEXI2PDF) $<
58 %.pdf: %.tex
59 PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
61 %.html: %.texi
62 $(TEXI2HTML) --no-split -o $@ $<
63 ../UTILITIES/manfull.pl $@
65 %.txt: %.tex
66 perl ../UTILITIES/orgcard2txt.pl $< > $@
68 %_letter.tex: %.tex
69 $(SED) -e 's/\\pdflayout=(0l)/\\pdflayout=(1l)/' \
70 $< > $@