1 # Makefile for "Calc", the GNU Emacs Calculator.
2 # Copyright (C) 1991, 1992, 1993 Free Software Foundation.
3 # Author: Dave Gillespie.
4 # Author's address: daveg@synaptics.com.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation (any version).
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Emacs; see the file COPYING. If not, write to the
17 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 # Boston, MA 02111-1307, USA.
21 # To install Calc for private use, type `make'.
22 # To install Calc for public use, type `make install'.
24 # How to read a Makefile:
25 # The command `make target' looks for `target:' in the Makefile.
26 # First, any sub-targets after the `:' are made.
27 # Then, the Unix commands on the following lines are executed.
28 # `$(SYMBOL)' expands according to the `SYMBOL =' definition below.
39 # (The leading `@' tells "make" not to echo the command itself during make;
40 # The leading `-' tells "make" to keep going if the command fails.)
43 EFLAGS = -batch -vanilla
44 MAINT = -l calc-maint.elc
46 # Control whether intermediate files are kept.
48 #PURGE = echo Not deleting:
52 # Do full Calc installation. (Note that `make' == `make all'.)
53 # These are written this way instead of `all: compile private info'
54 # to make the steps more explicit while the `make' is in progress.
59 $(ECHO) "Calc is now installed."
65 $(ECHO) "Calc is now installed."
70 $(EMACS) $(EFLAGS) $(MAINT) -f calc-compile
73 # Add autoload and set-global-key commands to system default file.
75 $(EMACS) $(EFLAGS) $(MAINT) -f calc-public-autoloads
78 # Add autoload and set-global-key commands to ~/.emacs file.
80 $(EMACS) $(EFLAGS) $(MAINT) -f calc-private-autoloads
83 # Format the Calc manual for the Info system using makeinfo.
85 calc.info: calc.texinfo
86 -$(MAKEINFO) calc.texinfo
87 $(ECHO) "Please ignore warnings for Copying, Getting Started, and Interactive Tutorial."
88 $(MAKE) -f Makefile.calc texinfo
91 # Format the Calc manual for the Info system using texinfo.el.
92 # (Use this only if you do not have makeinfo.)
94 calc.info-2: calc.texinfo
95 $(EMACS) $(EFLAGS) calc.texinfo -f texinfo-format-buffer -f save-buffer
98 # Format the Calc manual as one printable volume using TeX.
102 $(TEXINDEX) calc.[cfkptv]?
104 $(PURGE) calc.cp calc.fn calc.pg calc.tp calc.vr
105 $(PURGE) calc.cps calc.fns calc.kys calc.pgs calc.tps calc.vrs
107 # Note, calc.aux and calc.ky are left behind for the benefit of "make summary".
109 # Format the Calc manual as two printable volumes (Tutorial and Reference).
110 tex2: texsplit texvol1 texvol2
112 # Format the Calc Tutorial volume only.
113 textut: texsplit1 texvol1
115 # Format the Calc Reference volume only.
116 texref: texsplit2 texvol2
119 $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-manual
122 $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-tutorial
125 $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-reference
129 $(TEXINDEX) calctut.??
131 $(PURGE) calctut.tex calctut.?? calctut.??s calctut.aux calctut.toc
135 $(TEXINDEX) calcref.??
137 $(PURGE) calcref.tex calcref.?? calcref.??s calcref.aux calcref.toc
140 # Format the Calc summary separately using TeX.
143 $(PURGE) calcsum.?? calcsum.aux calcsum.toc
146 $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-summary
150 $(PURGE) calcsum.?? calcsum.aux calcsum.toc
153 $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-inline-summary
156 # All this because "-l calc-maint" doesn't work.
157 maint: calc-maint.elc
158 calc-maint.elc: calc-maint.el
159 cp calc-maint.el calc-maint.elc
162 # Create an Emacs TAGS file
168 # Delete .elc files and other reconstructible files.
169 clean: clean.elc clean.info clean.tex
173 $(REMOVE) macedit.elc
179 $(REMOVE) calc.cp calc.fn calc.ky calc.pg calc.tp calc.vr
180 $(REMOVE) calc.cps calc.fns calc.kys calc.pgs calc.tps calc.vrs
181 $(REMOVE) calc.aux calc.log calc.toc calc.dvi