From: John Gilmore Date: Sun, 19 May 1991 14:57:22 +0000 (+0000) Subject: * Makefile.dist: Fix Rich damage; undo "configure" changes in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e73dbe5d3bb430a168a48e977dec2ab757c4536c;p=binutils-gdb.git * Makefile.dist: Fix Rich damage; undo "configure" changes in favor of keeping the (working) config.gdb. Move readline library up a notch. --- diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist index 7e47d75a79b..3c437a9178b 100755 --- a/gdb/Makefile.dist +++ b/gdb/Makefile.dist @@ -16,13 +16,10 @@ # along with GDB; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -#### host and target dependent Makefile fragments come in here. -## - -srcdir = . +# Destination directory of the software tree build destdir = /usr/local -# Place to install binaries. +# Place to install binaries in the destination tree. bindir=$(destdir)/bin # System V: If you compile gdb with a compiler which uses the coff @@ -74,11 +71,13 @@ INCLUDE_DEP = $$(INCLUDE_DIR) # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.) BFD_DIR = ${srcdir}/../bfd BFD_DEP = $$(BFD_DIR) +BFD_LIB = $(BFD_DIR)${subdir}/libbfd.a -# the parent of the directory in which live the readline headers. -READLINE_DIR = ${srcdir}/.. -RL_LIB = $(READLINE_DIR)/readline${subdir}/libreadline.a -RL_LIB_DEP = $(RL_LIB) +# Where is the source dir for the READLINE library? Traditionally in .. or . +# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.) +READLINE_DIR = ${srcdir}/../readline +READLINE_DEP = $$(READLINE_DIR) +RL_LIB = $(READLINE_DIR)${subdir}/libreadline.a # All the includes used for CFLAGS and for lint. # -I. for config files. @@ -103,17 +102,15 @@ LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a # You may need to make other arrangements for USG. TERMCAP = -ltermcap -# You must define REGEX and REGEX1 on USG machines. +# The xconfig 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 +# it doesn't work, define ALLOCA & ALLOCA1 too. -# {X,T}M_CLIBS, if defined, has system-dependent libs -# For example, -lPW for System V to get alloca(). -# FIXME STOPGAP FOR BFD LIBRARY: BFD stuff -CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}${subdir}/libbfd.a \ - ${LIBIBERTY} ${READLINE} -CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}${subdir}/libbfd.a \ - ${LIBIBERTY} ${READLINE} +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# TERMCAP comes last, since readline depends on it. +CLIBS = $(XM_CLIBS) ${TM_CLIBS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ${TERMCAP} +CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} @@ -181,11 +178,16 @@ HFILES= breakpoint.h command.h defs.h environ.h \ target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \ value.h -OPCODES = $(INCLUDE_DIR)/pn-opcode.h $(INCLUDE_DIR)/np1-opcode.h \ - $(INCLUDE_DIR)/sparc-opcode.h $(INCLUDE_DIR)/vax-opcode.h \ - $(INCLUDE_DIR)/m68k-opcode.h $(INCLUDE_DIR)/ns32k-opcode.h \ - $(INCLUDE_DIR)/convx-opcode.h $(INCLUDE_DIR)/pyr-opcode.h \ - $(INCLUDE_DIR)/mips-opcode.h $(INCLUDE_DIR)/am29k-opcode.h +# Header files for machine opcode tables. +# when OPCODE_DIR changes to ../include, remove the whole $(OPCODES) +# business, since they will be included in the separate includes tar file +# rather than in the gdb tar file. +OPCODE_DIR = +OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \ + $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \ + $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \ + $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \ + $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h REMOTE_EXAMPLES = rem-m68k.shar rem-multi.shar @@ -251,9 +253,9 @@ install: gdb init.c: $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS) $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c -gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB_DEP} ${CDEPS} init.o +gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \ - ${RL_LIB} $(CLIBS) + $(CLIBS) saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS @@ -265,6 +267,7 @@ saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'` #load ${LIBIBERTY_DIR}/*.c #load ${BFD_DIR}/*.c + #load ${READLINE_DIR}/*.c #load -ltermcap ##void mcheck(a) void (*a)(); { } ##void mtrace() { } @@ -288,22 +291,18 @@ rapp: $(RAPP_OBS) ${srcdir}/munch ${RAPP_OBS} > rapp_init.c ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS) -Makefiles= ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist - -MAKE_MAKEFILE_IN= cat ${Makefiles} ${srcdir}/depend > $(srcdir)/Makefile.in - -$(srcdir)/Makefile.in: $(Makefiles) - $(MAKE_MAKEFILE_IN) +# Support for building Makefile out of configured pieces, automatically +# generated dependencies, etc. +Makefiles= Makefile.sdir $(M_MAKEFILE) \ + ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist -# with the gnu make, this is done automatically. +MAKE_MAKEFILE= echo "M_MAKEFILE=$(M_MAKEFILE)" | \ + cat - ${Makefiles} ${srcdir}/depend > Makefile -Makefile: $(srcdir)/Makefile.in $(srcdir)/configure - (cd $(srcdir) ; \ - ./configure +destdir=$(destdir) +norecurse \ - `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \ - $(host) +target=$(target)) +Makefile: $(Makefiles) + $(MAKE_MAKEFILE) -$(srcdir)/alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig +alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \ ${srcdir}/xconfig/*[0-9A-Za-z] | grep -v RCS` ; do \ @@ -348,7 +347,6 @@ $(srcdir)/alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig NR == 0 {printf $$0;} \ NR != 0 {printf "\\\n" $$0} \ END {printf "\n\n"}' >>alldeps.mak; - if [ "$(srcdir)" != "." ] ; then mv alldeps.mak $(srcdir) ; fi rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp # The sed script makes everything which depends on {x,t}m.h depend on @@ -361,16 +359,17 @@ depend: $(SOURCES) Makefile.dist @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$(READLINE_DIR) -I$(BFD_DIR) \ - `ls $(SOURCES) | sort -u` >depend.tmp + -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \ + `ls $(SOURCES) | grep -v \.h$$ |sort -u` >depend.tmp $(srcdir)/depend - $(MAKE_MAKEFILE_IN) + >depend + $(MAKE_MAKEFILE) rm depend.tmp config.status: @@ -389,12 +388,12 @@ tm-i386gas.h: tm-i386.h xm-sun4os4.h : xm-sparc.h tm-sun4os4.h : tm-sparc.h -kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${RL_LIB_DEP} +kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS} rm -f init.c $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c $(CC) $(LDFLAGS) -c init.c $(CLIBS) ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \ - ${RL_LIB} -lc $(CLIBS) + -lc $(CLIBS) # Put the proper machine-specific files first. # createtags will edit the .o in DEPFILES into .c @@ -426,7 +425,6 @@ clean: rm -f gdb core gdb.tar gdb.tar.Z make.log rm -f gdb[0-9] rm -f gdb.dvi gdb-all* -# cd readline ; make clean distclean: clean expread.tab.c TAGS rm -f tm.h xm.h config.status diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7e47d75a79b..3c437a9178b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -16,13 +16,10 @@ # along with GDB; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -#### host and target dependent Makefile fragments come in here. -## - -srcdir = . +# Destination directory of the software tree build destdir = /usr/local -# Place to install binaries. +# Place to install binaries in the destination tree. bindir=$(destdir)/bin # System V: If you compile gdb with a compiler which uses the coff @@ -74,11 +71,13 @@ INCLUDE_DEP = $$(INCLUDE_DIR) # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.) BFD_DIR = ${srcdir}/../bfd BFD_DEP = $$(BFD_DIR) +BFD_LIB = $(BFD_DIR)${subdir}/libbfd.a -# the parent of the directory in which live the readline headers. -READLINE_DIR = ${srcdir}/.. -RL_LIB = $(READLINE_DIR)/readline${subdir}/libreadline.a -RL_LIB_DEP = $(RL_LIB) +# Where is the source dir for the READLINE library? Traditionally in .. or . +# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.) +READLINE_DIR = ${srcdir}/../readline +READLINE_DEP = $$(READLINE_DIR) +RL_LIB = $(READLINE_DIR)${subdir}/libreadline.a # All the includes used for CFLAGS and for lint. # -I. for config files. @@ -103,17 +102,15 @@ LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a # You may need to make other arrangements for USG. TERMCAP = -ltermcap -# You must define REGEX and REGEX1 on USG machines. +# The xconfig 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 +# it doesn't work, define ALLOCA & ALLOCA1 too. -# {X,T}M_CLIBS, if defined, has system-dependent libs -# For example, -lPW for System V to get alloca(). -# FIXME STOPGAP FOR BFD LIBRARY: BFD stuff -CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}${subdir}/libbfd.a \ - ${LIBIBERTY} ${READLINE} -CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}${subdir}/libbfd.a \ - ${LIBIBERTY} ${READLINE} +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# TERMCAP comes last, since readline depends on it. +CLIBS = $(XM_CLIBS) ${TM_CLIBS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ${TERMCAP} +CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} @@ -181,11 +178,16 @@ HFILES= breakpoint.h command.h defs.h environ.h \ target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \ value.h -OPCODES = $(INCLUDE_DIR)/pn-opcode.h $(INCLUDE_DIR)/np1-opcode.h \ - $(INCLUDE_DIR)/sparc-opcode.h $(INCLUDE_DIR)/vax-opcode.h \ - $(INCLUDE_DIR)/m68k-opcode.h $(INCLUDE_DIR)/ns32k-opcode.h \ - $(INCLUDE_DIR)/convx-opcode.h $(INCLUDE_DIR)/pyr-opcode.h \ - $(INCLUDE_DIR)/mips-opcode.h $(INCLUDE_DIR)/am29k-opcode.h +# Header files for machine opcode tables. +# when OPCODE_DIR changes to ../include, remove the whole $(OPCODES) +# business, since they will be included in the separate includes tar file +# rather than in the gdb tar file. +OPCODE_DIR = +OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \ + $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \ + $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \ + $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \ + $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h REMOTE_EXAMPLES = rem-m68k.shar rem-multi.shar @@ -251,9 +253,9 @@ install: gdb init.c: $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS) $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c -gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB_DEP} ${CDEPS} init.o +gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \ - ${RL_LIB} $(CLIBS) + $(CLIBS) saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS @@ -265,6 +267,7 @@ saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'` #load ${LIBIBERTY_DIR}/*.c #load ${BFD_DIR}/*.c + #load ${READLINE_DIR}/*.c #load -ltermcap ##void mcheck(a) void (*a)(); { } ##void mtrace() { } @@ -288,22 +291,18 @@ rapp: $(RAPP_OBS) ${srcdir}/munch ${RAPP_OBS} > rapp_init.c ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS) -Makefiles= ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist - -MAKE_MAKEFILE_IN= cat ${Makefiles} ${srcdir}/depend > $(srcdir)/Makefile.in - -$(srcdir)/Makefile.in: $(Makefiles) - $(MAKE_MAKEFILE_IN) +# Support for building Makefile out of configured pieces, automatically +# generated dependencies, etc. +Makefiles= Makefile.sdir $(M_MAKEFILE) \ + ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist -# with the gnu make, this is done automatically. +MAKE_MAKEFILE= echo "M_MAKEFILE=$(M_MAKEFILE)" | \ + cat - ${Makefiles} ${srcdir}/depend > Makefile -Makefile: $(srcdir)/Makefile.in $(srcdir)/configure - (cd $(srcdir) ; \ - ./configure +destdir=$(destdir) +norecurse \ - `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \ - $(host) +target=$(target)) +Makefile: $(Makefiles) + $(MAKE_MAKEFILE) -$(srcdir)/alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig +alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \ ${srcdir}/xconfig/*[0-9A-Za-z] | grep -v RCS` ; do \ @@ -348,7 +347,6 @@ $(srcdir)/alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig NR == 0 {printf $$0;} \ NR != 0 {printf "\\\n" $$0} \ END {printf "\n\n"}' >>alldeps.mak; - if [ "$(srcdir)" != "." ] ; then mv alldeps.mak $(srcdir) ; fi rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp # The sed script makes everything which depends on {x,t}m.h depend on @@ -361,16 +359,17 @@ depend: $(SOURCES) Makefile.dist @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$(READLINE_DIR) -I$(BFD_DIR) \ - `ls $(SOURCES) | sort -u` >depend.tmp + -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \ + `ls $(SOURCES) | grep -v \.h$$ |sort -u` >depend.tmp $(srcdir)/depend - $(MAKE_MAKEFILE_IN) + >depend + $(MAKE_MAKEFILE) rm depend.tmp config.status: @@ -389,12 +388,12 @@ tm-i386gas.h: tm-i386.h xm-sun4os4.h : xm-sparc.h tm-sun4os4.h : tm-sparc.h -kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${RL_LIB_DEP} +kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS} rm -f init.c $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c $(CC) $(LDFLAGS) -c init.c $(CLIBS) ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \ - ${RL_LIB} -lc $(CLIBS) + -lc $(CLIBS) # Put the proper machine-specific files first. # createtags will edit the .o in DEPFILES into .c @@ -426,7 +425,6 @@ clean: rm -f gdb core gdb.tar gdb.tar.Z make.log rm -f gdb[0-9] rm -f gdb.dvi gdb-all* -# cd readline ; make clean distclean: clean expread.tab.c TAGS rm -f tm.h xm.h config.status