aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-10-22 05:55:58 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-10-22 05:55:58 +0000
commit976bb0be038b72449683a428903658347d581eaa (patch)
tree529d1c62dbd968e77a969d1a7e8eca9cf7acef63 /gdb/Makefile.in
parent06b24c9e49dfa67288c315ec205776c29c086358 (diff)
downloadgdb-976bb0be038b72449683a428903658347d581eaa.zip
gdb-976bb0be038b72449683a428903658347d581eaa.tar.gz
gdb-976bb0be038b72449683a428903658347d581eaa.tar.bz2
* Makefile.in (init.c): Generate using the source, not munch. This
cleans up all kinds of hassles (which nm to use in munch, etc). The new formatting conventions (mostly already followed) are that the name of the _initialize_* routines must start in column zero, and must not be inside #if. * munch: Removed. * Makefile.in: Remove references to munch. * serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c, alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c, procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c, i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c, z8k-tdep.c: Make sure the above conventions are followed. Make sure they are all declared as returning void. Clean up miscellaneous comments and such.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in39
1 files changed, 29 insertions, 10 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 01e1779..b4f3f5e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -55,11 +55,6 @@ RANLIB = ranlib
# This can be overridden in the host Makefile fragment file.
TERMCAP = -ltermcap
-# System V: If you compile gdb with a compiler which uses the coff
-# encapsulation feature (this is a function of the compiler used, NOT
-# of the m-?.h file selected by config.gdb), you must make sure that
-# the GNU nm is the one that is used by munch.
-
# If you are compiling with GCC, make sure that either 1) You have the
# fixed include files where GCC can reach them, or 2) You use the
# -traditional flag. Otherwise the ioctl calls in inflow.c
@@ -314,7 +309,7 @@ SFILES = blockframe.c breakpoint.c buildsym.c c-exp.y c-lang.c \
# Files that are not source code, but need to go into
# gdb-$(VERSION).tar.Z.
-NONSRC = Makefile.in munch configure.in ChangeLog ChangeLog-9091 \
+NONSRC = Makefile.in configure.in ChangeLog ChangeLog-9091 \
ChangeLog-92 ChangeLog-3.x gdb.1 refcard.ps README TODO TAGS NEWS \
Projects .gdbinit COPYING $(YYFILES) copying.c copying.awk \
saber.suppress standalone.c stuff.c kdb-start.c gcc.patch \
@@ -483,9 +478,33 @@ uninstall: force
rm -f $(bindir)/gdb $(man1dir)/gdb.1
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
-init.c: munch $(OBS) $(TSOBS)
- $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS) > init.c-new
- mv init.c-new init.c
+# We do this by grepping through sources. If that turns out to be too slow,
+# maybe we could just require every .o file to have an initialization routine
+# of a given name (remote-udi.o -> _initialize_remote_udi, etc.).
+init.c: $(OBS) $(TSOBS)
+ @echo Making init.c
+ @rm -f init.c-tmp
+ @echo '/* Do not modify this file. */' >init.c-tmp
+ @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
+ @echo 'void initialize_all_files () {' >>init.c-tmp
+ @for i in $(OBS) $(TSOBS); do \
+ filename=`echo $$i | sed \
+ -e '/^Onindy.o/d' \
+ -e '/^nindy.o/d' \
+ -e '/ttyflush.o/d' \
+ -e '/xdr_ld.o/d' \
+ -e '/xdr_ptrace.o/d' \
+ -e '/xdr_rdb.o/d' \
+ -e '/udr.o/d' \
+ -e '/udip2soc.o/d' \
+ -e '/version.o/d' \
+ -e '/[a-z0-9A-Z_]*-exp.tab.o/d' \
+ -e 's/\.o/.c/'` ; \
+ sed <$(srcdir)/$$filename >>init.c-tmp -n \
+ -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; \
+ done
+ @echo '}' >>init.c-tmp
+ @mv init.c-tmp init.c
.PRECIOUS: init.c
@@ -654,7 +673,7 @@ make-proto-testsuite.dir: force_update
clean:
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
- rm -f *.o $(ADD_FILES) *~
+ rm -f *.o $(ADD_FILES) *~ init.c-tmp
rm -f init.c version.c
rm -f gdb core make.log
rm -f gdb[0-9]