use sed instead of perl, add target clean-install
[org-mode.git] / doc / Makefile
blob8ce532828fd95d5dc13d4cf895e063c82672fc46
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 $@/*
27 install: org
28 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
29 $(CP) org $(infodir)
30 $(INSTALL_INFO) --infodir=$(infodir) org
32 clean cleanall:
33 $(RM) org *.pdf *.html *_letter.tex \
34 *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
35 *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
37 clean-install:
38 $(RM) $(infodir)/org*
39 @echo You should run $(INSTALL_INFO) again to correct dir entries.
41 .SUFFIXES: # we don't need default suffix rules
42 .SUFFIXES: .texi .tex .txt
44 %: %.texi
45 $(MAKEINFO) --no-split $< -o $@
47 %.pdf: LC_ALL=C # work around a bug in texi2dvi
48 %.pdf: LANG=C # work around a bug in texi2dvi
49 %.pdf: %.texi
50 $(TEXI2PDF) $<
51 %.pdf: %.tex
52 PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
54 %.html: %.texi
55 $(TEXI2HTML) --no-split -o $@ $<
56 ../UTILITIES/manfull.pl $@
58 %.txt: %.tex
59 perl ../UTILITIES/orgcard2txt.pl $< > $@
61 %_letter.tex: %.tex
62 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
63 $< > $@