aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-07-05 00:04:59 +0000
committerJohn Gilmore <gnu@cygnus>1991-07-05 00:04:59 +0000
commit6988f5c0ae12e1e978129c89d5633929ebd13c41 (patch)
treead9f6d5d0a126470312b8c633f066a07ae2f91a0 /gdb/Makefile.in
parent4708037854ee7a4f1602ae5149b3e461315ca0ca (diff)
downloadgdb-6988f5c0ae12e1e978129c89d5633929ebd13c41.zip
gdb-6988f5c0ae12e1e978129c89d5633929ebd13c41.tar.gz
gdb-6988f5c0ae12e1e978129c89d5633929ebd13c41.tar.bz2
Thu Jul 4 14:47:06 1991 John Gilmore (gnu at cygint.cygnus.com)
* configure.in, Makefile.in: Avoid rebuilding "depend" as much. Avoid declaring Makefile dependencies, because GNU Make stupidly tries to update it if we do. * coffread.c: Revise for minor changes to bfd internal coff indexes. * configure: If -template= is given a relative path, make it absolute before recurring in subdirectories.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in38
1 files changed, 26 insertions, 12 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 9e5be7b..86c0c53 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -18,6 +18,7 @@
# Host and target-dependent makefile fragments come in here.
####
+# End of host and target-dependent makefile fragments
# Destination directory of the software tree build
destdir = /usr/local
@@ -342,11 +343,11 @@ rapp: $(RAPP_OBS)
# generated dependencies, etc. Makefile.conf is built by configure,
# and includes the body of Makefile.in as well as configuration
# settings. We add alldeps.mak and depend to get Makefile.
-Makefiles= Makefile.conf ${srcdir}/alldeps.mak
+# See also "make-depend:", where we also rebuild Makefile after making depend.
+Makefiles= Makefile.conf ${srcdir}/alldeps.mak depend
-Makefile: $(Makefiles)
- cat ${Makefiles} depend > Makefile
-
+make-Makefile: $(Makefiles) depend
+ cat ${Makefiles} > ./Makefile
alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
@@ -399,7 +400,7 @@ alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
# The sed script makes everything which depends on {x,t}m.h depend on
# config.status as well, in case someone reconfigures gdb out from
# under an already compiled gdb.
-depend: $(SOURCES) Makefile.in
+make-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"
@@ -408,15 +409,28 @@ depend: $(SOURCES) Makefile.in
@echo arm-convert.s.
-$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
`ls $(SOURCES) | grep -v \.h$$ |sort -u` >depend.tmp
- <depend.tmp sed -e 's/ [xt]m.h/& config.status/g' \
- -e 's; vx-share/; $${srcdir}/vx-share/;g' \
- -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
+# 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
+# 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; \./; $${srcdir}/;g' \
+ -e 's; vx-share/; $${srcdir}/vx-share/;g' \
+ -e 's; nindy-share/; $${srcdir}/nindy-share/;g' \
+ >depend.tm2; \
+ rm depend.tmp; \
+ mv depend.tm2 depend.tmp; \
+ fi
+ <depend.tmp sed \
+ -e 's; [xt]m.h;& config.status;g' \
-e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
-e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g' \
-e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
- -e 's; \./; $${srcdir}/;g' \
+ -e 's; ./xm.h; xm.h config.status;g' \
+ -e 's; ./tm.h; tm.h config.status;g' \
>depend
- $(MAKE_MAKEFILE)
rm depend.tmp
config.status:
@@ -477,12 +491,12 @@ clean:
distclean: clean expread.tab.c TAGS
rm -f tm.h xm.h config.status
rm -f y.output yacc.acts yacc.tmp
- rm -f ${TESTS} Makefile
+ rm -f ${TESTS} Makefile Makefile.conf depend
realclean: clean
rm -f expread.tab.c TAGS
rm -f tm.h xm.h config.status
- rm -f Makefile
+ rm -f Makefile Makefile.conf depend
rdl-apps.texinfo: ${READLINE_DIR}/inc-readline.texinfo \
${READLINE_DIR}/inc-history.texinfo