* am29k-tdep.c (initialize_29k): Fix call_scratch_address doc.
[deliverable/binutils-gdb.git] / gdb / Makefile.in
index 89c8155ea40d6122e65af0cc567370be3eb2f458..971aae242d920464471b5a0a41b54c0265c1e523 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+#Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
 
 prefix = /usr/local
 
-program_prefix =
+program_transform_name =
 exec_prefix = $(prefix)
 bindir = $(exec_prefix)/bin
 libdir = $(exec_prefix)/lib
+tooldir = $(libdir)/$(target_alias)
 
 datadir = $(prefix)/lib
 mandir = $(prefix)/man
@@ -74,19 +75,13 @@ srcdir = .
 # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which 
 # is where it should be according to Posix).
 
-BISON=bison -y
-BISONFLAGS=
-YACC=$(BISON) $(BISONFLAGS)
-# YACC=yacc
-MAKE=make
-
-# Documentation (gdb.dvi) needs either GNU m4 or SysV m4; 
-# Berkeley/Sun don't have quite enough. 
-#M4=/usr/5bin/m4
-M4=gm4
+# If you use bison instead of yacc, it needs to include the "-y" argument.
+#BISON="bison -y"
+BISON=yacc
+YACC=$(BISON)
 
 # where to find texinfo; GDB dist should include a recent one
-TEXIDIR=${srcdir}/../texinfo/fsf
+TEXIDIR=${srcdir}/../texinfo
 
 # where to find makeinfo, preferably one designed for texinfo-2
 MAKEINFO=makeinfo
@@ -129,65 +124,87 @@ RL_LIB = ./../readline${subdir}/libreadline.a
 # 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) -I${srcdir}/vx-share
+INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR)
 
-# {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
-# CFLAGS for GDB
-MINUS_G=-g
-GLOBAL_CFLAGS = ${MINUS_G} ${TM_CFLAGS} ${XM_CFLAGS}
+# M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
+# from the config/ directory.
+GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
 #PROFILE_CFLAGS = -pg
 
-# CFLAGS is the aggregate of several individual *_CFLAGS macros.
-# USER_CFLAGS is specifically reserved for setting from the command line
+# CFLAGS is specifically reserved for setting from the command line
 # when running make.  I.E.  "make USER_CFLAGS=-Wmissing-prototypes".
-CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
+CFLAGS = -g
+# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
+INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
 # None of the things in CFLAGS will do any harm, and on some systems
-#  (e.g. SunOS4) it is important to use the M_CFLAGS.
+#  (e.g. SunOS4) it is important to use the MH_CFLAGS.
 LDFLAGS = $(CFLAGS)
 
 # Where is the "-liberty" library, containing getopt and obstack?
 LIBIBERTY_DIR = ${srcdir}/../libiberty
 LIBIBERTY = ./../libiberty${subdir}/libiberty.a
 
+# Where is the "-lopcodes" library, with (some of) the opcode tables and
+# disassemblers?
+OPCODES = ./../opcodes${subdir}/libopcodes.a
+
 # The config/mh-* file must define REGEX and REGEX1 on USG machines.
 # If your sysyem is missing alloca(), or, more likely, it's there but
 # it doesn't work, define ALLOCA & ALLOCA1 too.
-# If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
 
 # Libraries and corresponding dependencies for compiling gdb.
 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
 # TERMCAP comes after readline, since readline depends on it.
-CLIBS = ${BFD_LIB}  ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \
-       ${XM_CLIBS} ${TM_CLIBS}
-CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \
-       ${RL_LIB} ${MMALLOC_LIB}
+CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
+       ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS}
+CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} \
+       ${BFD_LIB} ${RL_LIB}            ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY}
 
-ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
-ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
+ADD_FILES = ${REGEX} ${ALLOCA}  ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
+ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
 
-VERSION = 4.4.86
+VERSION = 4.8.1
 DIST=gdb
 
 LINT=/usr/5bin/lint
 LINTFLAGS= -I${BFD_DIR}
 
+DGFLAGS=
+
 # Host and target-dependent makefile fragments come in here.
 ####
 # End of host and target-dependent makefile fragments
 
+FLAGS_TO_PASS = \
+       "prefix=$(prefix)" \
+       "exec_prefix=$(exec_prefix)" \
+       "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 \
-        signame.c cplus-dem.c mem-break.c target.c inftarg.c \
-        dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \
+        mem-break.c target.c \
+        dbxread.c coffread.c elfread.c dwarfread.c stabsread.c \
         ieee-float.c language.c parse.c buildsym.c objfiles.c \
-        minsyms.c mipsread.c
+        minsyms.c mipsread.c maint.c ch-exp.y c-lang.c ch-lang.c m2-lang.c \
+        complaints.c typeprint.c c-typeprint.c ch-typeprint.c m2-typeprint.c \
+        c-valprint.c cp-valprint.c ch-valprint.c m2-valprint.c
 
 # Source files in subdirectories (which will be handled separately by
 #  'make gdb.tar.Z').
@@ -196,29 +213,40 @@ SFILES_MAINDIR = \
 SFILES_SUBDIR = \
         ${srcdir}/vx-share/dbgRpcLib.h \
         ${srcdir}/vx-share/ptrace.h \
-        ${srcdir}/vx-share/reg.h \
         ${srcdir}/vx-share/vxTypes.h \
         ${srcdir}/vx-share/vxWorks.h \
         ${srcdir}/vx-share/wait.h \
         ${srcdir}/vx-share/xdr_ld.h \
         ${srcdir}/vx-share/xdr_ptrace.h \
         ${srcdir}/vx-share/xdr_rdb.h \
-        ${srcdir}/vx-share/xdr_regs.h \
         ${srcdir}/nindy-share/b.out.h \
         ${srcdir}/nindy-share/block_io.h \
         ${srcdir}/nindy-share/coff.h \
         ${srcdir}/nindy-share/demux.h \
         ${srcdir}/nindy-share/env.h \
         ${srcdir}/nindy-share/stop.h \
-        ${srcdir}/nindy-share/ttycntl.h
+        ${srcdir}/nindy-share/ttycntl.h \
+        ${srcdir}/29k-share/udi_soc
+
+# Source files in sub-subdirectories.  We need to know this because we
+# make relative symlinks with them.
+SFILES_SUBSUBDIR = \
+        ${srcdir}/29k-share/udi/udiphcfg.h \
+        ${srcdir}/29k-share/udi/udiphsun.h \
+        ${srcdir}/29k-share/udi/udiproc.h \
+        ${srcdir}/29k-share/udi/udipt29k.h \
+        ${srcdir}/29k-share/udi/udiptcfg.h \
+        ${srcdir}/29k-share/udi/udisoc.h
 
 # Non-source files in subdirs, that should go into gdb.tar.Z.
 NONSRC_SUBDIR = \
         ${srcdir}/nindy-share/Makefile \
-        ${srcdir}/nindy-share/VERSION
+        ${srcdir}/nindy-share/VERSION \
+        ${srcdir}/nindy-share/README \
+        ${srcdir}/vx-share/README
 
 # All source files that go into linking GDB, except config-specified files.
-SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
+SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR) $(SFILES_SUBSUBDIR)
 
 # All source files that lint should look at
 LINTFILES = $(SFILES) $(YYFILES) init.c
@@ -229,14 +257,20 @@ SFILES_STAND = $(SFILES) standalone.c
 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 environ.h \
-       expression.h frame.h gdbcmd.h gdbcore.h gdbtypes.h \
-       ieee-float.h inferior.h minimon.h objfiles.h partial-stab.h \
-       signals.h signame.h symfile.h symtab.h solib.h \
-       target.h terminal.h tm-68k.h tm-i960.h tm-sunos.h tm-sysv4.h \
-       xm-m68k.h xm-sysv4.h language.h parser-defs.h value.h
-
-REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
+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 language.h \
+       minimon.h objfiles.h parser-defs.h partial-stab.h \
+       serial.h signals.h solib.h symfile.h symtab.h stabsread.h \
+       target.h terminal.h typeprint.h xcoffsolib.h value.h \
+       tm-68k.h tm-hppa.h tm-i960.h tm-sparc.h tm-sunos.h tm-sysv4.h \
+       xm-m68k.h xm-sparc.h xm-sysv4.h xm-vax.h \
+       nm-trash.h \
+       c-lang.h ch-lang.h m2-lang.h complaints.h \
+       ns32k-opcode.h \
+       valprint.h
+
+REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar
 
 POSSLIBS_MAINDIR = regex.c regex.h alloca.c
 POSSLIBS = $(POSSLIBS_MAINDIR)
@@ -245,20 +279,20 @@ TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
 
 OTHERS = Makefile.in depend alldeps.mak createtags munch configure.in \
         ChangeLog ChangeLog-9091 ChangeLog-3.x gdb.1 refcard.ps \
-        README TODO TAGS WHATS.NEW Projects \
+        README TODO TAGS NEWS Projects \
         .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:
-TARDIRS = doc # tests
+TARDIRS = doc sparclite # tests
 
 # GDB "info" files, which should be included in their entirety
 INFOFILES = gdb.info*
 
-DEPFILES= ${TDEPFILES} ${XDEPFILES}
+DEPFILES= ${TDEPFILES} ${XDEPFILES} ${NATDEPFILES}
 
 SOURCES=$(SFILES) $(ALLDEPFILES) $(YYFILES)
 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} 
@@ -266,18 +300,21 @@ TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
              ${HFILES} ${ALLPARAM} ${POSSLIBS_MAINDIR} 
 TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
 
-OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
+OBS = version.o main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
     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) signame.o cplus-dem.o 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
+    command.o utils.o expprint.o environ.o gdbtypes.o \
+    copying.o $(DEPFILES) mem-break.o target.o \
+    ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
+    buildsym.o objfiles.o minsyms.o maint.o demangle.o \
+    dbxread.o coffread.o elfread.o dwarfread.o mipsread.o \
+    stabsread.o core.o c-lang.o ch-lang.o m2-lang.o complaints.o \
+    typeprint.o c-typeprint.o ch-typeprint.o m2-typeprint.o \
+    c-valprint.o cp-valprint.o ch-valprint.o m2-valprint.o
 
 RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
 
-TSOBS = core.o inflow.o
+TSOBS = inflow.o
 
 NTSOBS = standalone.o
 
@@ -288,23 +325,25 @@ NTSSTART = kdb-start.o
 SUBDIRS = doc
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
-YYFILES = c-exp.tab.c m2-exp.tab.c
-YYOBJ = c-exp.tab.o m2-exp.tab.o
+YYFILES = c-exp.tab.c m2-exp.tab.c ch-exp.tab.c
+YYOBJ = c-exp.tab.o m2-exp.tab.o ch-exp.tab.o
 
 # Prevent Sun make from putting in the machine type.  Setting
 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
 .c.o:
-       ${CC} -c ${CFLAGS} $<
+       ${CC} -c ${INTERNAL_CFLAGS} $<
 
 all: gdb
