Release 4.51
[org-mode.git] / Makefile
blobcf80ef3a8c81e542fd107b520f942559bb47bd63
1 # Makefile - for the org-mode distribution
3 # Maintainer: Carsten Dominik <dominik@science.uva.nl>
4 # Version: VERSIONTAG
6 # To install org-mode, edit the Makefile, type `make', then `make install'.
7 # To create the PDF and HTML documentation files, type `make doc'.
9 ##----------------------------------------------------------------------
10 ## YOU MUST EDIT THE FOLLOWING LINES
11 ##----------------------------------------------------------------------
13 # Name of your emacs binary
14 EMACS=emacs
16 # Where local software is found
17 prefix=/usr/local
19 # Where local lisp files go.
20 lispdir = $(prefix)/share/emacs/site-lisp
22 # Where info files go.
23 infodir = $(prefix)/info
25 ##----------------------------------------------------------------------
26 ## YOU MAY NEED TO EDIT THESE
27 ##----------------------------------------------------------------------
29 # Using emacs in batch mode.
30 BATCH=$(EMACS) -batch -q
32 # Specify the byte-compiler for compiling org-mode files
33 ELC= $(BATCH) -f batch-byte-compile
35 # How to make a pdf file from a texinfo file
36 TEXI2PDF = texi2pdf
38 # How to create directories
39 MKDIR = mkdir -p
41 # How to create the info files from the texinfo file
42 MAKEINFO = makeinfo
44 # How to create the HTML file
45 #TEXI2HTML = ./texi2html -monolithic -number
46 TEXI2HTML = makeinfo --html --number-sections --no-split
48 # How to move the byte compiled files to their destination.
49 MV = mv
51 # How to copy the lisp files to their distination.
52 CP = cp -p
54 ##----------------------------------------------------------------------
55 ## BELOW THIS LINE ON YOUR OWN RISK!
56 ##----------------------------------------------------------------------
58 # The following variables need to be defined by the maintainer
59 LISPFILES = org.el org-publish.el org-install.el
60 ELCFILES = $(LISPFILES:.el=.elc)
61 TEXIFILES = org.texi
62 INFOFILES = org
63 HTMLDIR = /home/dominik/public_html/Tools/org
65 .SUFFIXES: .el .elc .texi
66 SHELL = /bin/sh
68 DISTFILES= README xemacs ${LISPFILES} org.texi org.pdf org orgcard.tex orgcard.pdf Makefile
70 all: $(ELCFILES)
72 install: install-lisp
74 doc: org.html org.pdf orgcard.pdf
76 install-lisp: $(LISPFILES) $(ELCFILES)
77 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
78 $(CP) $(LISPFILES) $(lispdir)
79 $(CP) $(ELCFILES) $(lispdir)
81 install-info: $(INFOFILES)
82 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
83 $(CP) $(INFOFILES) $(infodir)
85 install-noutline: xemacs/noutline.elc
86 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
87 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
89 org.elc: org.el
91 org-publish.elc: org-publish.el
93 org-install.elc: org-install.el
95 xemacs/noutline.elc: xemacs/noutline.el
97 org: org.texi
98 $(MAKEINFO) --no-split org.texi -o org
100 org.pdf: org.texi
101 $(TEXI2PDF) org.texi
103 org.html: org.texi
104 $(TEXI2HTML) -o org.html org.texi
106 orgcard.dvi: orgcard.tex
107 tex orgcard.tex
109 orgcard.pdf: orgcard.dvi
110 dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
112 orgcard.ps: orgcard.dvi
113 dvips -t landscape -o orgcard.ps orgcard.dvi
115 # Below here are special targets for maintenance only
117 info:
118 $(MAKEINFO) --no-split org.texi -o org
120 pdf:
121 $(TEXI2PDF) org.texi
123 card: orgcard.pdf orgcard.ps
125 xcompile:
126 xemacs -batch -q -f batch-byte-compile $(LISPFILES)
128 ecompile:
129 emacs -batch -q -f batch-byte-compile $(LISPFILES)
131 distfile:
132 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
133 make info
134 make doc
135 rm -rf org-$(TAG) org-$(TAG).zip
136 $(MKDIR) org-$(TAG)
137 cp -r $(DISTFILES) org-$(TAG)/
138 zip -r org-$(TAG).zip org-$(TAG)
139 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
141 dist:
142 make distfile TAG=$(TAG)
143 cp org-$(TAG).zip org-$(TAG).tar.gz $(HTMLDIR)
144 rm -f $(HTMLDIR)/org.zip $(HTMLDIR)/org.tar.gz
145 (cd $(HTMLDIR); ln -s org-$(TAG).zip org.zip)
146 (cd $(HTMLDIR); ln -s org-$(TAG).tar.gz org.tar.gz)
147 make doc
148 cp org.pdf orgcard.pdf org.texi org.html $(HTMLDIR)
150 minidist:
151 rm -f org-$(TAG).zip
152 zip org-$(TAG).zip org.el
153 scp org-$(TAG).zip remote.science.uva.nl:public_html/Tools/org/
155 clean:
156 rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
157 rm -f *~
158 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
159 rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
161 .el.elc:
162 $(ELC) $<