Commit b8dad04b by Zack Weinberg

configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'.

	* configure.in: If not NO_MINUS_C_MINUS_O, substitute
	OUTPUT_OPTION with '-o $@'.  Make zlibdir, zlibinc relative to
	top level.  Kill oldstyle_subdirs.  Do not include
	$srcdir/$s/Makefile.in in all_lang_makefiles, but do include
	$outputs.  Do not run configure.lang from config.status.
	Rearrange warning-flag logic to correspond to what the
	makefile wants.  Put special vax stage1 options in
	@stage1_flags@ not @stage1_warn_cflags@.  Don't do anything
	with extra_c_objs, extra_cxx_objs, or extra_cpp_objs.
	(--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if
	switch is given, nothing otherwise.
	* configure.lang: Delete.

        * Makefile.in: Expunge all traces of extra_c_objs,
        extra_cxx_objs, and extra_cpp_objs.  Set MAYBE_CPPLIB from
        @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS.  Set
        warning options via a three level scheme so that -pedantic and
        -Wtraditional are not used for non-C front ends: LOOSE_WARN,
        STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS ->
        WARN_CFLAGS.  Distinguish STAGE1_CFLAGS from BOOT_CFLAGS.
	Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES.
	Set OUTPUT_OPTION, ZLIB, ZLIBINC.  Do not set P,
        LANG_FLAGS_TO_PASS.  Add OUTPUT_OPTION to all object-file
        generation rules.  Wrap all rules that change the current
        directory in parentheses; pmake doesn't spawn a new shell for
        each command.  Expunge all references to $(P).  When one
        command depends on another and they're run all at once, use &&
        to separate them, not ;.  Add libgcc_s$(SHLIB_EXT) to files
        deleted on make clean.  Force OUTPUT_OPTION='-o $@' in stage2
        and beyond.

	* cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in,
	objc/Make-lang.in: Wrap all rules that change the current
	directory in parentheses.  Expunge all references to $(P).
	When one command depends on another and they're run all at
	once, use && to separate them, not ;.  Add OUTPUT_OPTION to
	all object-file generation rules.  Delete obsolete variables.
	Move all build rules here from the corresponding Makefile.in and
	adapt to the new environment.

	* cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in:
	Delete.

	* cp/config-lang.in, f/config-lang.in, java/config-lang.in:
	Delete outputs= line.

From-SVN: r37088
parent fadb729c
......@@ -320,8 +320,7 @@
every opportunity. This is extremely expensive. */
#undef ENABLE_GC_ALWAYS_COLLECT
/* Define if you want the preprocessor merged into the C and C++ compilers.
This mode is not ready for production use. */
/* Define if you want the preprocessor merged into the C and C++ compilers. */
#undef USE_CPPLIB
/* Define if you want the C and C++ compilers to support multibyte
......
......@@ -255,16 +255,16 @@ elif test x$withval != xno; then
fi])
# Link cpplib into the compiler proper, for C/C++/ObjC.
maybe_cpplib=
AC_ARG_ENABLE(c-cpplib,
[ --enable-c-cpplib link cpplib directly into C and C++ compilers
(HIGHLY EXPERIMENTAL).],
if test x$enable_c_cpplib != xno; then
extra_c_objs="${extra_c_objs} libcpp.a"
extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
maybe_cpplib=libcpp.a
AC_DEFINE(USE_CPPLIB, 1,
[Define if you want the preprocessor merged into the C and C++ compilers.
This mode is not ready for production use.])
[Define if you want the preprocessor merged into the C and C++ compilers.])
fi)
AC_SUBST(maybe_cpplib)
# Enable Multibyte Characters for C/C++
AC_ARG_ENABLE(c-mbchar,
......@@ -330,10 +330,14 @@ AC_CANONICAL_SYSTEM
# Find the native compiler
AC_PROG_CC
AC_PROG_CC_C_O
# autoconf is lame and doesn't give us any substitution variable for this.
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
NO_MINUS_C_MINUS_O=yes
else
OUTPUT_OPTION='-o $@'
fi
AC_SUBST(NO_MINUS_C_MINUS_O)
AC_SUBST(OUTPUT_OPTION)
gcc_AC_C_LONG_DOUBLE
......@@ -344,34 +348,34 @@ CFLAGS="-Wno-long-long"
AC_TRY_COMPILE(,,ac_cv_prog_cc_no_long_long=yes,
ac_cv_prog_cc_no_long_long=no)
CFLAGS="$save_CFLAGS"])
strict1_warn=
if test $ac_cv_prog_cc_no_long_long = yes; then
strict1_warn="-pedantic -Wno-long-long"
fi
AC_SUBST(strict1_warn)
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
stage2_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
if test "x$GCC" = "xyes"; then
if test $ac_cv_prog_cc_no_long_long = yes; then
stage1_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
fi
else
stage1_warn_cflags=""
warn_cflags=
if test "x$GCC" = "xyes"; then
warn_cflags='$(GCC_WARN_CFLAGS)'
fi
AC_SUBST(warn_cflags)
# Stage specific cflags for build.
stage1_cflags=
case $build in
vax-*-*)
if test x$GCC = xyes
then
stage1_warn_cflags="$stage1_warn_cflags -Wa,-J"
stage1_cflags="-Wa,-J"
else
stage1_warn_cflags="$stage1_warn_cflags -J"
stage1_cflags="-J"
fi
;;
esac
AC_SUBST(stage1_warn_cflags)
AC_SUBST(stage2_warn_cflags)
AC_SUBST(stage1_cflags)
AC_PROG_MAKE_SET
......@@ -4875,8 +4879,8 @@ AC_SUBST(GGC)
echo "Using $GGC for garbage collection."
# Use the system's zlib library.
zlibdir=-L../../zlib
zlibinc="-I\$(srcdir)/../../zlib"
zlibdir=-L../zlib
zlibinc="-I\$(srcdir)/../zlib"
AC_ARG_WITH(system-zlib,
[ --with-system-zlib use installed libz],
zlibdir=
......@@ -4983,7 +4987,6 @@ all_lib2funcs=
language_fragments="Make-lang"
language_hooks="Make-hooks"
oldstyle_subdirs=
for s in .. $subdirs
do
......@@ -5003,7 +5006,7 @@ do
echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
exit 1
fi
all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in $outputs"
all_languages="$all_languages $language"
if test "x$boot_language" = xyes
then
......@@ -5014,10 +5017,6 @@ do
all_diff_excludes="$all_diff_excludes $diff_excludes"
all_headers="$all_headers $headers"
all_outputs="$all_outputs $outputs"
if test x$outputs = x
then
oldstyle_subdirs="$oldstyle_subdirs $s"
fi
all_lib2funcs="$all_lib2funcs $lib2funcs"
fi
done
......@@ -5140,9 +5139,6 @@ AC_SUBST(cpp_install_dir)
AC_SUBST(dep_host_xmake_file)
AC_SUBST(dep_tmake_file)
AC_SUBST(extra_c_flags)
AC_SUBST(extra_c_objs)
AC_SUBST(extra_cpp_objs)
AC_SUBST(extra_cxx_objs)
AC_SUBST(extra_headers_list)
AC_SUBST(extra_objs)
AC_SUBST(extra_parts)
......@@ -5218,7 +5214,6 @@ fi
# and configure language subdirectories
AC_OUTPUT($all_outputs,
[
. $srcdir/configure.lang
case x$CONFIG_HEADERS in
xauto-host.h:config.in)
echo > cstamp-h ;;
......@@ -5256,7 +5251,6 @@ target='${target}'
target_alias='${target_alias}'
srcdir='${srcdir}'
subdirs='${subdirs}'
oldstyle_subdirs='${oldstyle_subdirs}'
symbolic_link='${symbolic_link}'
program_transform_set='${program_transform_set}'
program_transform_name='${program_transform_name}'
......
# configure.lang for GNU CC
# This script is run by configure for configuration of language
# subdirectories which conform to the old GCC configure mechanism
# for such subdirectories.
# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GNU CC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GNU CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA.
savesrcdir=$srcdir
for subdir in . $oldstyle_subdirs
do
# We only want to do this in language subdirs, but we have to handle
# the case of $oldstyle_subdirs = "".
if [ $subdir = . ]
then
continue
fi
oldsrcdir=$savesrcdir
# Re-adjust the path
case $oldsrcdir in
/*)
srcdir=$oldsrcdir/$subdir
;;
*)
oldsrcdir=../${oldsrcdir}
srcdir=$oldsrcdir/$subdir
;;
esac
mainsrcdir=$oldsrcdir
STARTDIR=`pwd`
test -d $subdir || mkdir $subdir
cd $subdir
# Create Makefile.tem from Makefile.in.
# Make it set VPATH if necessary so that the sources are found.
# Also change its value of srcdir.
# Also create a .gdbinit file which runs the one in srcdir
# and tells GDB to look there for source files.
case $srcdir in
. | ./$subdir | .././$subdir)
rm -f Makefile.tem
cp Makefile.in Makefile.tem
chmod +w Makefile.tem
;;
*)
rm -f Makefile.tem
echo "VPATH = ${srcdir}" \
| cat - ${srcdir}/Makefile.in \
| sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
rm -f .gdbinit
echo "dir ." > .gdbinit
echo "dir ${srcdir}" >> .gdbinit
echo "dir ${mainsrcdir}" >> .gdbinit
if [ x$gdb_needs_out_file_path = xyes ]
then
echo "dir ${mainsrcdir}/config/"`dirname ${out_file}` >> .gdbinit
fi
echo "source ${mainsrcdir}/.gdbinit" >> .gdbinit
;;
esac
# Conditionalize the makefile for this host machine.
rm -f Makefile.xx Makefile.ll
merged_frags=
for f in .. ${host_xmake_file}
do
if [ -f ${mainsrcdir}/config/$f ]
then
cat ${mainsrcdir}/config/$f >> Makefile.ll
if [ x"${merged_frags}" != x ]
then
merged_frags="${merged_frags} and "
fi
merged_frags="${merged_frags}${f}"
fi
done
if [ x"${merged_frags}" != x ]
then
sed -e "/####host/ r Makefile.ll" Makefile.tem > Makefile.xx
echo "Merged ${merged_frags}."
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
rm -f Makefile.ll
fi
# Add a definition for MAKE if system wants one.
case "$SET_MAKE" in
?*)
rm -f Makefile.xx
(echo "$SET_MAKE"; cat Makefile.tem) >Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
esac
# Add a definition for INSTALL if system wants one.
# This substitutes for lots of x-* files.
if [ x$build_broken_install = x ]
then true
else
rm -f Makefile.xx
abssrcdir=`cd ${srcdir}; pwd`
sed "s|^INSTALL = .*|${INSTALL}|" Makefile.tem > Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
fi
# If using -program-transform-name, override the installation names.
if [ "x${program_transform_set}" = "xyes" ] ; then
sed -e "s/^program_transform_name[ ]*=.*$/program_transform_name =
$program_transform_name/" \
-e "s/^program_transform_cross_name[
]*=.*$/program_transform_cross_name = $program_transform_name/" \
Makefile.tem > Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
fi
# Conditionalize the makefile for this target machine.
rm -f Makefile.xx Makefile.ll
merged_frags=
for f in .. ${tmake_file}
do
if [ -f ${mainsrcdir}/config/$f ]
then
cat ${mainsrcdir}/config/$f >> Makefile.ll
if [ x"${merged_frags}" != x ]
then
merged_frags="${merged_frags} and "
fi
merged_frags="${merged_frags}$f"
fi
done
if [ x"${merged_frags}" != x ]
then
sed -e "/####target/ r Makefile.ll" Makefile.tem > Makefile.xx
echo "Merged ${merged_frags}."
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
rm -f Makefile.ll
fi
# If the host supports
# symlinks, point stage[123] at ../stage[123] so bootstrapping and the
# installation procedure can still use CC="stage1/xgcc -Bstage1/".
# If the host doesn't support symlinks, FLAGS_TO_PASS has been
# modified to solve the problem there.
for t in stage1 stage2 stage3 stage4 include
do
rm -f $t
$symbolic_link ../$t $t 2>/dev/null
done
# Remove all formfeeds, since some Makes get confused by them.
# Also arrange to give the variables `target', `target_alias',
# `host_xmake_file', `tmake_file', `prefix', `local_prefix',
# `exec_prefix', `INSTALL_HEADERS_DIR', `exeext'
# values in the Makefile from the values they have in this script.
rm -f Makefile.xx
# Create an empty Makefile.sed first, to work around a Nextstep 3.3 bug.
echo 's| ||' > Makefile.sed
rm Makefile.sed
echo 's| ||' > Makefile.sed
echo "s|^target=.*$|target=${target}|" >> Makefile.sed
echo "s|^target_alias=.*$|target_alias=${target_alias}|" >> Makefile.sed
echo "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" >> Makefile.sed
echo "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" >> Makefile.sed
echo "s|^version=.*$|version=${version}|" >> Makefile.sed
echo "s|^GCC_THREAD_FILE=.*$|GCC_THREAD_FILE=${thread_file}|" >> Makefile.sed
echo "s|^prefix[ ]*=.*|prefix = $prefix|" >> Makefile.sed
echo "s|^local_prefix[ ]*=.*|local_prefix = $local_prefix|" >> Makefile.sed
echo "s|^exec_prefix[ ]*=.*|exec_prefix = $exec_prefix|" >> Makefile.sed
echo "s|^INSTALL_HEADERS_DIR[ ]*=.*$|INSTALL_HEADERS_DIR = ${build_install_headers_dir}|" >> Makefile.sed
echo "s|^exeext[ ]*=.*$|exeext = ${build_exeext}|" >> Makefile.sed
sed -f Makefile.sed Makefile.tem > Makefile.xx
rm -f Makefile.tem Makefile.sed
mv Makefile.xx Makefile.tem
# Install Makefile for real, after making final changes.
# Define macro CROSS_COMPILE in compilation
# if this is a cross-compiler.
# Also use all.cross instead of all.internal
# and add cross-make to Makefile.
if [ x$host != x$target ]
then
rm -f Makefile.xx
echo "CROSS=-DCROSS_COMPILE" > Makefile.xx
sed -e "/####cross/ r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
fi
# When building gcc with a cross-compiler, we need to fix a few things.
# This must come after cross-make as we want all.build to override
# all.cross.
if [ x$build != x$host ]
then
rm -f Makefile.xx
echo "build= $build" > Makefile.xx
echo "host= $host" >> Makefile.xx
sed -e "s|objc-runtime$||" \
-e "/####build/ r ${mainsrcdir}/build-make" Makefile.tem >> Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
fi
rm -f Makefile
mv Makefile.tem Makefile
echo "Created \`$subdir/Makefile'."
cd $STARTDIR
done # end of current-dir SUBDIRS loop
# Restore this, remember we're invoked with `.'.
srcdir=$savesrcdir
2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
* Make-lang.in: Move all build rules here from Makefile.in,
adapt to new context. Wrap all rules that change the current
directory in parentheses. Expunge all references to $(P).
When one command depends on another and they're run all at
once, use && to separate them, not ;. Add OUTPUT_OPTION to
all object-file generation rules. Delete obsolete variables.
* Makefile.in: Delete.
* config-lang.in: Delete outputs= line.
2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (dump_function_decl): Print no space between
......
......@@ -36,12 +36,6 @@
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
#
# Extra flags to pass to recursive makes.
CXX_FLAGS_TO_PASS = \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"
# Actual names to use when installing a native compiler.
CXX_INSTALL_NAME = `t='$(program_transform_name)'; echo c++ | sed $$t`
......@@ -56,12 +50,6 @@ DEMANGLER_CROSS_NAME = `t='$(program_transform_cross_name)'; echo c++filt | sed
# The name to use for the demangler program.
DEMANGLER_PROG = c++filt$(exeext)
# Extra code to include in libgcc2.
CXX_LIB2FUNCS = tinfo.o tinfo2.o new.o opnew.o opnewnt.o opvnew.o opvnewnt.o \
opdel.o opdelnt.o opvdel.o opvdelnt.o exception.o vec.o
CXX_LIB2SRCS = $(srcdir)/cp/new.cc $(srcdir)/cp/new1.cc $(srcdir)/cp/new2.cc \
$(srcdir)/cp/exception.cc $(srcdir)/cp/tinfo.cc \
$(srcdir)/cp/tinfo2.cc $(srcdir)/cp/tinfo.h
#
# Define the names for selecting c++ in LANGUAGES.
# Note that it would be nice to move the dependency on g++
......@@ -76,12 +64,6 @@ g++spec.o: $(srcdir)/cp/g++spec.c system.h $(GCC_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/cp/g++spec.c
$(INTL_TARGETS): $(srcdir)/cp/parse.c
$(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y
@cp_srcdir=`sed -n 's/^srcdir[ ]*=[ ]*//p' cp/Makefile` && \
echo "cd cp && $(MAKE) $$cp_srcdir/parse.c" && \
cd cp && \
$(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \
$$cp_srcdir/parse.c
# Create the compiler driver for g++.
GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o
......@@ -94,6 +76,7 @@ g++-cross$(exeext): g++$(exeext)
-rm -f g++-cross$(exeext)
cp g++$(exeext) g++-cross$(exeext)
# The demangler.
cxxmain.o: $(srcdir)/../libiberty/cplus-dem.c $(DEMANGLE_H)
rm -f cxxmain.c
$(LN_S) $(srcdir)/../libiberty/cplus-dem.c cxxmain.c
......@@ -105,24 +88,36 @@ $(DEMANGLER_PROG): cxxmain.o underscore.o $(LIBDEPS)
$(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) \
cxxmain.o underscore.o $(LIBS)
CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-tree.def \
$(srcdir)/c-common.def \
$(srcdir)/cp/cp-tree.h $(srcdir)/cp/cvt.c $(srcdir)/cp/decl.c \
$(srcdir)/cp/decl.h $(srcdir)/cp/decl2.c $(srcdir)/cp/dump.c \
$(srcdir)/cp/errfn.c $(srcdir)/cp/error.c $(srcdir)/cp/except.c \
$(srcdir)/cp/expr.c $(srcdir)/cp/friend.c $(srcdir)/cp/init.c \
$(srcdir)/cp/lex.c $(srcdir)/cp/lex.h \
$(srcdir)/cp/mangle.c $(srcdir)/cp/method.c $(srcdir)/cp/optimize.c \
$(srcdir)/cp/parse.y $(srcdir)/cp/pt.c $(srcdir)/cp/ptree.c \
$(srcdir)/cp/repo.c $(srcdir)/cp/rtti.c $(srcdir)/cp/search.c \
$(srcdir)/cp/semantics.c $(srcdir)/cp/spew.c $(srcdir)/cp/tree.c \
$(srcdir)/cp/typeck.c $(srcdir)/cp/typeck2.c $(srcdir)/cp/xref.c
cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) $(BACKEND) c-common.o \
c-pragma.o c-semantics.o c-lex.o $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def \
$(srcdir)/c-common.def $(srcdir)/cp/cfns.gperf hash.o \
$(srcdir)/cp/operators.def
cd cp; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext)
# The compiler itself.
# Shared with C front end:
CXX_C_OBJS = c-common.o c-pragma.o c-semantics.o c-lex.o
# Language-specific object files.
CXX_OBJS = cp/call.o cp/decl.o cp/errfn.o cp/expr.o cp/pt.o cp/typeck2.o \
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/xref.o cp/repo.o cp/dump.o \
cp/optimize.o cp/mangle.o
# Use loose warnings for this front end.
cp-warn =
cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
$(MAYBE_CPPLIB) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) $(MAYBE_CPPLIB) $(LIBS)
# Special build rules.
$(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
$(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
$(srcdir)/cp/parse.h $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y
@echo "Expect 33 shift/reduce conflicts and 58 reduce/reduce conflicts."
cd $(srcdir)/cp; $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y ; \
grep '^#define[ ]*YYEMPTY' p$$$$.c >> p$$$$.h ; \
mv -f p$$$$.c parse.c ; mv -f p$$$$.h parse.h
#
# Build hooks:
......@@ -214,10 +209,10 @@ c++.mostlyclean:
c++.clean:
c++.distclean:
-rm -f cp/config.status cp/Makefile
-rm -f cp/parse.output
-rm -f $(srcdir)/cp/parse.output
c++.extraclean:
c++.maintainer-clean:
-rm -f cp/parse.c cp/parse.h
-rm -f $(srcdir)/cp/parse.c $(srcdir)/cp/parse.h
#
# Stage hooks:
# The main makefile has already created stage?/cp.
......@@ -248,3 +243,51 @@ c++.distdir:
ln $$file ../../tmp/cp/inc >/dev/null 2>&1 \
|| cp $$file ../../tmp/cp/inc; \
done
#
# .o: .h dependencies.
CXX_TREE_H = $(TREE_H) cp/cp-tree.h c-common.h cp/cp-tree.def c-common.def \
function.h varray.h system.h $(CONFIG_H) \
$(srcdir)/../include/hashtab.h $(srcdir)/../include/splay-tree.h
cp/spew.o: cp/spew.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h toplev.h
cp/lex.o: cp/lex.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h c-pragma.h \
toplev.h output.h mbchar.h $(GGC_H) input.h diagnostic.h cp/operators.def
cp/decl.o: cp/decl.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h stack.h \
output.h $(EXPR_H) except.h toplev.h hash.h $(GGC_H) $(RTL_H) cp/operators.def
cp/decl2.o: cp/decl2.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \
output.h except.h toplev.h dwarf2out.h dwarfout.h $(GGC_H) $(RTL_H)
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) flags.h toplev.h output.h
cp/typeck.o: cp/typeck.c $(CXX_TREE_H) flags.h $(RTL_H) $(EXPR_H) toplev.h
cp/class.o: cp/class.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H)
cp/call.o: cp/call.c $(CXX_TREE_H) flags.h toplev.h $(RTL_H) $(EXPR_H) $(GGC_H)
cp/friend.o: cp/friend.c $(CXX_TREE_H) flags.h $(RTL_H) toplev.h $(EXPR_H)
cp/init.o: cp/init.c $(CXX_TREE_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
$(GGC_H) except.h
cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H)
cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h
cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H)
cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \
insn-config.h integrate.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) system.h
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h defaults.h
cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
cp/cfns.h $(EXPR_H) insn-flags.h cp/decl.h $(OBSTACK_H)
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h except.h
cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h
cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \
$(GGC_H) $(RTL_H) except.h
cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h
cp/errfn.o: cp/errfn.c $(CXX_TREE_H) toplev.h
cp/repo.o: cp/repo.c $(CXX_TREE_H) toplev.h $(GGC_H)
cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \
flags.h $(GGC_H) output.h $(RTL_H) $(TIMEVAR_H)
cp/dump.o: cp/dump.c $(CXX_TREE_H)
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
input.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
system.h toplev.h $(GGC_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
$(srcdir)/cp/parse.c $(OUTPUT_OPTION)
......@@ -33,5 +33,3 @@ compilers="cc1plus\$(exeext)"
stagestuff="g++\$(exeext) g++-cross\$(exeext) cc1plus\$(exeext)"
diff_excludes="-x parse.c -x parse.h"
outputs=cp/Makefile
2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
* Make-lang.in: Move all build rules here from Makefile.in,
adapt to new context. Wrap all rules that change the current
directory in parentheses. Expunge all references to $(P).
When one command depends on another and they're run all at
once, use && to separate them, not ;. Add OUTPUT_OPTION to
all object-file generation rules. Delete obsolete variables.
* Makefile.in: Delete.
* config-lang.in: Delete outputs= line.
Sat Oct 21 18:07:48 2000 Joseph S. Myers <jsm28@cam.ac.uk>
* Makefile.in, g77spec.c: Remove EGCS references in comments.
......
......@@ -33,5 +33,3 @@ compilers="f771\$(exeext)"
stagestuff="g77\$(exeext) g77-cross\$(exeext) f771\$(exeext)"
diff_excludes="-x f/BUGS -x f/NEWS -x f/INSTALL -x f/intdoc.texi"
outputs=f/Makefile
2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
* Make-lang.in: Move all build rules here from Makefile.in,
adapt to new context. Wrap all rules that change the current
directory in parentheses. Expunge all references to $(P).
When one command depends on another and they're run all at
once, use && to separate them, not ;. Add OUTPUT_OPTION to
all object-file generation rules. Delete obsolete variables.
* Makefile.in: Delete.
* config-lang.in: Delete outputs= line.
2000-10-24 Tom Tromey <tromey@cygnus.com>
* lex.c (java_new_lexer): Initialize new fields. Work around
......
......@@ -36,5 +36,3 @@ language="java"
compilers="jc1\$(exeext) jvgenmain\$(exeext)"
stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext) jv-scan\$(exeext) jcf-dump\$(exeext)"
outputs=java/Makefile
......@@ -35,18 +35,6 @@
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
#
# Extra flags to pass to recursive makes.
OBJC_FLAGS_TO_PASS = \
"OBJC_FOR_BUILD=$(OBJC_FOR_BUILD)" \
"OBJCFLAGS=$(OBJCFLAGS)" \
"OBJC_FOR_TARGET=$(OBJC_FOR_TARGET)" \
# Actual names to use when installing a native compiler.
#OBJC_INSTALL_NAME = `t='$(program_transform_name)'; echo c++ | sed $$t`
# Actual names to use when installing a cross-compiler.
#OBJC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo c++ | sed $$t`
#
# Define the names for selecting Objective-C in LANGUAGES.
......@@ -56,10 +44,13 @@ OBJECTIVE-C objective-c: cc1obj$(exeext)
# Tell GNU make to ignore these if they exist.
.PHONY: objective-c objc ObjC
# Use maximal warnings for this front end.
objc-warn = $(STRICT_WARN)
# Language-specific object files for Objective C.
OBJC_OBJS = objc-parse.o objc-act.o $(C_AND_OBJC_OBJS)
cc1obj$(exeext): $(P) $(OBJC_OBJS) $(BACKEND) $(LIBDEPS)
cc1obj$(exeext): $(OBJC_OBJS) $(BACKEND) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(BACKEND) $(LIBS)
# Objective C language specific files.
......@@ -70,7 +61,7 @@ objc-parse.o : $(srcdir)/objc/objc-parse.c \
$(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \
$(srcdir)/objc/objc-act.h system.h cpplib.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
-c $(srcdir)/objc/objc-parse.c
-c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION)
$(INTL_TARGETS): $(srcdir)/objc/objc-parse.c
$(srcdir)/objc/objc-parse.c : $(srcdir)/objc/objc-parse.y
......@@ -132,8 +123,8 @@ objc.distclean:
-rm -f objc-parse.output
objc.extraclean:
objc.maintainer-clean:
-rm -f objc/objc-parse.y
-rm -f objc/objc-parse.c objc/objc-parse.output
-rm -f $(srcdir)/objc/objc-parse.y
-rm -f $(srcdir)/objc/objc-parse.c $(srcdir)/objc/objc-parse.output
#
# Stage hooks:
......@@ -156,11 +147,8 @@ objc.stage4: stage4-start
# This target creates the files that can be rebuilt, but go in the
# distribution anyway. It then copies the files to the distdir directory.
# ??? Note that this should be fixed once the Makefile is fixed to do
# the build in the inner directory.
objc.distdir: $(srcdir)/objc/objc-parse.c
mkdir tmp/objc
# cd objc ; $(MAKE) $(LANG_FLAGS_TO_PASS) objc-parse.c
cd objc; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
......
# GNU Objective C frontend Makefile
# Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
#
# This file is part of GNU CC.
#
# GNU CC is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# GNU CC; see the file COPYING. If not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# The Makefile built from this file lives in the objc language subdirectory.
# Its purpose is to provide support for:
#
# 1. recursion where necessary, and only then (building .o's), and
# 2. building and debugging cc1objc from the language subdirectory.
#
# The parent Makefile handles all other chores, with help from the language
# Makefile fragment.
#
# The targets for external use are `all' and `mostlyclean'.
SHELL=/bin/sh
OPTIMIZE= -O
srcdir = .
VPATH = $(srcdir)
AR = ar
AR_FLAGS = rc
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
# to compile all the gen* files first by hand to avoid erroneous results.
P =
# Definition of `all' is here so that new rules inserted by sed
# do not specify the default target.
all: all.indirect
# sed inserts variable overrides after the following line.
####target overrides
####host overrides
####cross overrides
####build overrides
#
# Now figure out from those variables how to compile and link.
all.indirect: Makefile frontend
frontend:
cd ..; $(MAKE) cc1obj$(exeext)
Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
cd ..; $(SHELL) config.status
mostlyclean:
-rm -f *.o xforward fflags
clean: mostlyclean
distclean: mostlyclean
extraclean: mostlyclean
# For Sun VPATH.
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