org-mode/doc/Makefile
Achim Gratz a5cb04dcd8 hand off ./doc to sub-make
* Makefile: use info function for output and call shell only once
* default.mk: add PDFTEX and RMR variables for customization
* lisp/Makefile: add target 'all' and create $(lispdir) if necessary
* maint-targets.mk: invoke sub-make for HTML manuals
* maint.mk: remove unsused VARIABLES
* targets.mk: invoke sub-make for ./doc and clean up some targets
2012-04-20 21:04:07 +02:00

60 lines
1.3 KiB
Makefile

ifeq ($(MAKELEVEL), 0)
$(error This make needs to be started as a sub-make from the toplevel directory.)
endif
.PHONY: all info html pdf card manual guide install clean cleanall
all: info html pdf card
info: org
html: org.html
pdf: org.pdf orgguide.pdf
card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
manual guide::
$(RMR) $@ ; $(MKDIR) $@
manual:: org.texi
$(TEXI2HTML) -o $@ $<
../UTILITIES/mansplit.pl $@/*
guide:: orgguide.texi
$(TEXI2HTML) -o $@ $<
../UTILITIES/guidesplit.pl $@/*
install: org
if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
$(CP) org $(infodir)
$(INSTALL_INFO) --infodir=$(infodir) org
clean cleanall:
$(RM) dir org *.pdf *.html *_letter.tex \
*.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
*.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
.SUFFIXES: # we don't need default suffix rules
.SUFFIXES: .texi .tex .txt
%: %.texi
$(MAKEINFO) --no-split $< -o $@
%.pdf: LC_ALL=C # work around a bug in texi2dvi
%.pdf: LANG=C # work around a bug in texi2dvi
%.pdf: %.texi
$(TEXI2PDF) $<
%.pdf: %.tex
PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
%.html: %.texi
$(TEXI2HTML) --no-split -o $@ $<
../UTILITIES/manfull.pl $@
%.txt: %.tex
perl ../UTILITIES/orgcard2txt.pl $< > $@
%_letter.tex: %.tex
perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
$< > $@