Merge branch 'fix-orgstruct'
[org-mode/org-mode-NeilSmithlineMods.git] / doc / Makefile
blob95e7024235f8dd8c4a2acb34a346faee382a2ea1
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 org-version.inc
9 all: $(ORG_MAKE_DOC)
11 info: org
13 html: org.html
15 pdf: org.pdf orgguide.pdf
17 card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
19 manual guide::
20 $(RMR) $@ ; $(MKDIR) $@
21 manual:: org.texi
22 $(TEXI2HTML) -o $@ $<
23 ../UTILITIES/mansplit.pl $@/*
24 guide:: orgguide.texi
25 $(TEXI2HTML) -o $@ $<
26 ../UTILITIES/guidesplit.pl $@/*
28 org-version.inc:
29 @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
30 @echo "@c automatically generated, do not edit" > org-version.inc
31 @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc
32 @echo "@set DATE $(DATE)" >> org-version.inc
35 install: org
36 if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
37 $(CP) org $(DESTDIR)$(infodir)
38 $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
40 clean:
41 $(RM) org *.pdf *.html *_letter.tex \
42 *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
43 *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps org-version.inc
44 cleanall: clean
45 $(RMR) guide manual
47 clean-install:
48 $(RM) $(DESTDIR)$(infodir)/org*
49 $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
51 .SUFFIXES: .texi .tex .txt
53 %: %.texi org-version.inc
54 $(MAKEINFO) --no-split $< -o $@
56 %.pdf: LC_ALL=C # work around a bug in texi2dvi
57 %.pdf: LANG=C # work around a bug in texi2dvi
58 %.pdf: %.texi org-version.inc
59 $(TEXI2PDF) $<
60 %.pdf: %.tex
61 PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
63 %.html: %.texi org-version.inc
64 $(TEXI2HTML) --no-split -o $@ $<
65 ../UTILITIES/manfull.pl $@
67 %.txt: %.tex
68 perl ../UTILITIES/orgcard2txt.pl $< > $@
70 %_letter.tex: %.tex
71 $(SED) -e 's/\\pdflayout=(0l)/\\pdflayout=(1l)/' \
72 $< > $@