Makefile: optionally switch to a specific git branch
[org-mode/org-tableheadings.git] / doc / Makefile
blob234ab7eaf6e6ff19c293e2a2d85fe22bfc736229
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
8 all: $(ORG_MAKE_DOC)
10 info: org
12 html: org.html
14 pdf: org.pdf orgguide.pdf
16 card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
18 ifneq ($(SERVERMK),)
19 manual guide::
20 -$(RMR) $@
21 $(MKDIR) $@
22 manual:: org.texi org-version.inc
23 $(TEXI2HTML) -o $@ $<
24 ../mk/mansplit.pl $@/*
25 guide:: orgguide.texi org-version.inc
26 $(TEXI2HTML) -o $@ $<
27 ../mk/guidesplit.pl $@/*
28 endif
30 org-version.inc: org.texi
31 @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
32 @echo "@c automatically generated, do not edit" > org-version.inc
33 @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc
34 @echo "@set DATE $(DATE)" >> org-version.inc
36 install: org
37 if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
38 $(CP) org $(DESTDIR)$(infodir)
39 $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
41 clean:
42 $(RM) org *.pdf *.html *_letter.tex org-version.inc \
43 *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
44 *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
45 cleanall: clean
46 $(RMR) guide manual
48 clean-install:
49 $(RM) $(DESTDIR)$(infodir)/org*
50 $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
52 .SUFFIXES: .texi .tex .txt _letter.tex
54 %: %.texi org-version.inc
55 $(MAKEINFO) --no-split $< -o $@
57 %.pdf: LC_ALL=C # work around a bug in texi2dvi
58 %.pdf: LANG=C # work around a bug in texi2dvi
59 %.pdf: %.texi org-version.inc
60 $(TEXI2PDF) $<
61 %.pdf: %.tex
62 PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
64 %.html: %.texi org-version.inc
65 $(TEXI2HTML) --no-split -o $@ $<
66 ifneq ($(SERVERMK),)
67 ../mk/manfull.pl $@
69 %.txt: %.tex
70 perl ../mk/orgcard2txt.pl $< > $@
71 endif
73 %_letter.tex: %.tex
74 $(BATCH) \
75 --eval '(add-to-list '"'"'load-path "../lisp")' \
76 --eval '(load "org-compat.el")' \
77 --eval '(load "../mk/org-fixup.el")' \
78 --eval '(org-make-letterformat "$(<F)" "$(@F)")'