aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorJim Blandy1993-05-15 22:25:51 +0000
committerJim Blandy1993-05-15 22:25:51 +0000
commitc38a040d4a3a1bc794a361d67e9aefc10c68cff4 (patch)
treee87e78c3c391eb72949c533e86b8acc191799f28 /lib-src
parent0d73e8e39ca9aa38a369af684d8fddf063ec2f78 (diff)
downloademacs-c38a040d4a3a1bc794a361d67e9aefc10c68cff4.tar.gz
emacs-c38a040d4a3a1bc794a361d67e9aefc10c68cff4.zip
The GNU coding standards specify that CFLAGS should be left for
users to set. * Makefile.in (CFLAGS): Put this in the "things configure might edit" section, and have it default to -g. (ALL_CFLAGS): New variable, set to all the flags which should be passed to compilations. Replace all other uses of CFLAGS with ALL_CFLAGS. (.c.o): New rule, to pass ALL_CFLAGS to compilations. * Makefile.in (DEFS): Remove this; it's always just going to be "-DHAVE_CONFIG_H -Demacs". * Makefile.in (ALLOCA): New variable, whose value we should inherit from the top-level makefile. (etags, ctags): Include ALLOCA in the list of object files that these executables depend on and link.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/Makefile.in57
1 files changed, 30 insertions, 27 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 3d97f17aab2..e38f7d53fee 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -15,7 +15,8 @@ SHELL = /bin/sh
15# ==================== Things `configure' might edit ==================== 15# ==================== Things `configure' might edit ====================
16 16
17CC=cc 17CC=cc
18DEFS=-g 18CFLAGS=-g
19ALLOCA=
19C_SWITCH_SYSTEM= 20C_SWITCH_SYSTEM=
20LOADLIBES= 21LOADLIBES=
21version=version-not-set 22version=version-not-set
@@ -101,7 +102,9 @@ SOURCES = COPYING ChangeLog Makefile.in README aixcc.lex emacs.csh \
101### Some other files - those shared with other GNU utilities - need 102### Some other files - those shared with other GNU utilities - need
102### HAVE_CONFIG_H #defined before they know they can take advantage of 103### HAVE_CONFIG_H #defined before they know they can take advantage of
103### the information in ../src/config.h. 104### the information in ../src/config.h.
104CFLAGS=${DEFS} ${C_SWITCH_SYSTEM} -Demacs -DHAVE_CONFIG_H -I../src 105ALL_CFLAGS = ${C_SWITCH_SYSTEM} -Demacs -DHAVE_CONFIG_H -I../src ${CFLAGS}
106.c.o:
107 ${CC} -c ${CPPFLAGS} ${ALL_CFLAGS} $<
105 108
106all: ${EXECUTABLES} 109all: ${EXECUTABLES}
107 110
@@ -180,91 +183,91 @@ test-distrib: ${srcdir}/test-distrib.c
180 $(CC) -o test-distrib ${srcdir}/test-distrib.c 183 $(CC) -o test-distrib ${srcdir}/test-distrib.c
181 ./test-distrib ${srcdir}/testfile 184 ./test-distrib ${srcdir}/testfile
182 185
183GETOPTOBJS = getopt.o getopt1.o 186GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
184GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h 187GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
185getopt.o: getopt.c getopt.h 188getopt.o: getopt.c getopt.h
186getopt1.o: getopt1.c getopt.h 189getopt1.o: getopt1.c getopt.h
187 190
188etags: ${srcdir}/etags.c $(GETOPTDEPS) 191etags: ${srcdir}/etags.c $(GETOPTDEPS)
189 $(CC) ${CFLAGS} -DETAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags 192 $(CC) ${ALL_CFLAGS} -DETAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
190 193
191ctags: ${srcdir}/etags.c $(GETOPTDEPS) 194ctags: ${srcdir}/etags.c $(GETOPTDEPS)
192 $(CC) ${CFLAGS} -DCTAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags 195 $(CC) ${ALL_CFLAGS} -DCTAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
193 196
194wakeup: ${srcdir}/wakeup.c 197wakeup: ${srcdir}/wakeup.c
195 $(CC) ${CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup 198 $(CC) ${ALL_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup
196 199
197make-docfile: ${srcdir}/make-docfile.c 200make-docfile: ${srcdir}/make-docfile.c
198 $(CC) ${CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile 201 $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
199 202
200digest-doc: ${srcdir}/digest-doc.c 203digest-doc: ${srcdir}/digest-doc.c
201 $(CC) ${CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc 204 $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc
202 205
203sorted-doc: ${srcdir}/sorted-doc.c 206sorted-doc: ${srcdir}/sorted-doc.c
204 $(CC) ${CFLAGS} ${srcdir}/sorted-doc.c $(LOADLIBES) -o sorted-doc 207 $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c $(LOADLIBES) -o sorted-doc
205 208
206b2m: ${srcdir}/b2m.c ../src/config.h 209b2m: ${srcdir}/b2m.c ../src/config.h
207 $(CC) -I${srcdir}/../src ${CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m 210 $(CC) -I${srcdir}/../src ${ALL_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m
208 211
209movemail: ${srcdir}/movemail.c ../src/config.h 212movemail: ${srcdir}/movemail.c ../src/config.h
210 $(CC) -I${srcdir}/../src ${CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail 213 $(CC) -I${srcdir}/../src ${ALL_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail
211 214
212cvtmail: ${srcdir}/cvtmail.c 215cvtmail: ${srcdir}/cvtmail.c
213 $(CC) ${CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail 216 $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
214 217
215fakemail: ${srcdir}/fakemail.c ../src/config.h 218fakemail: ${srcdir}/fakemail.c ../src/config.h
216 $(CC) -I${srcdir}/../src ${CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail 219 $(CC) -I${srcdir}/../src ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
217 220
218yow: ${srcdir}/yow.c ../src/paths.h 221yow: ${srcdir}/yow.c ../src/paths.h
219 $(CC) ${CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow 222 $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
220 223
221env: ${srcdir}/env.c ../src/config.h 224env: ${srcdir}/env.c ../src/config.h
222 $(CC) -DEMACS -I${srcdir}/../src ${CFLAGS} ${srcdir}/env.c $(LOADLIBES) -o env 225 $(CC) -DEMACS -I${srcdir}/../src ${ALL_CFLAGS} ${srcdir}/env.c $(LOADLIBES) -o env
223 226
224emacsserver: ${srcdir}/emacsserver.c ../src/config.h 227emacsserver: ${srcdir}/emacsserver.c ../src/config.h
225 $(CC) -I${srcdir}/../src ${CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver 228 $(CC) -I${srcdir}/../src ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver
226 229
227emacsclient: ${srcdir}/emacsclient.c ../src/config.h 230emacsclient: ${srcdir}/emacsclient.c ../src/config.h
228 $(CC) -I${srcdir}/../src ${CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient 231 $(CC) -I${srcdir}/../src ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient
229 232
230hexl: ${srcdir}/hexl.c 233hexl: ${srcdir}/hexl.c
231 $(CC) ${CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl 234 $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
232 235
233getdate.o: ${srcdir}/getdate.y ../src/config.h 236getdate.o: ${srcdir}/getdate.y ../src/config.h
234 ${YACC} ${YFLAGS} ${srcdir}/getdate.y 237 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
235 $(CC) -I${srcdir}/../src $(CFLAGS) -c y.tab.c 238 $(CC) -I${srcdir}/../src $(ALL_CFLAGS) -c y.tab.c
236 mv y.tab.o getdate.o 239 mv y.tab.o getdate.o
237timer.o: ${srcdir}/timer.c ../src/config.h 240timer.o: ${srcdir}/timer.c ../src/config.h
238 $(CC) -c -I${srcdir}/../src $(CFLAGS) ${srcdir}/timer.c 241 $(CC) -c -I${srcdir}/../src $(ALL_CFLAGS) ${srcdir}/timer.c
239timer: getdate.o timer.o 242timer: getdate.o timer.o
240 $(CC) -I${srcdir}/../src $(CFLAGS) getdate.o timer.o -o timer 243 $(CC) -I${srcdir}/../src $(ALL_CFLAGS) getdate.o timer.o -o timer
241 244
242make-path: ${srcdir}/make-path.c 245make-path: ${srcdir}/make-path.c
243 $(CC) $(CFLAGS) ${srcdir}/make-path.c -o make-path 246 $(CC) $(ALL_CFLAGS) ${srcdir}/make-path.c -o make-path
244 247
245# These are NOT included in INSTALLABLES or UTILITIES. 248# These are NOT included in INSTALLABLES or UTILITIES.
246# See ../src/ymakefile. 249# See ../src/ymakefile.
247emacstool: ${srcdir}/emacstool.c 250emacstool: ${srcdir}/emacstool.c
248 $(CC) ${srcdir}/emacstool.c -o emacstool ${CFLAGS} \ 251 $(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \
249 -lsuntool -lsunwindow -lpixrect $(LOADLIBES) 252 -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
250 253
251# For SUN Japanese Language Environment 254# For SUN Japanese Language Environment
252nemacstool: ${srcdir}/emacstool.c 255nemacstool: ${srcdir}/emacstool.c
253 $(CC) -o nemacstool -DJLE ${CFLAGS} ${srcdir}/emacstool.c \ 256 $(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \
254 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES) 257 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
255 258
256xvetool: ${srcdir}/emacstool.c 259xvetool: ${srcdir}/emacstool.c
257 $(CC) -o xvetool -DXVIEW ${CFLAGS} ${srcdir}/emacstool.c \ 260 $(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \
258 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ 261 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
259 $(LOADLIBES) 262 $(LOADLIBES)
260 263
261xveterm: ${srcdir}/emacstool.c 264xveterm: ${srcdir}/emacstool.c
262 $(CC) -o xveterm -DXVIEW -DTTERM ${CFLAGS} ${srcdir}/emacstool.c \ 265 $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
263 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ 266 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
264 $(LOADLIBES) 267 $(LOADLIBES)
265 268
266aixcc: ${srcdir}/aixcc.c 269aixcc: ${srcdir}/aixcc.c
267 $(CC) $(CFLAGS) -o aixcc ${srcdir}/aixcc.c 270 $(CC) $(ALL_CFLAGS) -o aixcc ${srcdir}/aixcc.c
268 271
269aixcc.c: ${srcdir}/aixcc.lex 272aixcc.c: ${srcdir}/aixcc.lex
270 lex ${srcdir}/aixcc.lex 273 lex ${srcdir}/aixcc.lex