Commit 013a2ee0 by Doug Evans

Makefile.in (LANGUAGES): Remove c++.

        * Makefile.in (LANGUAGES): Remove c++.
        (SUBDIRS): New variable.
        (LEX, LEXFLAGS): Ditto.
        (MAKEOVERRIDES): Ditto.
        (COMPILERS): Remove cc1plus.
        (LANG_MAKEFILES, LANG_STAGESTUFF, LANG_DIFF_EXCLUDES, FLAGS_TO_PASS):
        New variables.
        (CPLUS_OBJS, CPLUS_TREE_H, C++, c++, g++, g++-cross, cc1plus,
        cp-*.o, g++.o, gplus.info): Deleted.
        (STAGESTUFF): Remove g++, g++-cross, cc1plus.  Add $(LANG_STAGESTUFF).
        (Makefile): Depend on $(LANG_MAKEFILES).
        (####language hooks, ####language fragments): New spots for sed
        to insert things.
        (all.cross, all.build, start.encap, rest.encap, info, dvi,
        install-normal, install-common, install-info, install-man,
        uninstall, distdir, mostlyclean, clean, distclean, extraclean,
        realclean, stage1, stage2, stage3, stage4): Depend on lang.foo.
        (mostlyclean, clean, distclean, extraclean, realclean): Clean as
        much of the language subdirectories as we can.
        (install-common):  Remove g++ installation.
        (install-man): Remove g++.1 installation.
        (uninstall): Remove g++ reference.
        (TAGS): Remove cp-parse.? reference.
        (distdir): Ditto.
        (distdir-start, distdir-finish): New targets.
        (diff): Remove cp-parse.? reference.  Add $(LANG_DIFF_EXCLUDES).
        (compare, compare3, gnucompare, gnucompare3): Compare language
        subdirectories too.
        (stage1-start, stage2-start, stage3-start, stage4-start): New targets.
        Ensure stage subdirectory exists before processing language
        dependent part.

From-SVN: r7136
parent a5943075
...@@ -28,8 +28,13 @@ ...@@ -28,8 +28,13 @@
# Variables that exist for you to override. # Variables that exist for you to override.
# See below for how to change them for certain systems. # See below for how to change them for certain systems.
# List of language subdirectories.
# This is overridden by configure.
SUBDIRS =
# Selection of languages to be made. # Selection of languages to be made.
LANGUAGES = c c++ objective-c proto # This is overridden by configure.
LANGUAGES = c objective-c proto
ALLOCA = ALLOCA =
ALLOCA_FLAGS = ALLOCA_FLAGS =
...@@ -53,6 +58,8 @@ T_CPPFLAGS = ...@@ -53,6 +58,8 @@ T_CPPFLAGS =
CC = cc CC = cc
BISON = bison BISON = bison
BISONFLAGS = BISONFLAGS =
LEX = flex
LEXFLAGS =
AR = ar AR = ar
OLDAR_FLAGS = qc OLDAR_FLAGS = qc
AR_FLAGS = rc AR_FLAGS = rc
...@@ -65,6 +72,8 @@ INSTALL_DATA = $(INSTALL) ...@@ -65,6 +72,8 @@ INSTALL_DATA = $(INSTALL)
SYMLINK = ln -s SYMLINK = ln -s
MAKEINFO = makeinfo MAKEINFO = makeinfo
TEXI2DVI = texi2dvi TEXI2DVI = texi2dvi
# For GNUmake: let us decide what gets passed to recursive makes.
MAKEOVERRIDES =
# Define this as & to perform parallel make on a Sequent. # Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary # Note that this has some bugs, and it seems currently necessary
...@@ -383,7 +392,6 @@ HOST_PRINT = $(HOST_PREFIX)print-rtl.o ...@@ -383,7 +392,6 @@ HOST_PRINT = $(HOST_PREFIX)print-rtl.o
# so that tm.h and config.h will be found in the compilation # so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory. # subdirectory rather than in the source directory.
INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
# Always use -I$(srcdir)/config when compiling. # Always use -I$(srcdir)/config when compiling.
.c.o: .c.o:
...@@ -393,10 +401,49 @@ SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config ...@@ -393,10 +401,49 @@ SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
# defined in this file into the environment. # defined in this file into the environment.
.NOEXPORT: .NOEXPORT:
# Support for additional languages (other than c and objc).
# ??? objc can be supported this way too (leave for later).
# These next lines are overridden by configure.
LANG_MAKEFILES =
LANG_STAGESTUFF =
LANG_DIFF_EXCLUDES =
# Flags to pass to recursive makes.
# CC is set by configure. Hosts without symlinks need special handling
# because we need CC="stage1/xgcc -Bstage1/" to work in the language
# subdirectories.
# ??? The choices here will need some experimenting with.
FLAGS_TO_PASS = \
"AR_FLAGS=$(AR_FLAGS)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"BISON=$(BISON)" \
"BISONFLAGS=$(BISONFLAGS)" \
"CC=set-by-configure" \
"CFLAGS=$(CFLAGS)" \
"CLIB=$(CLIB)" \
"GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
"LDFLAGS=$(LDFLAGS)" \
"LEX=$(LEX)" \
"LEXFLAGS=$(LEXFLAGS)" \
"MAKEINFO=$(MAKEINFO)" \
"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
"MALLOC=$(MALLOC)" \
"OBSTACK=$(OBSTACK)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"exec_prefix=$(exec_prefix)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"bindir=$(bindir)" \
"libsubdir=$(libsubdir)"
# Lists of files for various purposes. # Lists of files for various purposes.
# A list of all the language-specific executables. # A list of all the language-specific executables.
COMPILERS = cc1 cc1plus cc1obj # This is overridden by configure.
COMPILERS = cc1 cc1obj
# Language-specific object files for C. # Language-specific object files for C.
C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \ C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
...@@ -406,14 +453,6 @@ C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \ ...@@ -406,14 +453,6 @@ C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \ OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
# Language-specific object files for C++.
CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
cp-class.o cp-init.o cp-method.o cp-except.o \
cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
$(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
# Files specific to the C interpreter bytecode compiler(s). # Files specific to the C interpreter bytecode compiler(s).
BC_OBJS = bc-emit.o bc-optab.o BC_OBJS = bc-emit.o bc-optab.o
...@@ -445,8 +484,9 @@ STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \ ...@@ -445,8 +484,9 @@ STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
bc-arity.h bc-opcode.h bc-opname.h \ bc-arity.h bc-opcode.h bc-opname.h \
stamp-bcarity stamp-bcopcode stamp-bcopname \ stamp-bcarity stamp-bcopcode stamp-bcopname \
bi-arity bi-opcode bi-opname \ bi-arity bi-opcode bi-opname \
$(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \ $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2) cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2) \
$(LANG_STAGESTUFF)
# Members of libgcc1.a. # Members of libgcc1.a.
LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
...@@ -488,37 +528,56 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ ...@@ -488,37 +528,56 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
CONFIG_H = CONFIG_H =
RTL_H = rtl.h rtl.def machmode.h machmode.def RTL_H = rtl.h rtl.def machmode.h machmode.def
TREE_H = tree.h real.h tree.def machmode.h machmode.def TREE_H = tree.h real.h tree.def machmode.h machmode.def
CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
BYTECODE_H = bytecode.h bc-emit.h bc-optab.h BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
# Language makefile fragments.
# The following targets define the interface between us and the languages.
#
# all.build, all.cross, start.encap, rest.encap,
# info, dvi,
# install-normal, install-common, install-info, install-man,
# uninstall, distdir,
# mostlyclean, clean, distclean, extraclean, realclean,
# stage1, stage2, stage3, stage4
#
# Each language is linked in with a series of hooks (since we can't use `::'
# targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
# Configure computes and adds these here.
####language hooks
# sed inserts language fragments after the following line.
####language fragments
# End of language makefile fragments.
# Avoid a lot of time thinking about remaking Makefile.in and *.def. # Avoid a lot of time thinking about remaking Makefile.in and *.def.
.SUFFIXES: .in .def .SUFFIXES: .in .def
Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \ Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
$(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \
$(LANG_MAKEFILES)
$(SHELL) config.status $(SHELL) config.status
all.internal: start.encap rest.encap all.internal: start.encap rest.encap
# This is what to compile if making a cross-compiler. # This is what to compile if making a cross-compiler.
# Note that we can compile enquire using the cross-compiler just build, # Note that we can compile enquire using the cross-compiler just built,
# although we can't run it on this machine. # although we can't run it on this machine.
all.cross: native gcc-cross g++-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(CROSS_TEST) $(ENQUIRE) $(EXTRA_PARTS) all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
$(CROSS_TEST) $(ENQUIRE) $(EXTRA_PARTS) lang.all.cross
# This is what to compile if making gcc with a cross-compiler. # This is what to compile if making gcc with a cross-compiler.
all.build: native xgcc g++ $(EXTRA_PARTS) all.build: native xgcc $(EXTRA_PARTS) lang.all.build
# This is what must be made before installing GCC and converting libraries. # This is what must be made before installing GCC and converting libraries.
start.encap: native xgcc g++ specs $(LIBGCC1) xlimits.h start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
# These can't be made until after GCC can run. # These can't be made until after GCC can run.
rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
# This is what is made with the host's compiler # This is what is made with the host's compiler
# whether making a cross compiler or not. # whether making a cross compiler or not.
native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
# Define the names for selecting languages in LANGUAGES. # Define the names for selecting languages in LANGUAGES.
# Note that it would be nice to move the dependency on g++
# into the C++ rule, but that needs a little bit of work
# to do the right thing within all.cross.
C c: cc1 C c: cc1
C++ c++: cc1plus
OBJC objc: cc1obj objc-runtime OBJC objc: cc1obj objc-runtime
OBJECTIVE-C objective-c: cc1obj objc-runtime OBJECTIVE-C objective-c: cc1obj objc-runtime
PROTO: proto PROTO: proto
...@@ -559,27 +618,15 @@ xgcc: gcc.o version.o $(LIBDEPS) ...@@ -559,27 +618,15 @@ xgcc: gcc.o version.o $(LIBDEPS)
specs: xgcc specs: xgcc
$(GCC_FOR_TARGET) -dumpspecs > specs $(GCC_FOR_TARGET) -dumpspecs > specs
# Create the compiler driver for g++.
g++: g++.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o g++ g++.o $(LIBS)
# We do want to create an executable named `xgcc', so we can use it to # We do want to create an executable named `xgcc', so we can use it to
# compile libgcc2.a. # compile libgcc2.a.
# Also create gcc-cross, so that install-common will install properly. # Also create gcc-cross, so that install-common will install properly.
gcc-cross: xgcc gcc-cross: xgcc
cp xgcc gcc-cross cp xgcc gcc-cross
# Create a version of the g++ driver which calls the cross-compiler.
g++-cross: $(srcdir)/g++.c
$(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \
-DGCC_NAME=\"$(target)-gcc\" $(srcdir)/g++.c version.o $(LIBS)
cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS) cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
cc1plus: $(P) $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(BC_OBJS) $(OBJS) $(LIBS)
cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS) cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
...@@ -836,47 +883,6 @@ c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h ...@@ -836,47 +883,6 @@ c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H)
c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
# C++ language specific files.
cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
`echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
$(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
@echo expect 27 shift/reduce conflicts and 14 reduce/reduce conflicts
cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
cd $(srcdir); grep '^#define[ ]*YYEMPTY' cp-parse.c >>cp-parse.h
cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
$(srcdir)/cp-parse.h flags.h cp-lex.h
cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
$(srcdir)/cp-parse.h $(srcdir)/cp-input.c flags.h cp-hash.h cp-lex.h
cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
cp-lex.h cp-decl.h stack.h
cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
cp-lex.h cp-decl.h
cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
expr.h insn-codes.h
cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H) input.h
cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
g++.o : g++.c $(CONFIG_H)
# To make a configuration always use collect2, set USE_COLLECT2 to ld. # To make a configuration always use collect2, set USE_COLLECT2 to ld.
ld: collect2 ld: collect2
rm -f ld rm -f ld
...@@ -1620,19 +1626,16 @@ stmp-fixproto: fixhdr.ready fixproto stmp-headers ...@@ -1620,19 +1626,16 @@ stmp-fixproto: fixhdr.ready fixproto stmp-headers
# Remake the info files. # Remake the info files.
doc: info doc: info
info: $(srcdir)/cpp.info $(srcdir)/gcc.info info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
$(srcdir)/cpp.info: cpp.texi $(srcdir)/cpp.info: cpp.texi
cd $(srcdir); $(MAKEINFO) cpp.texi cd $(srcdir); $(MAKEINFO) cpp.texi
#$(srcdir)/gplus.info: gplus.texi
# $(MAKEINFO) `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
$(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \ $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
md.texi rtl.texi tm.texi md.texi rtl.texi tm.texi
cd $(srcdir); $(MAKEINFO) gcc.texi cd $(srcdir); $(MAKEINFO) gcc.texi
dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
# This works with GNU Make's default rule. # This works with GNU Make's default rule.
$(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \ $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
...@@ -1656,9 +1659,11 @@ $(srcdir)/INSTALL: install1.texi install.texi ...@@ -1656,9 +1659,11 @@ $(srcdir)/INSTALL: install1.texi install.texi
# `clean' deletes everything made by running `make all'. # `clean' deletes everything made by running `make all'.
# `distclean' also deletes the files made by config. # `distclean' also deletes the files made by config.
# `realclean' also deletes everything that could be regenerated automatically. # `realclean' also deletes everything that could be regenerated automatically.
# We remove as much from the language subdirectories as we can
# (less duplicated code).
mostlyclean: bytecode.mostlyclean mostlyclean: bytecode.mostlyclean lang.mostlyclean
-rm -f $(STAGESTUFF) -rm -f $(STAGESTUFF)
# Clean the objc subdir if we created one. # Clean the objc subdir if we created one.
if [ -d objc ]; then \ if [ -d objc ]; then \
...@@ -1678,9 +1683,13 @@ mostlyclean: bytecode.mostlyclean ...@@ -1678,9 +1683,13 @@ mostlyclean: bytecode.mostlyclean
-rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
# Delete the stamp files. # Delete the stamp files.
-rm -f stamp-* tmp-* -rm -f stamp-* tmp-*
-rm -f */stamp-* */tmp-*
# Delete debugging dump files. # Delete debugging dump files.
-rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
-rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
-rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
-rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
-rm -f */*.sched2 */*.stack
# Delete some files made during installation. # Delete some files made during installation.
-rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
-rm -f collect collect2 mips-tfile mips-tdump alloca.s -rm -f collect collect2 mips-tfile mips-tdump alloca.s
...@@ -1689,62 +1698,66 @@ mostlyclean: bytecode.mostlyclean ...@@ -1689,62 +1698,66 @@ mostlyclean: bytecode.mostlyclean
gen-protos fixproto.list fixtmp.* fixhdr.ready gen-protos fixproto.list fixtmp.* fixhdr.ready
# Delete unwanted output files from TeX. # Delete unwanted output files from TeX.
-rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
-rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
# Delete sorted indices we don't actually use. # Delete sorted indices we don't actually use.
-rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
# Delete core dumps. # Delete core dumps.
-rm -f core config/core -rm -f core */core
# Delete all files made by compilation # Delete all files made by compilation
# that don't exist in the distribution. # that don't exist in the distribution.
clean: mostlyclean bytecode.clean clean: mostlyclean bytecode.clean lang.clean
# It may not be quite desirable to delete unprotoize.c here, # It may not be quite desirable to delete unprotoize.c here,
# but the spec for `make clean' requires it. # but the spec for `make clean' requires it.
# Using unprotoize.c is not quite right in the first place, # Using unprotoize.c is not quite right in the first place,
# but what better way is there? # but what better way is there?
-rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null
-rm -f *.dvi -rm -f *.dvi
-rm -f */*.dvi
-if [ -f md.pre-cpp ]; then \ -if [ -f md.pre-cpp ]; then \
rm -f md ; \ rm -f md ; \
fi fi
# Delete the include directory. # Delete the include directory.
-rm -rf stmp-* include objc-headers -rm -rf stmp-* include objc-headers
-rm -f */stmp-*
# Delete all files that users would normally create # Delete all files that users would normally create
# while building and installing GCC. # while building and installing GCC.
distclean: clean bytecode.distclean distclean: clean bytecode.distclean lang.distclean
-rm -f tm.h aux-output.c config.h config.status tconfig.h hconfig.h -rm -f tm.h aux-output.c config.h config.status tconfig.h hconfig.h
-rm -f md md.pre-cpp -rm -f md md.pre-cpp
-rm -f Makefile *.oaux -rm -f Makefile *.oaux
-rm -fr stage1 stage2 stage3 stage4 -rm -fr stage1 stage2 stage3 stage4
-rm -f cp-parse.output -rm -f */stage1 */stage2 */stage3 */stage4
-rm -f objc-parse.output -rm -f objc-parse.output
-rm -f c-parse.output -rm -f c-parse.output
# Delete anything likely to be found in the source directory # Delete anything likely to be found in the source directory
# that shouldn't be in the distribution. # that shouldn't be in the distribution.
extraclean: distclean extraclean: distclean lang.extraclean
-rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~* -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
-rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
-rm -f config/*/=* config/*/"#"* config/*/*~* -rm -f config/*/=* config/*/"#"* config/*/*~*
-rm -f config/*/*.orig config/*/*.rej -rm -f config/*/*.orig config/*/*.rej
-rm -f objc/=* objc/"#"* objc/*~*
-rm -f objc/*.orig objc/*.rej
-rm -f *.dvi *.oaux *.d *.[zZ] *.gz -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
-rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
-rm -f *lose config/*lose config/*/*lose -rm -f *lose config/*lose config/*/*lose
-rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
-rm -f */=* */"#"* */*~*
-rm -f */patch* */*.orig */*.rej
-rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
-rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
-rm -f */*lose */*.s */*.s[0-9] */*.i
# Get rid of every file that's generated from some other file. # Get rid of every file that's generated from some other file.
# Most of these files ARE PRESENT in the GCC distribution. # Most of these files ARE PRESENT in the GCC distribution.
realclean: distclean bytecode.realclean realclean: distclean bytecode.realclean lang.realclean
-rm -f c-parse.y c-gperf.h objc-parse.y -rm -f c-parse.y c-gperf.h objc-parse.y
-rm -f cp-parse.c cp-parse.h cp-parse.output
-rm -f objc-parse.c objc-parse.output -rm -f objc-parse.c objc-parse.output
-rm -f c-parse.c c-parse.h c-parse.output -rm -f c-parse.c c-parse.h c-parse.output
-rm -f cexp.c cexp.output TAGS -rm -f cexp.c cexp.output TAGS
-rm -f cpp.info* cpp.??s cpp.*aux -rm -f cpp.info* cpp.??s cpp.*aux
-rm -f gcc.info* gcc.??s gcc.*aux -rm -f gcc.info* gcc.??s gcc.*aux
-rm -f gplus.info* gplus.??s gplus.*aux
# Entry points `install' and `uninstall'. # Entry points `install' and `uninstall'.
# Also use `install-collect2' to install collect2 when the config files don't. # Also use `install-collect2' to install collect2 when the config files don't.
...@@ -1756,7 +1769,7 @@ install: $(INSTALL_TARGET) ; @true ...@@ -1756,7 +1769,7 @@ install: $(INSTALL_TARGET) ; @true
# Copy the compiler files into directories where they will be run. # Copy the compiler files into directories where they will be run.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
install-man install-info install-man install-info lang.install-normal
# Do nothing while making gcc with a cross-compiler. The person who # Do nothing while making gcc with a cross-compiler. The person who
# makes gcc for the target machine has to know how to put a complete # makes gcc for the target machine has to know how to put a complete
...@@ -1801,7 +1814,7 @@ install-dir: ...@@ -1801,7 +1814,7 @@ install-dir:
-if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
# Install the compiler executables built during cross compilation. # Install the compiler executables built during cross compilation.
install-common: native install-dir xgcc $(EXTRA_PARTS) install-common: native install-dir xgcc $(EXTRA_PARTS) lang.install-common
for file in $(COMPILERS); do \ for file in $(COMPILERS); do \
if [ -f $$file ] ; then \ if [ -f $$file ] ; then \
rm -f $(libsubdir)/$$file; \ rm -f $(libsubdir)/$$file; \
...@@ -1829,26 +1842,12 @@ install-common: native install-dir xgcc $(EXTRA_PARTS) ...@@ -1829,26 +1842,12 @@ install-common: native install-dir xgcc $(EXTRA_PARTS)
rm -f $(tooldir)/bin/gcc; \ rm -f $(tooldir)/bin/gcc; \
$(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \ $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
else true; fi; \ else true; fi; \
if [ -f cc1plus ] ; then \
rm -f $(bindir)/$(target)-g++; \
$(INSTALL_PROGRAM) g++-cross $(bindir)/$(target)-g++; \
chmod a+x $(bindir)/$(target)-g++; \
rm -f $(bindir)/$(target)-c++; \
ln $(bindir)/$(target)-g++ $(bindir)/$(target)-c++; \
fi ; \
else \ else \
rm -f $(bindir)/gcc; \ rm -f $(bindir)/gcc; \
$(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \ $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
rm -f $(bindir)/$(target)-gcc-1; \ rm -f $(bindir)/$(target)-gcc-1; \
ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \ ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \ mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
if [ -f cc1plus ] ; then \
rm -f $(bindir)/g++; \
$(INSTALL_PROGRAM) g++ $(bindir)/g++; \
chmod a+x $(bindir)/g++; \
rm -f $(bindir)/c++; \
ln $(bindir)/g++ $(bindir)/c++; \
fi ; \
fi fi
# Install protoize if it was compiled. # Install protoize if it was compiled.
-if [ -f protoize ]; \ -if [ -f protoize ]; \
...@@ -1865,22 +1864,20 @@ install-common: native install-dir xgcc $(EXTRA_PARTS) ...@@ -1865,22 +1864,20 @@ install-common: native install-dir xgcc $(EXTRA_PARTS)
$(INSTALL_PROGRAM) cpp $(libsubdir)/cpp $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
# Install the info files. # Install the info files.
install-info: doc install-dir install-info: doc install-dir lang.install-info
-rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
cd $(srcdir); for f in cpp.info* gcc.info*; \ cd $(srcdir); for f in cpp.info* gcc.info*; \
do $(INSTALL_DATA) $$f $(infodir)/$$f; done do $(INSTALL_DATA) $$f $(infodir)/$$f; done
-chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
# Install the man pages. # Install the man pages.
install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 $(srcdir)/g++.1 install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
-rm -f $(mandir)/gcc$(manext) -rm -f $(mandir)/gcc$(manext)
-$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext) -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
-chmod a-x $(mandir)/gcc$(manext) -chmod a-x $(mandir)/gcc$(manext)
-rm -f $(mandir)/cccp$(manext) -rm -f $(mandir)/cccp$(manext)
-$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext) -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
-chmod a-x $(mandir)/cccp$(manext) -chmod a-x $(mandir)/cccp$(manext)
-$(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext)
-chmod a-x $(mandir)/g++$(manext)
# Install the library. # Install the library.
install-libgcc: libgcc.a install-dir install-libgcc: libgcc.a install-dir
...@@ -1966,13 +1963,12 @@ install-collect2: collect2 install-dir ...@@ -1966,13 +1963,12 @@ install-collect2: collect2 install-dir
$(INSTALL_PROGRAM) xgcc $(libsubdir)/gcc $(INSTALL_PROGRAM) xgcc $(libsubdir)/gcc
# Cancel installation by deleting the installed files. # Cancel installation by deleting the installed files.
uninstall: uninstall: lang.uninstall
-rm -rf $(libsubdir) -rm -rf $(libsubdir)
-rm -rf $(bindir)/gcc -rm -rf $(bindir)/gcc
-rm -rf $(bindir)/protoize -rm -rf $(bindir)/protoize
-rm -rf $(bindir)/unprotoize -rm -rf $(bindir)/unprotoize
-rm -rf $(mandir)/gcc$(manext) -rm -rf $(mandir)/gcc$(manext)
-rm -rf $(mandir)/g++$(manext)
-rm -rf $(mandir)/cccp$(manext) -rm -rf $(mandir)/cccp$(manext)
-rm -rf $(mandir)/protoize$(manext) -rm -rf $(mandir)/protoize$(manext)
-rm -rf $(mandir)/unprotoize$(manext) -rm -rf $(mandir)/unprotoize$(manext)
...@@ -1983,7 +1979,7 @@ uninstall: ...@@ -1983,7 +1979,7 @@ uninstall:
TAGS: force TAGS: force
cd $(srcdir); \ cd $(srcdir); \
mkdir temp; \ mkdir temp; \
mv -f c-parse.[ch] cp-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \ mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
etags *.y *.h *.c; \ etags *.y *.h *.c; \
mv temp/* .; \ mv temp/* .; \
rmdir temp rmdir temp
...@@ -2004,8 +2000,10 @@ gcc.xtar: distdir ...@@ -2004,8 +2000,10 @@ gcc.xtar: distdir
# Make the distribution. # Make the distribution.
tar -chf gcc.xtar gcc-$(version) tar -chf gcc.xtar gcc-$(version)
distdir: doc $(srcdir)/INSTALL c-parse.y c-gperf.h objc-parse.y cp-parse.y \ # This target exists to do the initial work before the language specific
c-parse.c cp-parse.c objc-parse.c cexp.c # stuff gets done.
distdir-start: doc $(srcdir)/INSTALL c-parse.y c-gperf.h objc-parse.y \
c-parse.c objc-parse.c cexp.c
@if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \ @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
then true; \ then true; \
else echo "You must update the version number in \`gcc.texi'"; sleep 10;\ else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
...@@ -2045,19 +2043,25 @@ distdir: doc $(srcdir)/INSTALL c-parse.y c-gperf.h objc-parse.y cp-parse.y \ ...@@ -2045,19 +2043,25 @@ distdir: doc $(srcdir)/INSTALL c-parse.y c-gperf.h objc-parse.y cp-parse.y \
ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \ ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
done done
ln .gdbinit tmp ln .gdbinit tmp
# Finish making `distdir', after the languages have done their thing.
distdir-finish:
mv tmp gcc-$(version) mv tmp gcc-$(version)
# Get rid of everything we don't want in the distribution. # Get rid of everything we don't want in the distribution.
cd gcc-$(version); make -f Makefile.in extraclean cd gcc-$(version); make -f Makefile.in extraclean
distdir: distdir-start lang.distdir distdir-finish
# make diff oldversion=M.N # make diff oldversion=M.N
# creates a diff file between an older distribution and this one. # creates a diff file between an older distribution and this one.
# The -P option assumes this is GNU diff. # The -P option assumes this is GNU diff.
diff: diff:
diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \ diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
-x objc-parse.y -x cp-parse.c -x cp-parse.h -x cexp.c \ -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
-x bi-parser.c -x objc-parse.c -x TAGS -x "gcc.??" -x "gcc.??s" \ -x TAGS \
-x gcc.aux -x "cpp.??s" -x "cpp.??" -x cpp.aux -x "cpp.info*" -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
-x "gcc.info*" \ -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
$(LANG_DIFF_EXCLUDES) \
gcc-$(oldversion) gcc-$(version) > diffs gcc-$(oldversion) gcc-$(version) > diffs
# do make -f ../gcc/Makefile maketest DIR=../gcc # do make -f ../gcc/Makefile maketest DIR=../gcc
...@@ -2112,15 +2116,33 @@ compare: force ...@@ -2112,15 +2116,33 @@ compare: force
tail +16c stage2/$$file > tmp-foo2 2>/dev/null \ tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
&& (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \ && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
done done
for dir in tmp-foo $(SUBDIRS); do \
if [ `echo $$dir/*.o` != "$$dir/*.o" ] ; then \
for file in $$dir/*.o; do \
tail +16c ./$$file > tmp-foo1; \
tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
&& (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
done \
fi \
done
-rm -f tmp-foo* -rm -f tmp-foo*
# Similar, but compare with stage3 directory # Similar, but compare with stage3 directory
compare3: force compare3: force
for file in *.o; do \ for file in *.o; do \
tail +16c $$file > tmp-foo1; \ tail +16c ./$$file > tmp-foo1; \
tail +16c stage3/$$file > tmp-foo2 2>/dev/null \ tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
&& (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \ && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
done done
for dir in tmp-foo $(SUBDIRS); do \
if [ `echo $$dir/*.o` != "$$dir/*.o" ] ; then \
for file in $$dir/*.o; do \
tail +16c ./$$file > tmp-foo1; \
tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
&& (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
done \
fi \
done
-rm -f tmp-foo* -rm -f tmp-foo*
# Compare the object files in the current directory with those in the # Compare the object files in the current directory with those in the
...@@ -2131,41 +2153,75 @@ gnucompare: force ...@@ -2131,41 +2153,75 @@ gnucompare: force
for file in *.o; do \ for file in *.o; do \
cmp --ignore-initial=16 $$file stage2/$$file || true ; \ cmp --ignore-initial=16 $$file stage2/$$file || true ; \
done done
for dir in tmp-foo $(SUBDIRS); do \
if [ `echo $$dir/*.o` != "$$dir/*.o" ] ; then \
for file in $$dir/*.o; do \
cmp --ignore-initial=16 $$file stage2/$$file || true ; \
done \
fi \
done
# Similar, but compare with stage3 directory # Similar, but compare with stage3 directory
gnucompare3: force gnucompare3: force
for file in *.o; do \ for file in *.o; do \
cmp --ignore-initial=16 $$file stage3/$$file || true ; \ cmp --ignore-initial=16 $$file stage3/$$file || true ; \
done done
for dir in tmp-foo $(SUBDIRS); do \
if [ `echo $$dir/*.o` != "$$dir/*.o" ] ; then \
for file in $$dir/*.o; do \
cmp --ignore-initial=16 $$file stage3/$$file || true ; \
done \
fi \
done
# Copy the object files from a particular stage into a subdirectory. # Copy the object files from a particular stage into a subdirectory.
stage1: force stage1-start:
-if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
-for dir in . $(SUBDIRS) ; \
do \
if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi \
done
-mv $(STAGESTUFF) stage1 -mv $(STAGESTUFF) stage1
-rm -f stage1/libgcc.a -rm -f stage1/libgcc.a
-cp libgcc.a stage1 -cp libgcc.a stage1
-if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
stage1: force stage1-start lang.stage1
stage2: force stage2-start:
-if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
-for dir in . $(SUBDIRS) ; \
do \
if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi \
done
-mv $(STAGESTUFF) stage2 -mv $(STAGESTUFF) stage2
-rm -f stage2/libgcc.a -rm -f stage2/libgcc.a
-cp libgcc.a stage2 -cp libgcc.a stage2
-if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
stage2: force stage2-start lang.stage2
stage3: force stage3-start:
-if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
-for dir in . $(SUBDIRS) ; \
do \
if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi \
done
-mv $(STAGESTUFF) stage3 -mv $(STAGESTUFF) stage3
-rm -f stage3/libgcc.a -rm -f stage3/libgcc.a
-cp libgcc.a stage3 -cp libgcc.a stage3
-if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
stage3: force stage3-start lang.stage3
stage4: force stage4-start:
-if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
-for dir in . $(SUBDIRS) ; \
do \
if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi \
done
-mv $(STAGESTUFF) stage4 -mv $(STAGESTUFF) stage4
-rm -f stage4/libgcc.a -rm -f stage4/libgcc.a
-cp libgcc.a stage4 -cp libgcc.a stage4
-if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
stage4: force stage4-start lang.stage4
# Copy just the executable files from a particular stage into a subdirectory, # Copy just the executable files from a particular stage into a subdirectory,
# and delete the object files. Use this if you're just verifying a version # and delete the object files. Use this if you're just verifying a version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment