Initial Commit
[packages] / xemacs-packages / calc / Makefile.calc
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.
5
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).
9
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.
14
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.
19
20
21 # To install Calc for private use, type `make'.
22 # To install Calc for public use, type `make install'.
23
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.
29
30
31 # Programs.
32 EMACS    = xemacs
33 TEX      = tex
34 TEXINDEX = texindex
35 MAKEINFO = makeinfo
36 MAKE     = make
37 ECHO     = @echo
38 REMOVE   = -rm -f
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.)
41
42 # Other macros.
43 EFLAGS   = -batch -vanilla
44 MAINT    = -l calc-maint.elc
45
46 # Control whether intermediate files are kept.
47 PURGE    = -rm -f
48 #PURGE   = echo Not deleting:
49
50
51
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.
55 all:
56         $(MAKE) compile
57         $(MAKE) private
58         $(MAKE) info
59         $(ECHO) "Calc is now installed."
60
61 install:
62         $(MAKE) compile
63         $(MAKE) public
64         $(MAKE) info
65         $(ECHO) "Calc is now installed."
66
67
68 # Compile Calc.
69 compile: maint
70         $(EMACS) $(EFLAGS) $(MAINT) -f calc-compile
71
72
73 # Add autoload and set-global-key commands to system default file.
74 public: maint
75         $(EMACS) $(EFLAGS) $(MAINT) -f calc-public-autoloads
76
77
78 # Add autoload and set-global-key commands to ~/.emacs file.
79 private: maint
80         $(EMACS) $(EFLAGS) $(MAINT) -f calc-private-autoloads
81
82
83 # Format the Calc manual for the Info system using makeinfo.
84 info: calc.info
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
89
90
91 # Format the Calc manual for the Info system using texinfo.el.
92 # (Use this only if you do not have makeinfo.)
93 texinfo: calc.info-2
94 calc.info-2: calc.texinfo
95         $(EMACS) $(EFLAGS) calc.texinfo -f texinfo-format-buffer -f save-buffer
96
97
98 # Format the Calc manual as one printable volume using TeX.
99 tex:
100         $(REMOVE) calc.aux
101         $(TEX) calc.texinfo
102         $(TEXINDEX) calc.[cfkptv]?
103         $(TEX) calc.texinfo
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
106         $(PURGE) calc.toc
107 # Note, calc.aux and calc.ky are left behind for the benefit of "make summary".
108
109 # Format the Calc manual as two printable volumes (Tutorial and Reference).
110 tex2: texsplit texvol1 texvol2
111
112 # Format the Calc Tutorial volume only.
113 textut: texsplit1 texvol1
114
115 # Format the Calc Reference volume only.
116 texref: texsplit2 texvol2
117
118 texsplit: maint
119         $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-manual
120
121 texsplit1: maint
122         $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-tutorial
123
124 texsplit2: maint
125         $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-reference
126
127 texvol1:
128         $(TEX) calctut.tex
129         $(TEXINDEX) calctut.??
130         $(TEX) calctut.tex
131         $(PURGE) calctut.tex calctut.?? calctut.??s calctut.aux calctut.toc
132
133 texvol2:
134         $(TEX) calcref.tex
135         $(TEXINDEX) calcref.??
136         $(TEX) calcref.tex
137         $(PURGE) calcref.tex calcref.?? calcref.??s calcref.aux calcref.toc
138
139
140 # Format the Calc summary separately using TeX.
141 summary: texsum
142         $(TEX) calcsum.tex
143         $(PURGE) calcsum.?? calcsum.aux calcsum.toc
144
145 texsum: maint
146         $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-split-summary
147
148 isummary: texisum
149         $(TEX) calcsum.tex
150         $(PURGE) calcsum.?? calcsum.aux calcsum.toc
151
152 texisum: maint
153         $(EMACS) $(EFLAGS) $(MAINT) calc.texinfo -f calc-inline-summary
154
155
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
160
161
162 # Create an Emacs TAGS file
163 tags: TAGS
164 TAGS:
165         etags *.el
166
167
168 # Delete .elc files and other reconstructible files.
169 clean:  clean.elc clean.info clean.tex
170
171 clean.elc:
172         $(REMOVE) calc-*.elc
173         $(REMOVE) macedit.elc
174
175 clean.info:
176         $(REMOVE) calc.info*
177
178 clean.tex:
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
182         $(REMOVE) calcref.*
183         $(REMOVE) calctut.*
184         $(REMOVE) calcsum.*
185
186