* Makefile.in (INCLUDE_CFLAGS): Add BFD_INCLUDES for now, since
[deliverable/binutils-gdb.git] / gdb / Makefile.in
1 #Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
2
3 # This file is part of GDB.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later 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 this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 prefix = /usr/local
20
21 program_transform_name =
22 exec_prefix = $(prefix)
23 bindir = $(exec_prefix)/bin
24 libdir = $(exec_prefix)/lib
25 tooldir = $(libdir)/$(target_alias)
26
27 datadir = $(prefix)/lib
28 mandir = $(prefix)/man
29 man1dir = $(mandir)/man1
30 man2dir = $(mandir)/man2
31 man3dir = $(mandir)/man3
32 man4dir = $(mandir)/man4
33 man5dir = $(mandir)/man5
34 man6dir = $(mandir)/man6
35 man7dir = $(mandir)/man7
36 man8dir = $(mandir)/man8
37 man9dir = $(mandir)/man9
38 infodir = $(prefix)/info
39 includedir = $(prefix)/include
40 docdir = $(datadir)/doc
41
42 SHELL = /bin/sh
43
44 INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
45 INSTALL_PROGRAM = $(INSTALL)
46 INSTALL_DATA = $(INSTALL)
47 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
48 INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
49
50 AR = ar
51 AR_FLAGS = qv
52 RANLIB = ranlib
53
54 # Flags that describe where you can find the termcap library.
55 # This can be overridden in the host Makefile fragment file.
56 TERMCAP = -ltermcap
57
58 # System V: If you compile gdb with a compiler which uses the coff
59 # encapsulation feature (this is a function of the compiler used, NOT
60 # of the m-?.h file selected by config.gdb), you must make sure that
61 # the GNU nm is the one that is used by munch.
62
63 # If you are compiling with GCC, make sure that either 1) You use the
64 # -traditional flag, or 2) You have the fixed include files where GCC
65 # can reach them. Otherwise the ioctl calls in inflow.c
66 # will be incorrectly compiled. The "fixincludes" script in the gcc
67 # distribution will fix your include files up.
68 #CC=cc
69 #CC=gcc -traditional
70 GCC=gcc
71
72 # Directory containing source files. Don't clean up the spacing,
73 # this exact string is matched for by the "configure" script.
74 srcdir = .
75
76 # It is also possible that you will need to add -I/usr/include/sys to the
77 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which
78 # is where it should be according to Posix).
79
80 # If you use bison instead of yacc, it needs to include the "-y" argument.
81 #BISON=bison -y
82 BISON=yacc
83 YACC=$(BISON)
84
85 # where to find texinfo; GDB dist should include a recent one
86 TEXIDIR=${srcdir}/../texinfo
87
88 # where to find makeinfo, preferably one designed for texinfo-2
89 MAKEINFO=makeinfo
90
91 # Set this up with gcc if you have gnu ld and the loader will print out
92 # line numbers for undefinded refs.
93 #CC-LD=gcc -static
94 CC-LD=${CC}
95
96 # Where is the "include" directory? Traditionally ../include or ./include
97 INCLUDE_DIR = ${srcdir}/../include
98 INCLUDE_DEP = $$(INCLUDE_DIR)
99
100 # Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
101 # or ./mmalloc (When we want the binary library built from it, we use
102 # ${MMALLOC_DIR}${subdir}.)
103 # Note that mmalloc can still be used on systems without mmap().
104 # To use your system malloc, comment out the following defines.
105 MMALLOC_DIR = ${srcdir}/../mmalloc
106 MMALLOC_DEP = $$(MMALLOC_DIR)
107 MMALLOC_LIB = ./../mmalloc${subdir}/libmmalloc.a
108 # To use your system malloc, uncomment MMALLOC_DISABLE.
109 #MMALLOC_DISABLE = -DNO_MMALLOC
110 # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
111 #MMALLOC_CHECK = -DNO_MMALLOC_CHECK
112 MMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE}
113
114 # Where are the source and binary directories for the BFD library?
115 BFD_SRC_DIR = ${srcdir}/../bfd
116 BFD_OBJ_DIR = ./../bfd${subdir}
117 BFD_DEP = $$(BFD_SRC_DIR)
118 BFD_LIB = $(BFD_OBJ_DIR)/libbfd.a
119 BFD_INCLUDES = -I${BFD_SRC_DIR} -I${BFD_OBJ_DIR}
120
121 # Where is the source dir for the READLINE library? Traditionally in .. or .
122 # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
123 READLINE_DIR = ${srcdir}/../readline
124 READLINE_DEP = $$(READLINE_DIR)
125 RL_LIB = ./../readline${subdir}/libreadline.a
126
127 # All the includes used for CFLAGS and for lint.
128 # -I. for config files.
129 # -I${srcdir} possibly for regex.h also.
130 # -I${srcdir}/config for more generic config files.
131 INCLUDE_CFLAGS = -I. -I${srcdir} -I${srcdir}/config \
132 -I$(INCLUDE_DIR) -I../include ${BFD_INCLUDES}
133
134 # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
135 # from the config/ directory.
136 GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
137 #PROFILE_CFLAGS = -pg
138
139 # CFLAGS is specifically reserved for setting from the command line
140 # when running make. I.E. "make USER_CFLAGS=-Wmissing-prototypes".
141 CFLAGS = -g
142 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
143 INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
144 # None of the things in CFLAGS will do any harm, and on some systems
145 # (e.g. SunOS4) it is important to use the MH_CFLAGS.
146 LDFLAGS = $(CFLAGS)
147
148 # Where is the "-liberty" library, containing getopt and obstack?
149 LIBIBERTY_DIR = ${srcdir}/../libiberty
150 LIBIBERTY = ./../libiberty${subdir}/libiberty.a
151
152 # Where is the "-lopcodes" library, with (some of) the opcode tables and
153 # disassemblers?
154 OPCODES = ./../opcodes${subdir}/libopcodes.a
155
156 # The config/mh-* file must define REGEX and REGEX1 on USG machines.
157 # If your system is missing alloca(), or, more likely, it's there but
158 # it doesn't work, define ALLOCA & ALLOCA1 too.
159
160 # Libraries and corresponding dependencies for compiling gdb.
161 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
162 # TERMCAP comes after readline, since readline depends on it.
163 # If you have the Cygnus libraries installed,
164 # you can use 'CLIBS=${INSTALLED_LIBS}' 'CDEPS='
165 INSTALLED_LIBS=-lbfd -lreadline ${TERMCAP} -lopcodes -lmmalloc \
166 -liberty ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS}
167 CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} \
168 ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS}
169 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} \
170 ${BFD_LIB} ${RL_LIB} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY}
171
172 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES} \
173 ${NAT_ADD_FILES}
174 ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} \
175 ${NAT_ADD_FILES}
176
177 VERSION = 4.9.2
178 DIST=gdb
179
180 LINT=/usr/5bin/lint
181 LINTFLAGS= ${BFD_INCLUDES}
182
183 RUNTEST=runtest
184 RUNTESTFLAGS=
185
186 # This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
187 # interface to the serial port. Hopefully if get ported to OS/2, VMS,
188 # etc., then there will be (as part of the C library or perhaps as
189 # part of libiberty) a POSIX interface. But at least for now the
190 # host-dependent makefile fragment might need to use something else
191 # besides ser-unix.o
192 SER_HARDWIRE=ser-unix.o
193
194 # Host and target-dependent makefile fragments come in here.
195 ####
196 # End of host and target-dependent makefile fragments
197
198 FLAGS_TO_PASS = \
199 "prefix=$(prefix)" \
200 "exec_prefix=$(exec_prefix)" \
201 "against=$(against)" \
202 "AR=$(AR)" \
203 "AR_FLAGS=$(AR_FLAGS)" \
204 "CC=$(CC)" \
205 "CFLAGS=$(CFLAGS)" \
206 "CHILLFLAGS=$(CHILLFLAGS)" \
207 "CHILL=$(CHILL)" \
208 "CHILL_LIB=$(CHILL_LIB)" \
209 "CXX=$(CXX)" \
210 "CXXFLAGS=$(CXXFLAGS)" \
211 "RANLIB=$(RANLIB)" \
212 "MAKEINFO=$(MAKEINFO)" \
213 "INSTALL=$(INSTALL)" \
214 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
215 "INSTALL_DATA=$(INSTALL_DATA)" \
216 "RUNTEST=$(RUNTEST)" \
217 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
218 "BISON=$(BISON)"
219
220 # Flags that we pass when building the testsuite.
221
222 CC_FOR_TARGET = ` \
223 if [ -f $${rootme}/../gcc/Makefile ] ; then \
224 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
225 else \
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
227 echo $(CC); \
228 else \
229 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
230 fi; \
231 fi`
232
233 CXX = gcc
234
235 CXX_FOR_TARGET = ` \
236 if [ -f $${rootme}/../gcc/Makefile ] ; then \
237 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
238 else \
239 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
240 echo $(CXX); \
241 else \
242 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
243 fi; \
244 fi`
245
246 CHILLFLAGS = $(CFLAGS)
247 CHILL = gcc
248 CHILL_FOR_TARGET = ` \
249 if [ -f $${rootme}/../gcc/Makefile ] ; then \
250 echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../chillrt/; \
251 else \
252 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
253 echo $(CC); \
254 else \
255 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
256 fi; \
257 fi`
258 CHILL_LIB = -lchill
259
260 # The use of $$(x_FOR_TARGET) reduces the command line length by not
261 # duplicating the lengthy definition.
262 TARGET_FLAGS_TO_PASS = \
263 "prefix=$(prefix)" \
264 "exec_prefix=$(exec_prefix)" \
265 "against=$(against)" \
266 'CC=$$(CC_FOR_TARGET)' \
267 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
268 "CFLAGS=$(CFLAGS)" \
269 "CHILLFLAGS=$(CHILLFLAGS)" \
270 'CHILL=$$(CHILL_FOR_TARGET)' \
271 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
272 "CHILL_LIB=$(CHILL_LIB)" \
273 'CXX=$$(CXX_FOR_TARGET)' \
274 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
275 "CXXFLAGS=$(CXXFLAGS)" \
276 "MAKEINFO=$(MAKEINFO)" \
277 "INSTALL=$(INSTALL)" \
278 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
279 "INSTALL_DATA=$(INSTALL_DATA)" \
280 "RUNTEST=$(RUNTEST)" \
281 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
282 "BISON=$(BISON)"
283
284 # All source files that go into linking GDB.
285 # Source files which are included via a config/*/* Makefile fragment should
286 # *not* be specified here; they're in "ALLDEPFILES".
287 # Neither should links made at configuration time be specified here, since
288 # SFILES is used in building the distribution archive.
289
290 SFILES = ${srcdir}/blockframe.c ${srcdir}/breakpoint.c ${srcdir}/buildsym.c \
291 ${srcdir}/c-exp.y ${srcdir}/c-lang.c ${srcdir}/c-typeprint.c \
292 ${srcdir}/c-valprint.c ${srcdir}/ch-exp.y ${srcdir}/ch-lang.c \
293 ${srcdir}/ch-typeprint.c ${srcdir}/ch-valprint.c ${srcdir}/coffread.c \
294 ${srcdir}/command.c ${srcdir}/complaints.c ${srcdir}/core.c \
295 ${srcdir}/cp-valprint.c ${srcdir}/dbxread.c ${srcdir}/demangle.c \
296 ${srcdir}/dwarfread.c ${srcdir}/elfread.c ${srcdir}/environ.c \
297 ${srcdir}/eval.c ${srcdir}/expprint.c ${srcdir}/findvar.c \
298 ${srcdir}/gdbtypes.c \
299 ${srcdir}/infcmd.c ${srcdir}/inflow.c ${srcdir}/infrun.c \
300 ${srcdir}/language.c ${srcdir}/putenv.c ${srcdir}/m2-exp.y \
301 ${srcdir}/m2-lang.c ${srcdir}/m2-typeprint.c \
302 ${srcdir}/m2-valprint.c ${srcdir}/main.c ${srcdir}/maint.c \
303 ${srcdir}/mem-break.c ${srcdir}/minsyms.c ${srcdir}/mipsread.c \
304 ${srcdir}/objfiles.c ${srcdir}/parse.c ${srcdir}/printcmd.c \
305 ${srcdir}/remote.c ${srcdir}/source.c ${srcdir}/stabsread.c \
306 ${srcdir}/stack.c \
307 ${srcdir}/symfile.c ${srcdir}/symmisc.c ${srcdir}/symtab.c \
308 ${srcdir}/target.c ${srcdir}/typeprint.c ${srcdir}/utils.c \
309 ${srcdir}/valarith.c \
310 ${srcdir}/valops.c ${srcdir}/valprint.c ${srcdir}/values.c \
311 ${srcdir}/serial.c ${srcdir}/ser-unix.c
312
313 # Files that are not source code, but need to go into gdb-$(VERSION).tar.Z.
314 NONSRC = ${srcdir}/Makefile.in ${srcdir}/depend ${srcdir}/alldeps.mak \
315 ${srcdir}/munch ${srcdir}/configure.in \
316 ${srcdir}/ChangeLog ${srcdir}/ChangeLog-9091 ${srcdir}/ChangeLog-92 \
317 ${srcdir}/ChangeLog-3.x \
318 ${srcdir}/gdb.1 ${srcdir}/refcard.ps ${srcdir}/README ${srcdir}/TODO \
319 TAGS ${srcdir}/NEWS ${srcdir}/Projects ${srcdir}/.gdbinit \
320 ${srcdir}/COPYING $(YYFILES) ${srcdir}/copying.c \
321 ${srcdir}/copying.awk \
322 ${srcdir}/saber.suppress ${srcdir}/standalone.c ${srcdir}/stuff.c \
323 ${srcdir}/kdb-start.c ${srcdir}/gcc.patch \
324 ${srcdir}/nindy-share/Makefile ${srcdir}/nindy-share/VERSION \
325 ${srcdir}/nindy-share/README ${srcdir}/vx-share/README \
326 ${srcdir}/29k-share/README \
327 ${srcdir}/config/convex/Convex.notes
328
329 # All source files that lint should look at
330 LINTFILES = $(SFILES) $(YYFILES) init.c
331
332 # Any additional files specified on these lines should also be added to
333 # the NONSRC definition, so they go in the tar files.
334 SFILES_STAND = $(SFILES) standalone.c
335 SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
336
337 # Header files that are not named in config/*/* Makefile fragments go here.
338 HFILES = ${srcdir}/breakpoint.h ${srcdir}/buildsym.h ${srcdir}/call-cmds.h \
339 ${srcdir}/command.h ${srcdir}/defs.h ${srcdir}/environ.h \
340 ${srcdir}/expression.h ${srcdir}/frame.h ${srcdir}/gdbcmd.h \
341 ${srcdir}/gdbcore.h ${srcdir}/gdbtypes.h ${srcdir}/gdb-stabs.h \
342 ${srcdir}/inferior.h ${srcdir}/language.h ${srcdir}/minimon.h \
343 ${srcdir}/objfiles.h ${srcdir}/parser-defs.h \
344 ${srcdir}/partial-stab.h ${srcdir}/serial.h ${srcdir}/signals.h \
345 ${srcdir}/solib.h ${srcdir}/symfile.h ${srcdir}/symtab.h \
346 ${srcdir}/stabsread.h ${srcdir}/target.h ${srcdir}/terminal.h \
347 ${srcdir}/typeprint.h ${srcdir}/xcoffsolib.h ${srcdir}/value.h \
348 ${srcdir}/c-lang.h ${srcdir}/ch-lang.h ${srcdir}/m2-lang.h \
349 ${srcdir}/complaints.h ${srcdir}/ns32k-opcode.h ${srcdir}/valprint.h \
350 ${srcdir}/config/m68k/tm-m68k.h ${srcdir}/config/pa/tm-hppa.h \
351 ${srcdir}/config/i960/tm-i960.h ${srcdir}/config/sparc/tm-sparc.h \
352 ${srcdir}/config/tm-sunos.h \
353 ${srcdir}/config/tm-sysv4.h ${srcdir}/config/m68k/xm-m68k.h \
354 ${srcdir}/config/sparc/xm-sparc.h \
355 ${srcdir}/config/xm-sysv4.h ${srcdir}/config/vax/xm-vax.h \
356 ${srcdir}/config/nm-trash.h ${srcdir}/29k-share/udi/udiids.h \
357 ${srcdir}/29k-share/udi/udiphcfg.h ${srcdir}/29k-share/udi/udiphunix.h \
358 ${srcdir}/29k-share/udi/udiproc.h ${srcdir}/29k-share/udi/udipt29k.h \
359 ${srcdir}/29k-share/udi/udiptcfg.h ${srcdir}/29k-share/udi/udisoc.h \
360 ${srcdir}/29k-share/udi_soc ${srcdir}/nindy-share/b.out.h \
361 ${srcdir}/nindy-share/block_io.h ${srcdir}/nindy-share/coff.h \
362 ${srcdir}/nindy-share/demux.h ${srcdir}/nindy-share/env.h \
363 ${srcdir}/nindy-share/stop.h ${srcdir}/nindy-share/ttycntl.h \
364 ${srcdir}/vx-share/dbgRpcLib.h ${srcdir}/vx-share/ptrace.h \
365 ${srcdir}/vx-share/vxTypes.h ${srcdir}/vx-share/vxWorks.h \
366 ${srcdir}/vx-share/wait.h ${srcdir}/vx-share/xdr_ld.h \
367 ${srcdir}/vx-share/xdr_ptrace.h ${srcdir}/vx-share/xdr_rdb.h
368
369 # GDB "info" files, which should be included in their entirety
370 INFOFILES = gdb.info*
371
372 REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar
373
374 POSSLIBS = ${srcdir}/regex.c ${srcdir}/regex.h ${srcdir}/alloca.c
375
376 TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
377
378 # Subdirectories of gdb, which should be included in their entirety in
379 # gdb-xxx.tar.Z:
380 TARDIRS = doc sparclite # tests
381
382 # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
383 # default their values the way we do for SER_HARDWIRE; in the future
384 # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
385 # variables analogous to SER_HARDWIRE which get defaulted in this
386 # Makefile.in
387
388 DEPFILES = ${TDEPFILES} ${XDEPFILES} ${SER_HARDWIRE} ${NATDEPFILES}
389
390 SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES)
391 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
392
393 TARFILES = ${SFILES} ${HFILES} ${NONSRC} ${ALLDEPFILES} $(ALLCONFIG) \
394 $(ALLPARAM) $(INFOFILES) ${POSSLIBS} ${REMOTE_EXAMPLES}
395
396 OBS = version.o main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
397 values.o eval.o valops.o valarith.o valprint.o printcmd.o \
398 symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
399 command.o utils.o expprint.o environ.o gdbtypes.o \
400 copying.o $(DEPFILES) mem-break.o target.o \
401 putenv.o parse.o language.o $(YYOBJ) \
402 buildsym.o objfiles.o minsyms.o maint.o demangle.o \
403 dbxread.o coffread.o elfread.o dwarfread.o mipsread.o \
404 stabsread.o core.o c-lang.o ch-lang.o m2-lang.o complaints.o \
405 typeprint.o c-typeprint.o ch-typeprint.o m2-typeprint.o \
406 c-valprint.o cp-valprint.o ch-valprint.o m2-valprint.o \
407 serial.o
408
409 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
410
411 TSOBS = inflow.o
412
413 NTSOBS = standalone.o
414
415 TSSTART = /lib/crt0.o
416
417 NTSSTART = kdb-start.o
418
419 SUBDIRS = doc testsuite
420
421 # For now, shortcut the "configure GDB for fewer languages" stuff.
422 YYFILES = c-exp.tab.c m2-exp.tab.c ch-exp.tab.c
423 YYOBJ = c-exp.tab.o m2-exp.tab.o ch-exp.tab.o
424
425 # Prevent Sun make from putting in the machine type. Setting
426 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
427 .c.o:
428 ${CC} -c ${INTERNAL_CFLAGS} $<
429
430 all: gdb
431 @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
432
433 installcheck:
434 check: force
435 @rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=check DODIRS=testsuite subdir_do
436 info dvi: force
437 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
438 install-info: force
439 @$(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
440 clean-info: force
441 @$(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
442
443 gdb.z:gdb.1
444 nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
445 pack gdb.t ; rm -f gdb.t
446 mv gdb.t.z gdb.z
447
448 # Traditionally this depends on "all". But it is probably more useful
449 # not to; for example, if the user has made some trivial change to a
450 # source file and doesn't care about rebuilding or just wants to save the
451 # time it takes for make to check that all is up to date.
452 install:
453 $(INSTALL_XFORM) gdb $(bindir)/gdb
454 $(INSTALL_XFORM1) $(srcdir)/gdb.1 $(man1dir)/gdb.1
455 $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$n.1
456 $(M_INSTALL)
457 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
458
459 init.c: $(srcdir)/munch $(OBS) $(TSOBS)
460 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
461
462 gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
463 ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdb \
464 init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
465
466 saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
467 #setopt load_flags $(CFLAGS) ${BFD_INCLUDES} -DHOST_SYS=SUN4_SYS
468 #load ./init.c $(SFILES)
469 #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/ch-exp.y
470 #unload ${srcdir}/vx-share/*.h
471 #unload ${srcdir}/nindy-share/[A-Z]*
472 #load c-exp.tab.c m2-exp.tab.c ch-exp.tab.c
473 #load copying.c version.c
474 #load ../opcodes/libopcodes.a
475 #load ../libiberty/libiberty.a
476 #load ../bfd/libbfd.a
477 #load ../readline/libreadline.a
478 #load ../mmalloc/libmmalloc.a
479 #load -ltermcap
480 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
481 echo "Load .c corresponding to:" $(DEPFILES)
482
483
484 # This is useful when debugging GDB, because some Unix's don't let you run GDB
485 # on itself without copying the executable. So "make gdb1" will make
486 # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
487 # Removing gdb1 before the copy is the right thing if gdb1 is open
488 # in another process.
489 gdb1: gdb
490 rm -f gdb1
491 cp gdb gdb1
492
493 # This is a remote stub which runs under unix and starts up an
494 # inferior process. This is at least useful for debugging GDB's
495 # remote support.
496 rapp: $(RAPP_OBS)
497 rm -f rapp_init.c
498 ${srcdir}/munch ${MUNCH_DEFINE} ${RAPP_OBS} > rapp_init.c
499 ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
500
501 # Support for building Makefile out of configured pieces, automatically
502 # generated dependencies, etc. alldeps.mak is a file that contains
503 # "make" variable definitions for all ALLDEPFILES, ALLPARAM, and ALLCONFIG,
504 # all cadged from the current contents of the config subtree.
505
506 # using sort and uniq is not a violation of the GNU coding standards
507 # because this rule is not part of building and installing GDB.
508 alldeps.mak: force
509 rm -f alldeps.mak alldeps*.tmp allparam*.tmp allconfig*.tmp
510 for i in `(cd ${srcdir}; find config -name '*.m[ht]' -print)` ; do \
511 echo $$i >>allconfig.tmp; \
512 awk <${srcdir}/$$i ' \
513 $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" \
514 || $$1 == "NATDEPFILES=" || $$1 == "SER_HARDWIRE=" { \
515 for (i = 2; i <= NF; i++) \
516 print $$i >> "alldeps.tmp" ; \
517 } \
518 $$1 == "TM_FILE=" || $$1 == "XM_FILE=" || $$1 == "NAT_FILE=" { \
519 print $$2 >> "allparam.tmp" }' ; \
520 done
521 sort <alldeps.tmp | uniq | \
522 sed -e 's/arm-convert.o/arm-convert.s/' \
523 -e 's!^Onindy.o!nindy-share/Onindy.c!' \
524 -e 's!^nindy.o!nindy-share/nindy.c!' \
525 -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
526 -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
527 -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
528 -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
529 -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
530 -e 's!udr.o!29k-share/udi/udr.c!' \
531 -e 's!udip2soc.o!29k-share/udi/udip2soc.c!' \
532 -e '/..\/sim\//d' \
533 -e '/..\/opcodes\//d' \
534 -e 's/\.o/.c/' \
535 >alldeps2.tmp
536 for i in `cat allparam.tmp` ; do \
537 (cd ${srcdir} ; \
538 find config -name $$i -print ) >>allparam2.tmp ; \
539 done
540 echo '# Start of "alldeps.mak" definitions' >>alldeps.mak;
541 sort <alldeps2.tmp | uniq | awk 'BEGIN {printf "ALLDEPFILES="} \
542 NR == 0 {printf "$${srcdir}/" $$0;} \
543 NR != 0 {printf "\\\n" "$${srcdir}/" $$0} \
544 END {printf "\n\n"}' >>alldeps.mak;
545 sort <allparam2.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
546 NR == 0 {printf "$${srcdir}/" $$0;} \
547 NR != 0 {printf "\\\n" "$${srcdir}/" $$0} \
548 END {printf "\n\n"}' >>alldeps.mak;
549 sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
550 NR == 0 {printf "$${srcdir}/" $$0;} \
551 NR != 0 {printf "\\\n" "$${srcdir}/" $$0} \
552 END {printf "\n\n"}' >>alldeps.mak;
553 echo '# End of "alldeps.mak" definitions' >>alldeps.mak;
554 rm -f alldeps*.tmp allparam*.tmp allconfig*.tmp
555
556 depend: $(SOURCES) Makefile.in
557 @echo Ignore errors about non-existent system-supplied include files
558 @echo for systems other than the one you are using.
559 @echo Also ignore any errors in arm-convert.s.
560 -$(GCC) -MM -nostdinc -I/usr/include ${BFD_INCLUDES} \
561 -I${READLINE_DIR} $(INTERNAL_CFLAGS) \
562 `ls $(SOURCES) | grep -v '\.[hy]$$' | \
563 sort -u` >depend.tmp
564 #BEGIN COMMENTED OUT CODE -- this should now be taken care of below.
565 # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
566 # for xm.h, tm.h and nm.h. This allows the same "depend" file to be used
567 # by the various subdirectories.
568 # if [ "${srcdir}" = "." ] ; then \
569 # <depend.tmp sed \
570 # -e 's; ./xm.h; xm.h;g' \
571 # -e 's; ./tm.h; tm.h;g' \
572 # -e 's; ./nm.h; nm.h;g' \
573 # -e 's; \./; $${srcdir}/;g' \
574 # -e 's; vx-share/; $${srcdir}/vx-share/;g' \
575 # -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
576 # -e 's; 29k-share/; $${srcdir}/29k-share/;g' \
577 # >depend.tm2; \
578 # rm depend.tmp; \
579 # mv depend.tm2 depend.tmp; \
580 # fi
581 #END COMMENTED OUT CODE
582 # Make everything which depends on {x,t,n}m.h depend on config.status as
583 # well, in case someone reconfigures gdb out from under an already
584 # compiled gdb.
585 #
586 # Translate SRCDIR/foo.c to $srcdir/foo.c. This allows this "depend" file
587 # to be used by any dir, or included in a distribution. It's possible
588 # we should write the generated copy into SRCDIR like "make headers" does
589 # in bfd. We do not try to quote the regexp, so if SRCDIR/ is "./" it will
590 # also match any single character followed by "/". This is OK.
591 <depend.tmp sed \
592 -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
593 -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
594 -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
595 -e 's; $(INCLUDE_DEP)/bfd\.h; $$(BFD_OBJ_DIR)/../include/bfd.h;g' \
596 -e 's; \./xm.h; xm.h config.status;g' \
597 -e 's; \./tm.h; tm.h config.status;g' \
598 -e 's; \./nm.h; nm.h config.status;g' \
599 -e 's; ${srcdir}/; $${srcdir}/;g' \
600 -e 's; vx-share/; $${srcdir}/vx-share/;g' \
601 -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
602 -e 's; 29k-share/; $${srcdir}/29k-share/;g' \
603 >depend.tm3;
604 # OK, get your sed manual out. This script makes the rules in
605 # depend explicitly state the rule, rather than relying on VPATH
606 # or a .c.o implicit rule. This is needed for Sun make, and should
607 # be portable to any make worthy of the name.
608 # There is one exception: the *.tab.c files can exist either in srcdir
609 # or in ., so make sure not to use an explicit rule for them.
610 #
611 # Adding -I${BFD_SRC_DIR} and -I${BFD_OBJ_DIR}/../include is required for all
612 # the files which use BFD internals. This is because some bfd include files
613 # are in the source directory, and some (bfd.h for example) are generated in
614 # a sibling include directory of the bfd build directory.
615 # Adding -I${READLINE_DIR} is required because the readline header files
616 # are in readline not in include. They probably should be moved.
617 <depend.tm3 sed \
618 -e '/:/h' \
619 -e '/\\$$/b end' \
620 -e 'p' \
621 -e 'g' \
622 -e '/:.*\.tab\.c/d' \
623 -e 's/.*:\(.*\.c\).*/ $${CC} -c $${INTERNAL_CFLAGS} \1/' \
624 -e 's;$${srcdir}/xcoffread.c;$${BFD_INCLUDES} &;' \
625 -e 's;$${srcdir}/xcoffexec.c;$${BFD_INCLUDES} &;' \
626 -e 's;$${srcdir}/paread.c;$${BFD_INCLUDES} &;' \
627 -e 's;$${srcdir}/stabsread.c;$${BFD_INCLUDES} &;' \
628 -e 's;$${srcdir}/dwarfread.c;$${BFD_INCLUDES} &;' \
629 -e 's;$${srcdir}/elfread.c;$${BFD_INCLUDES} &;' \
630 -e 's;$${srcdir}/mipsread.c;$${BFD_INCLUDES} &;' \
631 -e 's;$${srcdir}/coffread.c;$${BFD_INCLUDES} &;' \
632 -e 's;$${srcdir}/dbxread.c;$${BFD_INCLUDES} &;' \
633 -e 's;$${srcdir}/main.c;-I$${READLINE_DIR} &;' \
634 -e ': end' \
635 >depend.tm4;
636 mv depend.tm4 depend
637 # rm depend.tm?
638
639 config.status:
640 @echo "You must configure gdb. Look at the README file for details."
641 @false
642
643 # This checks the configure.in file versus the config/ directory.
644 config-check: config-check-hosts config-check-targets
645 config-check-hosts:
646 grep gdb_host= ${srcdir}/configure.in | \
647 sed -e 's/.*gdb_host=//' -e 's/ ;;$$/.mh/' | sort -u >HOSTconf.o
648 (cd ${srcdir}/config; ls *.mh) >HOSTdir.o
649 diff -u HOSTconf.o HOSTdir.o
650
651 config-check-targets:
652 grep gdb_target= ${srcdir}/configure.in | \
653 sed -e 's/.*gdb_target=//' -e 's/ ;;$$/.mh/' | sort -u >TARGconf.o
654 (cd ${srcdir}/config; ls *.mt) >TARGdir.o
655 diff -u HOSTconf.o HOSTdir.o
656
657 # These are not generated by "make depend" because they only are there
658 # for some machines.
659 # But these rules don't do what we want; we want to hack the foo.o: tm.h
660 # dependency to do the right thing.
661 tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-m68k.h
662 tm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-m68k.h
663 xm-news1000.h: xm-news.h
664 xm-i386-sv32.h: xm-i386.h
665 tm-i386gas.h: tm-i386.h
666 xm-sun4os4.h: xm-sparc.h
667 tm-sun4os4.h: tm-sparc.h
668 xm-vaxult.h: xm-vax.h
669 xm-vaxbsd.h: xm-vax.h
670
671 kdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
672 rm -f init.c
673 $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
674 $(CC) $(LDFLAGS) -c init.c $(CLIBS)
675 ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
676 -lc $(CLIBS)
677
678 # Put the proper machine-specific files first, so M-. on a machine
679 # specific routine gets the one for the correct machine.
680 # The xyzzy stuff below deals with empty DEPFILES
681 TAGS: ${TAGFILES}
682 etags `find ${srcdir}/config -name $(TM_FILE) -print` \
683 `find ${srcdir}/config -name ${XM_FILE} -print` \
684 `find ${srcdir}/config -name ${NAT_FILE} -print` \
685 `for i in yzzy ${DEPFILES}; do \
686 if [ x$$i != xyzzy ]; then \
687 echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
688 fi; \
689 done` \
690 ${TAGFILES}
691 tags: TAGS
692
693 # Making distributions of GDB and friends.
694
695 # Make a tar file containing the GDB directory of the distribution.
696 gdb.tar.Z: force_update
697 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
698 $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
699
700 # Make a directory `proto-gdb.dir' that contains an image of the GDB
701 # directory of the distribution, built up with symlinks. Note that this
702 # make target is not directly referenced by any other rules in this makefile,
703 # it is referenced by the makefile in the parent directory.
704 make-proto-gdb.dir: force_update
705 $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
706 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
707
708 # Set up the GDB source directory for distribution, by building all files that
709 # are products of other files.
710 setup-to-dist: update-depend force_update
711 ../configure none
712 (cd doc; $(MAKE) $(MFLAGS) GDBvn.texi)
713 $(MAKE) $(MFLAGS) gdb.info
714 $(MAKE) $(MFLAGS) refcard.ps
715
716 # Update the "depend" and "alldeps.mak" files in a source directory.
717 # We update alldeps.mak first, since it is used to generate the list
718 # of files to be checked for dependencies.
719 update-depend: update-alldeps force_update
720 ../configure none -norecursion
721 (cd ../bfd; ../configure sun4 -norecursion; rm -f stmp-bfd.h)
722 (cd ../bfd; $(MAKE) $(MFLAGS) bfd.h)
723 rm -f depend
724 $(MAKE) $(MFLAGS) depend
725
726 # Update the "alldeps.mak" file in a source directory.
727 update-alldeps: force_update
728 ../configure none -norecursion
729 rm -f alldeps.mak
730 $(MAKE) $(MFLAGS) alldeps.mak
731
732 # Build a tar file from a proto-gdb.dir.
733 gdb-$(VERSION).tar.Z: force_update
734 rm -f gdb.tar gdb-$(VERSION).tar.Z
735 $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
736 ln -s proto-gdb.dir $(DIST)
737 tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
738 rm -rf $(DIST) proto-gdb.dir
739
740 # Build a proto-gdb.dir after GDB has been set up for distribution.
741 # This stuff must be run in `Makefile', not `Makefile.in`; we use the makefile
742 # built in the setup-to-dist process, since it defines things like ALLCONFIG
743 # and ALLDEPFILES, that we need.
744 make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
745 rm -rf proto-gdb.dir
746 mkdir proto-gdb.dir
747 rootme=`pwd`/ ; export rootme ; \
748 for i in `echo ${TARDIRS}`; do \
749 (cd proto-gdb.dir ; \
750 mkdir -p $$i; \
751 cd $$i; \
752 ln -s $${rootme}/$$i/* .; \
753 rm -rf SCCS CVS CVS.adm RCS config.status; \
754 if test -f Makefile.in; then rm Makefile; else true; fi;); \
755 done ; \
756 for i in `echo ${TARFILES}`; do \
757 (cd proto-gdb.dir ; \
758 dir=`dirname $$i`; \
759 if test -d $$dir; then true; else mkdir -p $$dir; fi; \
760 ln -s $${rootme}/$$i $$i;); \
761 done
762 chmod og=u `find . -print`
763
764 # Build a proto-testsuite.dir.
765 make-proto-testsuite.dir: force_update
766 rm -rf proto-testsuite.dir
767 mkdir proto-testsuite.dir
768 rootme=`pwd`/ ; export rootme ; \
769 for i in `find testsuite -type f -print`; do \
770 (cd proto-testsuite.dir ; \
771 dir=`dirname $$i`; \
772 if test -d $$dir; then true; else mkdir -p $$dir; fi; \
773 ln -s $${rootme}/$$i $$i;); \
774 done
775 find proto-testsuite.dir -name Makefile -exec rm {} \;
776 find proto-testsuite.dir -name config.status -exec rm {} \;
777
778 clean:
779 @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
780 rm -f *.o ${ADD_FILES} *~
781 rm -f init.c version.c
782 rm -f gdb core make.log
783 rm -f gdb[0-9]
784
785 # This used to depend on c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
786 # I believe this is wrong; the makefile standards for distclean just
787 # describe removing files; the only sort of "re-create a distribution"
788 # functionality described is if the distributed files are unmodified.
789 distclean: clean
790 @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do
791 rm -f nm.h tm.h xm.h config.status
792 rm -f y.output yacc.acts yacc.tmp
793 rm -f ${TESTS} Makefile depend
794
795 realclean: clean
796 @$(MAKE) $(FLAGS_TO_PASS) DO=realclean "DODIRS=$(SUBDIRS)" subdir_do
797 rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
798 rm -f nm.h tm.h xm.h config.status
799 rm -f y.output yacc.acts yacc.tmp
800 rm -f ${TESTS} Makefile depend
801
802 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
803
804 subdir_do: force
805 @for i in $(DODIRS); do \
806 if [ -f ./$$i/Makefile ] ; then \
807 if (cd ./$$i; \
808 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
809 else exit 1 ; fi ; \
810 else true ; fi ; \
811 done
812
813 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
814 $(SHELL) ./config.status
815
816 force:
817
818 # Documentation!
819 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
820 refcard.dvi:
821 ( cd ./doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) )
822 mv ./doc/refcard.dvi .
823
824 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
825 refcard.ps:
826 ( cd ./doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) )
827 mv ./doc/refcard.ps .
828
829 # GDB MANUAL: TeX dvi file
830 gdb.dvi:
831 ( cd ./doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) )
832 mv ./doc/gdb.dvi .
833
834 # GDB MANUAL: info file
835 gdb.info:
836 ( cd ./doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) )
837 mv ./doc/gdb.info* .
838
839 # Make copying.c from COPYING
840 copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
841 awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
842
843 version.c: Makefile
844 echo 'char *version = "$(VERSION)";' >version.c
845 echo 'char *host_canonical = "$(host_canonical)";' >> version.c
846 echo 'char *target_canonical = "$(target_canonical)";' >> version.c
847
848 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
849 # in srcdir, then compiled in target dir to c-exp.tab.o.
850 # ././c-exp.tab.c is so the command argument will never match $(srcdir)/c-exp.y
851 # (some "makes" rewrite the VPATH into command arguments if they match deps).
852 # Remove bogus decls for malloc/realloc/free which conflict with everything
853 # else.
854 c-exp.tab.o: c-exp.tab.c
855 c-exp.tab.c: $(srcdir)/c-exp.y $(srcdir)/Makefile.in
856 @echo 'Expect 4 shift/reduce conflicts.'
857 ${YACC} ${YFLAGS} $(srcdir)/c-exp.y
858 -sed -e '/extern.*malloc/d' \
859 -e '/extern.*realloc/d' \
860 -e '/extern.*free/d' \
861 -e '/include.*malloc.h/d' \
862 -e 's/malloc/xmalloc/g' \
863 -e 's/realloc/xrealloc/g' \
864 < y.tab.c > c-exp.new
865 -rm y.tab.c
866 mv c-exp.new ././c-exp.tab.c
867
868 # ch-exp.tab.c is generated in target dir from ch-exp.y if it doesn't exist
869 # in srcdir, then compiled in target dir to ch-exp.tab.o.
870 # Remove bogus decls for malloc/realloc/free which conflict with everything
871 # else.
872 ch-exp.tab.o: ch-exp.tab.c
873 ch-exp.tab.c: $(srcdir)/ch-exp.y $(srcdir)/Makefile.in
874 ${YACC} ${YFLAGS} $(srcdir)/ch-exp.y
875 -sed -e '/extern.*malloc/d' \
876 -e '/extern.*realloc/d' \
877 -e '/extern.*free/d' \
878 -e '/include.*malloc.h/d' \
879 -e 's/malloc/xmalloc/g' \
880 -e 's/realloc/xrealloc/g' \
881 < y.tab.c > ch-exp.new
882 -rm y.tab.c
883 mv ch-exp.new ././ch-exp.tab.c
884
885 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
886 # in srcdir, then compiled in target dir to m2-exp.tab.o.
887 # Remove bogus decls for malloc/realloc/free which conflict with everything
888 # else.
889 m2-exp.tab.o: m2-exp.tab.c
890 m2-exp.tab.c: $(srcdir)/m2-exp.y $(srcdir)/Makefile.in
891 ${YACC} ${YFLAGS} $(srcdir)/m2-exp.y
892 -sed -e '/extern.*malloc/d' \
893 -e '/extern.*realloc/d' \
894 -e '/extern.*free/d' \
895 -e '/include.*malloc.h/d' \
896 -e 's/malloc/xmalloc/g' \
897 -e 's/realloc/xrealloc/g' \
898 < y.tab.c > m2-exp.new
899 -rm y.tab.c
900 mv m2-exp.new ././m2-exp.tab.c
901
902 # These files are updated atomically, so make never has to remove them
903 .PRECIOUS: m2-exp.tab.c ch-exp.tab.c c-exp.tab.c
904
905 lint: $(LINTFILES)
906 $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
907 `echo ${DEPFILES} | sed 's/\.o /\.c /g'
908
909 gdb.cxref: $(SFILES)
910 cxref -I. $(SFILES) >gdb.cxref
911
912 force_update:
913
914 # GNU Make has an annoying habit of putting *all* the Makefile variables
915 # into the environment, unless you include this target as a circumvention.
916 # Rumor is that this will be fixed (and this target can be removed)
917 # in GNU Make 4.0.
918 .NOEXPORT:
919
920 # GNU Make 3.63 has a different problem: it keeps tacking command line
921 # overrides onto the definition of $(MAKE). This variable setting
922 # will remove them.
923 MAKEOVERRIDES=
924
925 ## This is ugly, but I don't want GNU make to put these variables in
926 ## the environment. Older makes will see this as a set of targets
927 ## with no dependencies and no actions.
928 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
929
930 # This is the end of "Makefile.in". When built into "Makefile"
931 # by the configure script, two things are added below this point:
932 # alldeps.mak -- definitions of all files that are used in
933 # host- or target-dependent configurations
934 # depend -- what .o files depend on what .c and .h files,
935 # for all configurations.
This page took 0.047303 seconds and 5 git commands to generate.