2004-02-08 Andrew Cagney <cagney@redhat.com>
* Makefile.in (OBS): Delete. (INIT_FILES): Replace OBS with COMMON_OBS. (COMMON_OBS): Move DEPFILES and YYOBJ to start of definition. (init.c): Eliminate duplicates. Merge two greps and a sed into a single sed. Make .c and .o patterns more robust.
This commit is contained in:
parent
645d6d1047
commit
defc864cda
|
@ -1,3 +1,11 @@
|
||||||
|
2004-02-08 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in (init.c): Eliminate duplicates. Combine two greps
|
||||||
|
and a sed into a single sed. Make .c and .o patterns more robust.
|
||||||
|
(OBS): Delete.
|
||||||
|
(INIT_FILES): Replace OBS with COMMON_OBS.
|
||||||
|
(COMMON_OBS): Move DEPFILES and YYOBJ to start of definition.
|
||||||
|
|
||||||
2004-02-08 Mark Kettenis <kettenis@gnu.org>
|
2004-02-08 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* sparc-nat.c (sparc_xfer_wcookie): Try to fetch the cookie using
|
* sparc-nat.c (sparc_xfer_wcookie): Try to fetch the cookie using
|
||||||
|
|
|
@ -863,7 +863,8 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
|
||||||
$(SUBDIR_CLI_SRCS)
|
$(SUBDIR_CLI_SRCS)
|
||||||
TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
|
TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
|
||||||
|
|
||||||
COMMON_OBS = version.o \
|
COMMON_OBS = $(DEPFILES) $(YYOBJ) \
|
||||||
|
version.o \
|
||||||
annotate.o \
|
annotate.o \
|
||||||
auxv.o \
|
auxv.o \
|
||||||
bfd-target.o \
|
bfd-target.o \
|
||||||
|
@ -878,8 +879,8 @@ COMMON_OBS = version.o \
|
||||||
main.o \
|
main.o \
|
||||||
macrotab.o macrocmd.o macroexp.o macroscope.o \
|
macrotab.o macrocmd.o macroexp.o macroscope.o \
|
||||||
event-loop.o event-top.o inf-loop.o completer.o \
|
event-loop.o event-top.o inf-loop.o completer.o \
|
||||||
gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o $(DEPFILES) \
|
gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o \
|
||||||
memattr.o mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
|
memattr.o mem-break.o target.o parse.o language.o buildsym.o \
|
||||||
std-regs.o \
|
std-regs.o \
|
||||||
signals.o \
|
signals.o \
|
||||||
kod.o kod-cisco.o \
|
kod.o kod-cisco.o \
|
||||||
|
@ -908,8 +909,6 @@ COMMON_OBS = version.o \
|
||||||
reggroups.o \
|
reggroups.o \
|
||||||
trad-frame.o
|
trad-frame.o
|
||||||
|
|
||||||
OBS = $(COMMON_OBS)
|
|
||||||
|
|
||||||
TSOBS = inflow.o
|
TSOBS = inflow.o
|
||||||
|
|
||||||
SUBDIRS = @subdirs@
|
SUBDIRS = @subdirs@
|
||||||
|
@ -1002,21 +1001,21 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||||
# Note that the set of files with init functions might change, or the names
|
# Note that the set of files with init functions might change, or the names
|
||||||
# of the functions might change, so this files needs to depend on all the
|
# of the functions might change, so this files needs to depend on all the
|
||||||
# object files that will be linked into gdb.
|
# object files that will be linked into gdb.
|
||||||
#
|
|
||||||
# FIXME: There are 2 problems with this approach. First, if the INIT_FILES
|
# FIXME: There is a problem with this approach - init.c may force
|
||||||
# list includes a file twice (because of some mistake somewhere else)
|
# unnecessary files to be linked in.
|
||||||
# the _initialize_* function will be included twice in init.c. Second,
|
|
||||||
# init.c may force unnecessary files to be linked in.
|
|
||||||
|
|
||||||
# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
|
# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
|
||||||
# the first call is to _initialize_gdbtypes. This is a hack to ensure
|
# the first call is to _initialize_gdbtypes (implemented by explicitly
|
||||||
# that all the architecture dependant global builtin_type_* variables
|
# putting that function's name first in the init.l-tmp file). This is
|
||||||
# are initialized before anything else (per-architecture code is
|
# a hack to ensure that all the architecture dependant global
|
||||||
# called in the same order that it is registered). The ``correct
|
# builtin_type_* variables are initialized before anything else
|
||||||
# fix'' is to have all the builtin types made part of the architecture
|
# (per-architecture code is called in the same order that it is
|
||||||
# and initialize them on-demand (using gdbarch_data) just like
|
# registered). The ``correct fix'' is to have all the builtin types
|
||||||
# everything else. The catch is that other modules still take the
|
# made part of the architecture and initialize them on-demand (using
|
||||||
# address of these builtin types forcing them to be variables, sigh!
|
# gdbarch_data) just like everything else. The catch is that other
|
||||||
|
# modules still take the address of these builtin types forcing them
|
||||||
|
# to be variables, sigh!
|
||||||
|
|
||||||
# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is
|
# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is
|
||||||
# anchored on the first column and excludes the ``/'' character so
|
# anchored on the first column and excludes the ``/'' character so
|
||||||
|
@ -1025,38 +1024,51 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||||
# automatically adds the $(srcdir) prefixes when it encounters files
|
# automatically adds the $(srcdir) prefixes when it encounters files
|
||||||
# in sub-directories such as cli/ and mi/.
|
# in sub-directories such as cli/ and mi/.
|
||||||
|
|
||||||
INIT_FILES = $(OBS) $(TSOBS) $(CONFIG_SRCS)
|
# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates
|
||||||
|
# duplicates. Files in the gdb/ directory can end up appearing in
|
||||||
|
# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file).
|
||||||
|
|
||||||
|
INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS)
|
||||||
init.c: $(INIT_FILES)
|
init.c: $(INIT_FILES)
|
||||||
@echo Making init.c
|
@echo Making init.c
|
||||||
@rm -f init.c-tmp init.l-tmp
|
@rm -f init.c-tmp init.l-tmp
|
||||||
|
@touch init.c-tmp
|
||||||
|
@echo gdbtypes > init.l-tmp
|
||||||
@-echo $(INIT_FILES) | \
|
@-echo $(INIT_FILES) | \
|
||||||
tr ' ' '\012' | \
|
tr ' ' '\012' | \
|
||||||
sed \
|
sed \
|
||||||
-e '/^init.o/d' \
|
-e '/^gdbtypes.[co]$$/d' \
|
||||||
-e '/xdr_ld.o/d' \
|
-e '/^init.[co]$$/d' \
|
||||||
-e '/xdr_ptrace.o/d' \
|
-e '/xdr_ld.[co]$$/d' \
|
||||||
-e '/xdr_rdb.o/d' \
|
-e '/xdr_ptrace.[co]$$/d' \
|
||||||
-e '/udr.o/d' \
|
-e '/xdr_rdb.[co]$$/d' \
|
||||||
-e '/udip2soc.o/d' \
|
-e '/udr.[co]$$/d' \
|
||||||
-e '/udi2go32.o/d' \
|
-e '/udip2soc.[co]$$/d' \
|
||||||
-e '/version.o/d' \
|
-e '/udi2go32.[co]$$/d' \
|
||||||
-e '/^[a-z0-9A-Z_]*_[SU].o/d' \
|
-e '/version.[co]$$/d' \
|
||||||
-e '/[a-z0-9A-Z_]*-exp.tab.o/d' \
|
-e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
|
||||||
-e 's/\.o/.c/' \
|
-e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
|
||||||
|
-e 's/\.[co]$$/.c/' \
|
||||||
-e 's,signals\.c,signals/signals\.c,' \
|
-e 's,signals\.c,signals/signals\.c,' \
|
||||||
-e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \
|
-e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \
|
||||||
while read f; do grep '^_initialize_[a-z_0-9A-Z]* *(' $$f 2>/dev/null; done | \
|
while read f; do \
|
||||||
sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/\1/' | \
|
sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \
|
||||||
( echo _initialize_gdbtypes ; grep -v '^_initialize_gdbtypes$$' ) > init.l-tmp
|
done | \
|
||||||
|
while read f; do \
|
||||||
|
case "$$fs" in \
|
||||||
|
"* $$f *") ;; \
|
||||||
|
*) echo $$f ; fs="$$fs $$f ";; \
|
||||||
|
esac; \
|
||||||
|
done >> init.l-tmp
|
||||||
@echo '/* Do not modify this file. */' >>init.c-tmp
|
@echo '/* Do not modify this file. */' >>init.c-tmp
|
||||||
@echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
|
@echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
|
||||||
@echo '#include "defs.h"' >>init.c-tmp
|
@echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp
|
||||||
@echo '#include "call-cmds.h"' >>init.c-tmp
|
@echo '#include "call-cmds.h" /* For initialize_all_files. */' >>init.c-tmp
|
||||||
@sed -e 's/\(.*\)/extern initialize_file_ftype \1;/' <init.l-tmp >>init.c-tmp
|
@sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' <init.l-tmp >>init.c-tmp
|
||||||
@echo 'void' >>init.c-tmp
|
@echo 'void' >>init.c-tmp
|
||||||
@echo 'initialize_all_files (void)' >>init.c-tmp
|
@echo 'initialize_all_files (void)' >>init.c-tmp
|
||||||
@echo '{' >>init.c-tmp
|
@echo '{' >>init.c-tmp
|
||||||
@sed -e 's/\(.*\)/ \1 ();/' <init.l-tmp >>init.c-tmp
|
@sed -e 's/\(.*\)/ _initialize_\1 ();/' <init.l-tmp >>init.c-tmp
|
||||||
@echo '}' >>init.c-tmp
|
@echo '}' >>init.c-tmp
|
||||||
@rm init.l-tmp
|
@rm init.l-tmp
|
||||||
@mv init.c-tmp init.c
|
@mv init.c-tmp init.c
|
||||||
|
@ -1079,7 +1091,7 @@ nlm: force
|
||||||
# against that.
|
# against that.
|
||||||
#
|
#
|
||||||
# init.o is very important. It pulls in the rest of GDB.
|
# init.o is very important. It pulls in the rest of GDB.
|
||||||
LIBGDB_OBS= $(OBS) $(TSOBS) $(ADD_FILES) init.o
|
LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o
|
||||||
libgdb.a: $(LIBGDB_OBS)
|
libgdb.a: $(LIBGDB_OBS)
|
||||||
-rm -f libgdb.a
|
-rm -f libgdb.a
|
||||||
$(AR) q libgdb.a $(LIBGDB_OBS)
|
$(AR) q libgdb.a $(LIBGDB_OBS)
|
||||||
|
|
Loading…
Reference in New Issue