Release 4.78
[org-mode/org-mode-NeilSmithlineMods.git] / Makefile
blobd5d8199309aa92fd67bc9f2cadbbd27be7a93122
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 = makeinfo --html --number-sections --no-split
47 # How to move the byte compiled files to their destination.
48 MV = mv
50 # How to copy the lisp files to their distination.
51 CP = cp -p
53 ##----------------------------------------------------------------------
54 ## BELOW THIS LINE ON YOUR OWN RISK!
55 ##----------------------------------------------------------------------
57 # The following variables need to be defined by the maintainer
58 LISPFILES = org.el org_xemacs.el org-publish.el org-mouse.el org-install.el
59 ELCFILES = $(LISPFILES:.el=.elc)
60 DOCFILES = org.texi org.pdf org
61 CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf orgcard_letter.ps
62 TEXIFILES = org.texi
63 INFOFILES = org
64 HTMLDIR = /home/dominik/public_html/Tools/org
66 .SUFFIXES: .el .elc .texi
67 SHELL = /bin/sh
69 DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} Makefile
70 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
72 all: $(ELCFILES)
74 install: install-lisp
76 doc: org.html org.pdf orgcard.pdf
79 make pdf && open org.pdf
82 make card && gv orgcard.ps
84 install-lisp: $(LISPFILES) $(ELCFILES)
85 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
86 $(CP) $(LISPFILES) $(lispdir)
87 $(CP) $(ELCFILES) $(lispdir)
89 install-info: $(INFOFILES)
90 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
91 $(CP) $(INFOFILES) $(infodir)
93 install-noutline: xemacs/noutline.elc
94 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
95 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
97 org_xemacs.el: org.el
98 perl -npe 's/\[:alnum:\]/a-zA-Z0-9/g' org.el > org_xemacs.el
100 org.elc: org.el
102 org-publish.elc: org-publish.el
104 org-install.elc: org-install.el
106 xemacs/noutline.elc: xemacs/noutline.el
108 org: org.texi
109 $(MAKEINFO) --no-split org.texi -o org
111 org.pdf: org.texi
112 $(TEXI2PDF) org.texi
114 org.html: org.texi
115 $(TEXI2HTML) -o org.html org.texi
117 orgcard.dvi: orgcard.tex
118 tex orgcard.tex
120 orgcard.pdf: orgcard.dvi
121 dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
123 orgcard.ps: orgcard.dvi
124 dvips -t landscape -o orgcard.ps orgcard.dvi
126 orgcard_letter.dvi: orgcard.tex
127 perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
128 tex orgcard_letter.tex
130 orgcard_letter.pdf: orgcard_letter.dvi
131 dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
133 orgcard_letter.ps: orgcard_letter.dvi
134 dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
136 # Below here are special targets for maintenance only
138 info:
139 $(MAKEINFO) --no-split org.texi -o org
141 pdf: org.pdf
143 card: orgcard.pdf orgcard.ps orgcard_letter.pdf orgcard_letter.ps
145 xcompile:
146 xemacs -batch -q -f batch-byte-compile $(LISPFILES)
148 ecompile:
149 emacs -batch -q -f batch-byte-compile $(LISPFILES)
151 distfile:
152 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
153 touch org.texi orgcard.tex
154 make info
155 make doc
156 rm -rf org-$(TAG) org-$(TAG).zip
157 $(MKDIR) org-$(TAG)
158 $(MKDIR) org-$(TAG)/xemacs
159 cp $(DISTFILES) org-$(TAG)/
160 cp $(DISTFILES_xemacs) org-$(TAG)/xemacs/
161 zip -r org-$(TAG).zip org-$(TAG)
162 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
164 dist:
165 make distfile TAG=$(TAG)
166 cp org-$(TAG).zip org-$(TAG).tar.gz $(HTMLDIR)
167 rm -f $(HTMLDIR)/org.zip $(HTMLDIR)/org.tar.gz
168 (cd $(HTMLDIR); ln -s org-$(TAG).zip org.zip)
169 (cd $(HTMLDIR); ln -s org-$(TAG).tar.gz org.tar.gz)
170 make doc
171 cp org.pdf orgcard.pdf org.texi org.html $(HTMLDIR)
173 minidist:
174 rm -f org-$(TAG).zip
175 zip org-$(TAG).zip org.el
176 scp org-$(TAG).zip remote.science.uva.nl:public_html/Tools/org/
178 clean:
179 rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
180 rm -f *~
181 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
182 rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
184 .el.elc:
185 $(ELC) $<