shuffle targets to their correct place, harden recipes
[org-mode.git] / targets.mk
blob5ccdf1986a4e5632f761fcedb1a37ce028c06a16
1 .PHONY: default all up2 update compile \
2 install info html pdf card doc install-lisp install-info \
3 autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
4 .NOTPARALLEL: .PHONY
5 # Additional distribution files
6 DISTFILES_extra= Makefile request-assign-future.txt contrib etc
8 default: $(ELCFILES)
10 all: default $(INFOFILES)
12 up2: update
13 sudo ${MAKE} install
15 update:
16 git pull
17 ${MAKE} clean
18 ${MAKE} all
20 compile: $(ELCFILES0)
22 install: install-lisp
24 info: doc/org
26 html: doc/org.html
28 pdf: doc/org.pdf doc/orgguide.pdf
30 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
32 doc: html pdf card
34 install-lisp: $(LISPFILES) default
35 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
36 $(CP) $(LISPFILES) $(lispdir)
37 $(CP) $(ELCFILES) $(lispdir)
39 install-info: $(INFOFILES)
40 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
41 $(CP) $(INFOFILES) $(infodir)
42 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
44 autoloads: lisp/org-install.el
46 lisp/org-install.el: $(LISPFILES0) maint.mk dependencies.mk
47 $(BATCH) \
48 --eval "(require 'autoload)" \
49 --eval '(find-file "org-install.el")' \
50 --eval '(erase-buffer)' \
51 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
52 --eval '(insert "\n(provide (quote org-install))\n")' \
53 --eval '(save-buffer)'
54 mv org-install.el lisp
56 doc/org: doc/org.texi
57 (cd doc && $(MAKEINFO) --no-split org.texi -o org)
59 doc/%.pdf: LC_ALL=C # work around a bug in texi2dvi
60 doc/%.pdf: LANG=C # work around a bug in texi2dvi
61 doc/%.pdf: doc/%.texi
62 (cd doc && $(TEXI2PDF) $(<F))
63 doc/%.pdf: doc/%.tex
64 (cd doc && $(TEXI2PDF) $(<F))
66 doc/org.html: doc/org.texi
67 (cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
68 UTILITIES/manfull.pl doc/org.html
70 doc/orgcard.txt: doc/orgcard.tex
71 (cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
73 doc/orgcard_letter.tex: doc/orgcard.tex
74 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
75 doc/orgcard.tex > doc/orgcard_letter.tex
77 cleanall: clean
78 $(RM) lisp/org-install.el
80 clean: cleanelc cleandoc cleanrel cleancontrib
81 -$(FIND) . -name \*~ -exec $(RM) {} \;
83 cleancontrib:
84 -$(FIND) contrib -name \*~ -exec $(RM) {} \;
86 cleanelc:
87 rm -f $(ELCFILES)
89 cleandoc:
90 -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
91 -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
92 -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
93 -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
94 -(cd doc && rm -rf manual)
96 cleanrel:
97 rm -rf RELEASEDIR
98 rm -rf org-7.*
99 rm -rf org-7*zip org-7*tar.gz
101 .el.elc:
102 $(ELC) $<