]> Git Repo - binutils.git/blobdiff - gdb/Makefile.in
* Makefile.in (init.c): Generate using the source, not munch. This
[binutils.git] / gdb / Makefile.in
index 21094a847c5bc3908a0275da6b6d5be48f2f6b40..b4f3f5ed25987a0b808d49925e38a54f905882b6 100644 (file)
@@ -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]
@@ -730,7 +749,6 @@ version.c: Makefile
 # else.
 c-exp.tab.o: c-exp.tab.c
 c-exp.tab.c: c-exp.y Makefile.in
-       @echo 'Expect 6 shift/reduce conflicts.'
        $(YACC) $(YFLAGS) $(srcdir)/c-exp.y
        -sed -e '/extern.*malloc/d' \
             -e '/extern.*realloc/d' \
@@ -1022,11 +1040,11 @@ ch-lang.o: ch-lang.c ch-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
        language.h parser-defs.h $(symtab_h)
 
 ch-typeprint.o: ch-typeprint.c ch-lang.h $(defs_h) $(expression_h) \
-       $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
-       $(value_h)
+       $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
+       target.h $(value_h) typeprint.h
 
 ch-valprint.o: ch-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
-       language.h $(symtab_h) valprint.h $(value_h)
+       language.h $(symtab_h) valprint.h $(value_h) c-lang.h
 
 coff-solib.o: coff-solib.c $(defs_h)
 
@@ -1052,12 +1070,12 @@ core-svr4.o: core-svr4.c $(command_h) $(defs_h) $(gdbcore_h) \
        $(inferior_h) target.h
 
 core.o: core.c $(dis-asm_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
-       $(inferior_h) target.h
+       $(inferior_h) target.h language.h
 
-coredep.o: coredep.c $(defs_h) $(gdbcore_h)
+coredep.o: coredep.c $(defs_h) $(gdbcore_h) $(value_h)
 
 corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
-       target.h
+       target.h thread.h
 
 cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
        $(gdbtypes_h) $(symtab_h) $(value_h)
@@ -1082,13 +1100,13 @@ dwarfread.o: dwarfread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
 elfread.o: elfread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
        gdb-stabs.h objfiles.h symfile.h $(symtab_h)
 
-environ.o: environ.c $(defs_h) environ.h
+environ.o: environ.c $(defs_h) environ.h $(gdbcore_h)
 
 eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
        $(gdbtypes_h) language.h $(symtab_h) target.h $(value_h)
 
 exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
-       target.h
+       target.h language.h
 
 expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
        language.h parser-defs.h $(symtab_h) $(value_h)
@@ -1096,7 +1114,7 @@ expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h
 
 fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
-       $(inferior_h) target.h terminal.h
+       $(inferior_h) target.h terminal.h thread.h
 
 gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
        $(gdbtypes_h) language.h objfiles.h symfile.h $(symtab_h) target.h \
@@ -1143,18 +1161,18 @@ i960-tdep.o: i960-tdep.c $(ieee-float_h) $(defs_h) $(expression_h) \
        $(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h)
 
 infcmd.o: infcmd.c $(defs_h) environ.h $(gdbcmd_h) $(gdbcore_h) \
-       $(inferior_h) target.h
+       $(inferior_h) target.h language.h
 
 inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
-       signals.h target.h terminal.h
+       signals.h target.h terminal.h thread.h
 
 infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h
 
 infrun.o: infrun.c $(wait_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
-       $(inferior_h) target.h
+       $(inferior_h) target.h thread.h
 
 inftarg.o: inftarg.c $(wait_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
-       target.h terminal.h
+       target.h terminal.h $(command_h)
 
 irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h)
 isi-xdep.o: isi-xdep.c
@@ -1184,7 +1202,9 @@ main.o: main.c $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
        $(remote_utils_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(READLINE_CFLAGS) $(srcdir)/main.c
 
-maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) 
+maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
+       $(expression_h)
+
 mem-break.o: mem-break.c $(defs_h) 
 
 minsyms.o: minsyms.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
@@ -1415,12 +1435,15 @@ z8k-tdep.o: z8k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) $(frame_h) \
        $(gdbcmd_h) $(gdbtypes_h) $(symtab_h)
 
 c-exp.tab.o: c-exp.tab.c c-lang.h $(defs_h) $(expression_h) \
-       $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h)
+       $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
+       $(bfd_h) objfiles.h symfile.h
 
 ch-exp.tab.o: ch-exp.tab.c ch-lang.h $(defs_h) $(expression_h) \
-       $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h)
+       $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
+       $(bfd_h) objfiles.h symfile.h
 
 m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
-       language.h m2-lang.h parser-defs.h $(symtab_h) $(value_h)
+       language.h m2-lang.h parser-defs.h $(symtab_h) $(value_h) \
+       $(bfd_h) objfiles.h symfile.h
 
 ### end of the gdb Makefile.in.
This page took 0.029868 seconds and 4 git commands to generate.