-       $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
+       $(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=$(SUBDIRS)" subdir_do
 check:
+       ../dejagnu/runtest -to gdb $(DGFLAGS)
+
 info: force
-       $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" "MAKEINFO=$(MAKEINFO)"
+       $(MAKE) $(FLAGS_TO_PASS) DO=info "DODIRS=$(SUBDIRS)" subdir_do
 install-info: force
-       $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
+       $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
 clean-info: force
-       $(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
+       $(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
 
 gdb.z:gdb.1
        nroff -man $(srcdir)/gdb.1 | col -b > gdb.t 
@@ -312,25 +351,34 @@ gdb.z:gdb.1
        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) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
 
 init.c: $(srcdir)/munch $(OBS) $(TSOBS)
        $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
 
 gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
-       ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
-         $(CLIBS) $(LOADLIBES)
+       ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdb \
+         init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
 
 saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
        #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
        #load ./init.c $(SFILES)
-       #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/vx-share/*.h
+       #unload ${srcdir}/c-exp.y ${srcdir}/m2-exp.y ${srcdir}/ch-exp.y
+       #unload ${srcdir}/vx-share/*.h
        #unload ${srcdir}/nindy-share/[A-Z]*
-       #load c-exp.tab.c m2-exp.tab.c
+       #load c-exp.tab.c m2-exp.tab.c ch-exp.tab.c
        #load copying.c version.c
+       #load ../opcodes/libopcodes.a
        #load ../libiberty/libiberty.a
        #load ../bfd/libbfd.a
        #load ../readline/libreadline.a
@@ -360,19 +408,20 @@ rapp: $(RAPP_OBS)
 # Support for building Makefile out of configured pieces, automatically
 # generated dependencies, etc.  alldeps.mak is a file that contains
 # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
-# ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
-# contents of the config subdirectory.
+# ALLDEPFILES_SUBDIR, ALLDEPFILES_SUBSUBDIR, ALLPARAM, and ALLCONFIG,
+# all cadged from the current contents of the config subdirectory.
 
 alldeps.mak: ${srcdir}/config
        rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
        for i in `ls -d ${srcdir}/config/*.m[ht]` ; do \
          echo $$i >>allconfig.tmp; \
          awk <$$i ' \
-           $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
+           $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" \
+               || $$1 == "NATDEPFILES=" { \
              for (i = 2; i <= NF; i++) \
                print $$i >> "alldeps.tmp" ; \
             } \
-           $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
+           $$1 == "TM_FILE=" || $$1 == "XM_FILE=" || $$1 == "NAT_FILE=" { \
              print $$2 >> "allparam.tmp" }' ; \
        done
        sort <alldeps.tmp | uniq | \
@@ -384,23 +433,29 @@ alldeps.mak: ${srcdir}/config
              -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
              -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
              -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
-             -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
+             -e 's!udr.o!29k-share/udi/udr.c!' \
+             -e 's!udip2soc.o!29k-share/udi/udip2soc.c!' \
              -e 's/\.o/.c/' \
            >alldeps2.tmp
        echo '# Start of "alldeps.mak" definitions' \
            >>alldeps.mak;
-       echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
+       echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR) $$(ALLDEP_FILES_SUBSUBDIR)' \
            >>alldeps.mak;
        grep -v / alldeps2.tmp | \
          awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
            NR == 0 {printf $$0;} \
            NR != 0 {printf "\\\n" $$0} \
            END {printf "\n\n"}' >>alldeps.mak;
-       grep / alldeps2.tmp | \
+       grep / alldeps2.tmp | grep -v '/.*/' | \
          awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
            NR == 0 {printf $$0;} \
            NR != 0 {printf "\\\n" $$0} \
            END {printf "\n\n"}' >>alldeps.mak;
+       grep '/.*/' alldeps2.tmp | \
+         awk 'BEGIN {printf "ALLDEPFILES_SUBSUBDIR="} \
+           NR == 0 {printf $$0;} \
+           NR != 0 {printf "\\\n" $$0} \
+           END {printf "\n\n"}' >>alldeps.mak;
        sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
            NR == 0 {printf $$0;} \
            NR != 0 {printf "\\\n" $$0} \
@@ -419,22 +474,25 @@ alldeps.mak: ${srcdir}/config
 depend: $(SOURCES) Makefile.in
        @echo Ignore errors about non-existent system-supplied include files
        @echo for systems other than the one you are using.
-       @echo "If xm.h and tm.h don't exist, the error messages saying so"
-       @echo can safely be ignored.
        @echo Also ignore parse errors in valops.c, and any errors in
        @echo arm-convert.s.
-       -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
-         `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
+       touch xm.h tm.h nm.h
+       -$(GCC) -MM -nostdinc -I/usr/include $(CFLAGS) -I$(BFD_DIR) \
+         -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
+# for xm.h, tm.h and nm.h.  This allows the same "depend" file to be used
 # by the various subdirectories.
        if [ "${srcdir}" = "." ] ; then \
          <depend.tmp sed \
            -e 's; ./xm.h; xm.h;g'  \
            -e 's; ./tm.h; tm.h;g'  \
+           -e 's; ./nm.h; nm.h;g'  \
            -e 's; \./; $${srcdir}/;g'  \
            -e 's; vx-share/; $${srcdir}/vx-share/;g'  \
            -e 's; nindy-share/; $${srcdir}/nindy-share/;g'  \
+           -e 's; 29k-share/; $${srcdir}/29k-share/;g'  \
            >depend.tm2; \
          rm depend.tmp; \
          mv depend.tm2 depend.tmp; \
@@ -446,6 +504,7 @@ depend: $(SOURCES) Makefile.in
          -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g'  \
          -e 's; ./xm.h; xm.h config.status;g'  \
          -e 's; ./tm.h; tm.h config.status;g'  \
+         -e 's; ./nm.h; nm.h config.status;g'  \
          >depend
        rm depend.tmp
 
@@ -453,6 +512,20 @@ config.status:
        @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
@@ -464,6 +537,8 @@ xm-i386-sv32.h: xm-i386.h
 tm-i386gas.h: tm-i386.h
 xm-sun4os4.h: xm-sparc.h
 tm-sun4os4.h: tm-sparc.h
+xm-vaxult.h: xm-vax.h
+xm-vaxbsd.h: xm-vax.h
 
 kdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
        rm -f init.c
@@ -475,7 +550,8 @@ kdb: $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
 # Put the proper machine-specific files first.
 # createtags will edit the .o in DEPFILES into .c
 TAGS: ${TAGFILES}
-       $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
+       $(srcdir)/createtags $(TM_FILE) ${XM_FILE} ${NAT_FILE} \
+                            $(DEPFILES) ${TAGFILES}
 tags: TAGS
 
 # Making distributions of GDB and friends.
@@ -491,17 +567,25 @@ gdb.tar.Z: force_update
        $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
        $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
 
-# Set up the GDB directory for distribution, by building all files that
-# are products of other files.
-setup-to-dist: force_update
-       ../configure none
+# Update the "alldeps.mak" file in a source directory.
+update-alldeps: force_update
+       ../configure none -norecursion
        rm -f alldeps.mak
        $(MAKE) $(MFLAGS) alldeps.mak
-       ../configure none
+
+# Update the "depend" and "alldeps.mak" files in a source directory.
+# We update alldeps.mak first, since it is used to generate the list
+# of files to be checked for dependencies.
+update-depend: update-alldeps force_update
+       ../configure none -norecursion
        rm -f depend
        $(MAKE) $(MFLAGS) depend
+
+# Set up the GDB source directory for distribution, by building all files that
+# are products of other files.
+setup-to-dist: update-depend force_update
        ../configure none
-       (cd doc; $(MAKE) $(MFLAGS) gdbVN.m4)
+       (cd doc; $(MAKE) $(MFLAGS) GDBvn.texi)
        $(MAKE) $(MFLAGS) gdb.info
        $(MAKE) $(MFLAGS) refcard.ps
 
@@ -525,90 +609,51 @@ make-proto-gdb-1: ${TARFILES} ${TARDIRS} gdb.info
        cd proto-gdb.dir ; for i in ${TARDIRS}; do \
          (mkdir $$i; cd $$i; \
          ln -s ../../$$i/* .; \
-         rm -rf SCCS CVS.adm RCS config.status); done
+         rm -rf SCCS CVS.adm RCS config.status; \
+         if test -f Makefile.in; then rm Makefile; else true; fi;); done
        mkdir proto-gdb.dir/config
        cd proto-gdb.dir/config ; \
          for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
        mkdir proto-gdb.dir/vx-share proto-gdb.dir/nindy-share
+       mkdir proto-gdb.dir/29k-share proto-gdb.dir/29k-share/udi
        cd proto-gdb.dir/config ; \
          for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
            do ln -s ../../$$i ../$$i ; done
+       cd proto-gdb.dir/config ; \
+         for i in $(SFILES_SUBSUBDIR) $(ALLDEPFILES_SUBSUBDIR); \
+           do ln -s ../../../$$i ../$$i ; done
        chmod og=u `find . -print`
 
 clean:
-       rm -f *.o ${ADD_FILES}
+       rm -f *.o ${ADD_FILES} *~
        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) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do 
 
-distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
+distclean: clean c-exp.tab.c m2-exp.tab.c ch-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) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do 
 
 realclean: clean
-       rm -f c-exp.tab.c m2-exp.tab.c TAGS
+       rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
        rm -f tm.h xm.h config.status
        rm -f Makefile depend
-       $(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
+       @$(MAKE) $(FLAGS_TO_PASS) DO=realclean "DODIRS=$(SUBDIRS)" subdir_do
 
 STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
 
 subdir_do: force
-       for i in $(DODIRS); do \
+       @for i in $(DODIRS); do \
                if [ -d ./$$i ] ; then \
                        if (cd ./$$i; \
-                               $(MAKE) \
-                                       "against=$(against)" \
-                                       "AR=$(AR)" \
-                                       "AR_FLAGS=$(AR_FLAGS)" \
-                                       "CC=$(CC)" \
-                                       "RANLIB=$(RANLIB)" \
-                                       "MAKEINFO=$(MAKEINFO)" \
-                                       "BISON=$(BISON)" $(DO)) ; then true ; \
+                               $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
                        else exit 1 ; fi ; \
                else true ; fi ; \
        done
 
-# Copy the object files from a particular stage into a subdirectory.
-stage1: force
-       -mkdir stage1
-       -mv -f $(STAGESTUFF) stage1
-       $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
-
-stage2: force
-       -mkdir stage2
-       -mv -f $(STAGESTUFF) stage2
-       $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
-
-stage3: force
-       -mkdir stage3
-       -mv -f $(STAGESTUFF) stage3
-       $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
-
-against=stage2
-
-comparison: force
-       for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
-       $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)"
-
-de-stage1: force
-       -(cd stage1 ; mv -f * ..)
-       -rmdir stage1
-       $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
-
-de-stage2: force
-       -(cd stage2 ; mv -f * ..)
-       -rmdir stage2
-       $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
-
-de-stage3: force
-       -(cd stage3 ; mv -f * ..)
-       -rmdir stage3
-       $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
-
 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
        $(SHELL) ./config.status
 
@@ -616,97 +661,149 @@ force:
 
 # Documentation!
 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
-refcard.dvi: $(srcdir)/doc/refcard.tex
-       ( cd ./doc; $(MAKE) refcard.dvi )
+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 )
+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 )
+gdb.dvi:
+       ( cd ./doc; $(MAKE) 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 )
+gdb.info:
+       ( cd ./doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) )
        mv ./doc/gdb.info* .
 
-./doc/gdb-all.texi:
-       (cd $(srcdir)/doc; $(MAKE) M4=$(M4) gdb-all.texi)
-
 # Make copying.c from COPYING
 copying.c: ${srcdir}/COPYING ${srcdir}/copying.awk
        awk -f ${srcdir}/copying.awk < ${srcdir}/COPYING > copying.c
 
-version.c: Makefile.in
+version.c: Makefile
        echo 'char *version = "$(VERSION)";' >version.c
 
 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to c-exp.tab.o.
+# ././c-exp.tab.c is so the command argument will never match $(srcdir)/c-exp.y
+# (some "makes" rewrite the VPATH into command arguments if they match deps).
+# Remove bogus decls for malloc/realloc/free which conflict with everything
+# else.
 c-exp.tab.o: c-exp.tab.c
-c-exp.tab.c: $(srcdir)/c-exp.y
+c-exp.tab.c: $(srcdir)/c-exp.y $(srcdir)/Makefile.in
        @echo 'Expect 4 shift/reduce conflicts.'
        ${YACC} $(srcdir)/c-exp.y
-       -mv y.tab.c c-exp.tab.c
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+         < y.tab.c > ././c-exp.tab.c
+       -rm y.tab.c
+
+# start-sanitize-chill
+# ch-exp.tab.c is generated in target dir from ch-exp.y if it doesn't exist
+# in srcdir, then compiled in target dir to ch-exp.tab.o.
+# Remove bogus decls for malloc/realloc/free which conflict with everything
+# else.
+ch-exp.tab.o: ch-exp.tab.c
+ch-exp.tab.c: $(srcdir)/ch-exp.y $(srcdir)/Makefile.in
+       @echo 'Expect rules never reduced and {shift,reduce}/reduce conflicts.'
+       ${YACC} $(srcdir)/ch-exp.y
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+         < y.tab.c > ././ch-exp.tab.c
+       -rm y.tab.c
+# end-sanitize-chill
 
 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to m2-exp.tab.o.
+# Remove bogus decls for malloc/realloc/free which conflict with everything
+# else.
 m2-exp.tab.o: m2-exp.tab.c
-m2-exp.tab.c: $(srcdir)/m2-exp.y
+m2-exp.tab.c: $(srcdir)/m2-exp.y $(srcdir)/Makefile.in
        ${YACC} $(srcdir)/m2-exp.y
-       -mv y.tab.c m2-exp.tab.c
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+         < 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 ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
 
 coffread.o: ${srcdir}/coffread.c
-       ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
 
 mipsread.o: ${srcdir}/mipsread.c
-       ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
 
 elfread.o: ${srcdir}/elfread.c
-       ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/elfread.c
 
 dwarfread.o: ${srcdir}/dwarfread.c
-       ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${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
 
+# Used on RS/6000 native
 xcoffread.o: ${srcdir}/xcoffread.c
-       ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffread.c
 
 xcoffexec.o: ${srcdir}/xcoffexec.c
-       ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/xcoffexec.c
+
+# Used on HP-PA native
+paread.o: ${srcdir}/paread.c
+       ${CC} -c ${INTERNAL_CFLAGS} -I$(BFD_DIR) ${srcdir}/paread.c
 
 # Drag in the files that are in another directory.
 
 xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
-       ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ld.c
 
 xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
-       ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
 
 xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
-       ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
-
-xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
-       ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
 
 nindy.o: ${srcdir}/nindy-share/nindy.c
-       ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
+       ${CC} -c ${INTERNAL_CFLAGS} -DSTRIP='"$(tooldir)/bin/strip"' \
+               ${srcdir}/nindy-share/nindy.c
 
 Onindy.o: ${srcdir}/nindy-share/Onindy.c
-       ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/Onindy.c
 
 ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
-       ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttybreak.c
 
 ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
-       ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c
+
+udr.o: ${srcdir}/29k-share/udi/udr.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/29k-share/udi/udr.c
+
+udip2soc.o: ${srcdir}/29k-share/udi/udip2soc.c
+       ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/29k-share/udi/udip2soc.c
 
 lint: $(LINTFILES)
        $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
@@ -717,14 +814,6 @@ gdb.cxref: $(SFILES)
 
 force_update:
 
-# When used with GDB, the demangler should never look for leading
-# underscores because GDB strips them off during symbol read-in.  Thus
-# -Dnounderscore.  
-
-cplus-dem.o: cplus-dem.c
-       ${CC} -c ${CFLAGS} -Dnounderscore \
-         `echo ${srcdir}/cplus-dem.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)
This page took 0.033416 seconds and 4 git commands to generate.