prefix = /usr/local
-program_prefix =
+program_transform_name =
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
# All the includes used for CFLAGS and for lint.
# -I. for config files.
# -I${srcdir} possibly for regex.h also.
-INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR)
+INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR)
# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
# from the config/ directory.
ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
-VERSION = 4.5.6
+VERSION = 4.6.6
DIST=gdb
LINT=/usr/5bin/lint
LINTFLAGS= -I${BFD_DIR}
-# Select demangler to use.
-DEMANGLER=cplus-dem
-
-# Select options to use when compiling ${DEMANGLER}.c. The default is no
-# options, which is correct for most targets, and also defaults to g++ style
-# demangling. For other demangling styles, such as the Annotated C++
-# Reference Manual (section 7.2.1c) style, set this define in the target-
-# dependent makefile fragment.
-DEMANGLE_OPTS=
-
# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments
+FLAGS_TO_PASS = \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "CFLAGS=$(CFLAGS)" \
+ "RANLIB=$(RANLIB)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "BISON=$(BISON)"
+
# Source files in the main directory.
# Files which are included via a config/* Makefile fragment
# should *not* be specified here; they're in "ALLDEPFILES".
SFILES_MAINDIR = \
- blockframe.c breakpoint.c command.c core.c \
+ blockframe.c breakpoint.c command.c core.c demangle.c \
environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
main.c printcmd.c gdbtypes.c \
remote.c source.c stack.c symmisc.c symtab.c symfile.c \
utils.c valarith.c valops.c valprint.c values.c c-exp.y m2-exp.y \
- ${DEMANGLER}.c mem-break.c target.c inftarg.c \
- dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
+ mem-break.c target.c inftarg.c \
+ dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
ieee-float.c language.c parse.c buildsym.c objfiles.c \
- minsyms.c mipsread.c
+ minsyms.c mipsread.c maint.c
# Source files in subdirectories (which will be handled separately by
# 'make gdb.tar.Z').
SFILES_KGDB = $(SFILES) stuff.c kdb-start.c
# Header files that are not named in config/* Makefile fragments go here.
-HFILES= breakpoint.h buildsym.h call-cmds.h command.h defs.h demangle.h \
+HFILES= breakpoint.h buildsym.h call-cmds.h command.h defs.h \
environ.h expression.h frame.h gdbcmd.h gdbcore.h gdbtypes.h \
+ gdb-stabs.h \
ieee-float.h inferior.h minimon.h objfiles.h partial-stab.h \
serial.h signals.h symfile.h symtab.h solib.h xcoffsolib.h \
target.h terminal.h tm-68k.h tm-i960.h tm-sunos.h tm-sysv4.h \
.gdbinit COPYING $(YYFILES) \
copying.c Convex.notes copying.awk \
saber.suppress standalone.c stuff.c kdb-start.c \
- putenv.c
+ putenv.c gcc.patch
# Subdirectories of gdb, which should be included in their entirety in
# gdb-xxx.tar.Z:
values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
command.o utils.o expprint.o environ.o version.o gdbtypes.o \
- copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \
+ copying.o $(DEPFILES) mem-break.o target.o \
inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
- buildsym.o objfiles.o minsyms.o \
- dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o
+ buildsym.o objfiles.o minsyms.o maint.o demangle.o \
+ dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
+ stabsread.o
RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
${CC} -c ${INTERNAL_CFLAGS} $<
all: gdb
- $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
check:
info: force
- $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" "MAKEINFO=$(MAKEINFO)"
+ $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
install-info: force
- $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
clean-info: force
- $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
gdb.z:gdb.1
nroff -man $(srcdir)/gdb.1 | col -b > gdb.t
mv gdb.t.z gdb.z
install: gdb
- $(INSTALL_PROGRAM) gdb $(bindir)/$(program_prefix)gdb
- $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$(program_prefix)gdb.1
+ -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
+ if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+ -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
+ -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
+ if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+ -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
+ -n=`t='$(program_transform_name)'; echo gdb | sed -e "" $$t`; \
+ $(INSTALL_PROGRAM) gdb $(bindir)/$$n; \
+ $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$n.1
$(M_INSTALL)
- $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
+ $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
init.c: $(srcdir)/munch $(OBS) $(TSOBS)
$(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
@echo arm-convert.s.
touch xm.h tm.h
-$(GCC) -MM -nostdinc -I/usr/include $(CFLAGS) -I$(BFD_DIR) \
- $(INCLUDE_CFLAGS) `ls $(SOURCES) | grep -v '\.[hy]$$' | \
+ -I${READLINE_DIR} $(INCLUDE_CFLAGS) \
+ `ls $(SOURCES) | grep -v '\.[hy]$$' | \
sort -u` >depend.tmp
# If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
# for xm.h and tm.h. This allows the same "depend" file to be used
@echo "You must configure gdb. Look at the README file for details."
@false
+# This checks the configure.in file versus the config/ directory.
+config-check: config-check-hosts config-check-targets
+config-check-hosts:
+ grep gdb_host= ${srcdir}/configure.in | \
+ sed -e 's/.*gdb_host=//' -e 's/ ;;$$/.mh/' | sort -u >HOSTconf.o
+ (cd ${srcdir}/config; ls *.mh) >HOSTdir.o
+ diff -u HOSTconf.o HOSTdir.o
+
+config-check-targets:
+ grep gdb_target= ${srcdir}/configure.in | \
+ sed -e 's/.*gdb_target=//' -e 's/ ;;$$/.mh/' | sort -u >TARGconf.o
+ (cd ${srcdir}/config; ls *.mt) >TARGdir.o
+ diff -u HOSTconf.o HOSTdir.o
+
# These are not generated by "make depend" because they only are there
# for some machines.
# But these rules don't do what we want; we want to hack the foo.o: tm.h
rm -f init.c version.c
rm -f gdb core gdb.tar gdb.tar.Z make.log
rm -f gdb[0-9]
- @$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
+ @$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
rm -f tm.h xm.h config.status
rm -f y.output yacc.acts yacc.tmp
rm -f ${TESTS} Makefile depend
- @$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)"
+ @$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
realclean: clean
rm -f c-exp.tab.c m2-exp.tab.c TAGS
rm -f tm.h xm.h config.status
rm -f Makefile depend
- @$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
+ @$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
@for i in $(DODIRS); do \
if [ -d ./$$i ] ; then \
if (cd ./$$i; \
- $(MAKE) \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "BISON=$(BISON)" $(DO)) ; then true ; \
+ $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
else exit 1 ; fi ; \
else true ; fi ; \
done
# Documentation!
# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
refcard.dvi: $(srcdir)/doc/refcard.tex
- ( cd ./doc; $(MAKE) refcard.dvi )
+ ( cd ./doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) )
mv ./doc/refcard.dvi .
# GDB QUICK REFERENCE (PostScript output, common PS fonts)
refcard.ps: $(srcdir)/doc/refcard.tex
- ( cd ./doc; $(MAKE) refcard.ps )
+ ( cd ./doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) )
mv ./doc/refcard.ps .
# GDB MANUAL: TeX dvi file
gdb.dvi: ./doc/gdb-all.texi
- ( cd ./doc; $(MAKE) M4=$(M4) gdb.dvi )
+ ( cd ./doc; $(MAKE) M4=$(M4) gdb.dvi $(FLAGS_TO_PASS) )
mv ./doc/gdb.dvi .
# GDB MANUAL: info file
gdb.info: ./doc/gdb-all.texi
- ( cd ./doc; $(MAKE) M4=$(M4) gdb.info )
+ ( cd ./doc; $(MAKE) M4=$(M4) gdb.info $(FLAGS_TO_PASS) )
mv ./doc/gdb.info* .
./doc/gdb-all.texi:
- (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
+ (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi $(FLAGS_TO_PASS) )
# Make copying.c from COPYING
copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
< y.tab.c > m2-exp.tab.c
-rm y.tab.c
+
+main.o: ${srcdir}/main.c
+ ${CC} -c ${INTERNAL_CFLAGS} -I${READLINE_DIR} $<
+
# The symbol-file readers have dependencies on BFD header files.
dbxread.o: ${srcdir}/dbxread.c
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
dwarfread.o: ${srcdir}/dwarfread.c
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dwarfread.c
+stabsread.o: ${srcdir}/stabsread.c
+ ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/stabsread.c
+
xcoffread.o: ${srcdir}/xcoffread.c
${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
force_update:
-# Generate the demangler linked in with gdb. Also create a standalone
-# demangler if so desired ("make demangle").
-
-${DEMANGLER}.o: ${DEMANGLER}.c
- ${CC} -c ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \
- `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'`
-
-demangle: ${DEMANGLER}.c
- ${CC} -o $@ -DMAIN ${INTERNAL_CFLAGS} ${DEMANGLE_OPTS} \
- `echo ${srcdir}/${DEMANGLER}.c | sed 's,^\./,,'`
-
# GNU Make has an annoying habit of putting *all* the Makefile variables
# into the environment, unless you include this target as a circumvention.
# Rumor is that this will be fixed (and this target can be removed)