Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger.

d
egcs/ChangeLog:
1998-06-26  Manfred Hollstein  <manfred@s-direktnet.de>
	* Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger.
	(Makefile): Depend on $(gcc_version_trigger).
	* configure (gcc_version): Change default initializer to empty
	string.
	(gcc_version_trigger): New variable; pass this variable down
	to subdir configures to enable them checking gcc's version
	themselves. Emit make macros for both gcc_version vars.
	(topsrcdir): Initialize reliably.
	(recursion line): Remove --with-gcc-version=${gcc_version}.
egcs/gcc/ChangeLog:
1998-06-26  Manfred Hollstein  <manfred@s-direktnet.de>
	* Makefile.in (gcc_version, gcc_version_trigger): New macros.
	(version): Initialize from $(gcc_version).
	* configure.in (version): Rename to gcc_version.
	(gcc_version_trigger): New variable; call AC_SUBST for it and
	emit it into the generated config.status.
	* configure: Regenerate.
egcs/libf2c/ChangeLog.egcs:
1998-06-26  Manfred Hollstein  <manfred@s-direktnet.de>
	* Makefile.in (gcc_version_trigger): Add new macro.
	(config.status): Add dependency upon $(gcc_version_trigger).
	* configure.in (gcc_version_trigger): New variable; initialize
	using value from toplevel configure; add AC_SUBST for it.
	(gcc_version): Change initialization to use this new variable.
	* configure: Regenerate.
egcs/libio/ChangeLog:
1998-06-26  Manfred Hollstein  <manfred@s-direktnet.de>
	* config.shared (FLAGS_TO_PASS): Add gcc_version_trigger.
	(Makefile): Add dependency upon $(gcc_version_trigger).

From-SVN: r20736
This commit is contained in:
Manfred Hollstein 1998-06-26 02:13:51 +00:00
parent e4bfc27484
commit f1943b772f
8 changed files with 82 additions and 66 deletions

63
configure vendored
View File

@ -56,7 +56,8 @@ exec_prefixoption=
fatal=
floating_point=default
gas=default
gcc_version=UNKNOWN
gcc_version=
gcc_version_trigger=
host_alias=NOHOST
host_makefile_frag=
moveifchange=
@ -458,6 +459,7 @@ fi
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
topsrcdir=`cd \`dirname ${progname}\`; pwd`
# this is a hack. sun4 must always be a valid host alias or this will fail.
if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
@ -520,6 +522,28 @@ case "${exec_prefixoption}" in
*) ;;
esac
# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
if [ "${with_gcc_version_trigger+set}" = set ]; then
gcc_version_trigger="$with_gcc_version_trigger"
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${with_gcc_version_trigger}`
else
# If gcc's sources are available, define the trigger file.
if [ -f ${topsrcdir}/gcc/version.c ] ; then
gcc_version_trigger=${topsrcdir}/gcc/version.c
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
case "$arguments" in
*--with-gcc-version-trigger=$gcc_version_trigger* )
;;
* )
# Make sure configure.in knows about this.
arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
;;
esac
withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
fi
fi
### break up ${srcdir}/configure.in.
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
@ -701,33 +725,6 @@ if [ "${program_prefix}" != "" ] ; then
program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
fi
# Check whether --with-gcc-version was given.
if [ "${with_gcc_version+set}" = set ]; then
gcc_version="$with_gcc_version"
else
if [ "${srcdir}" = "." ] ; then
if [ "${with_target_subdir}" != "." ] ; then
topsrcdir=${with_multisrctop}../..
else
topsrcdir=${with_multisrctop}..
fi
else
case ${srcdir} in
*/*/* ) # Need to do this only in subdirectories.
topsrcdir=${srcdir}/..
;;
* ) # We are already in the topsrcdir.
topsrcdir=${srcdir}
;;
esac
fi
# If gcc's sources are available, extract its version number which is used by
# $libsubdir.
if [ -f ${topsrcdir}/gcc/version.c ] ; then
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${topsrcdir}/gcc/version.c`
fi
fi
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it. This is to handle running
# ./config.status by hand.
@ -1266,10 +1263,10 @@ EOF
echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
fi
# Emit a macro which is used to build the libsubdir macro where
# compiler specific stuff can be found/installed.
# FIXME: This works only if gcc's sources are available in a gcc
# subdirectory!
# Emit a macro which describes the file containing gcc's
# version number.
echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
# And emit a macro defining gcc's version number.
echo gcc_version = ${gcc_version} >> ${Makefile}
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
@ -1478,7 +1475,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
if [ ! -z "${recprog}" ] ; then
if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} --with-gcc-version=${gcc_version} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
true
else
echo Configure in `pwd` failed, exiting. 1>&2

View File

@ -245,7 +245,10 @@ lang_specs_files=@lang_specs_files@
lang_options_files=@lang_options_files@
GCC_THREAD_FILE=@thread_file@
GTHREAD_FLAGS=@gthread_flags@
version=@version@
# Be prepared for gcc2 merges.
gcc_version=@gcc_version@
gcc_version_trigger=@gcc_version_trigger@
version=$(gcc_version)
mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
# Common prefix for installation directories.

18
gcc/configure vendored
View File

@ -4969,8 +4969,13 @@ if [ x$host_truncate_target != x ]; then
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
fi
# Get the version number from the toplevel
version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
# Get the version trigger filename from the toplevel
if [ "${with_gcc_version_trigger+set}" = set ]; then
gcc_version_trigger=$with_gcc_version_trigger
else
gcc_version_trigger=${srcdir}/version.c
fi
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
# Get an absolute path to the GCC top-level source directory
holddir=`pwd`
@ -5134,7 +5139,7 @@ fi
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:5138: checking assembler alignment features" >&5
echo "configure:5143: checking assembler alignment features" >&5
gcc_cv_as=
gcc_cv_as_alignment_features=
if [ -x as$host_exeext ]; then
@ -5423,6 +5428,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
# Echo that links are built
@ -5662,7 +5668,8 @@ s%@host_xm_file_list@%$host_xm_file_list%g
s%@lang_specs_files@%$lang_specs_files%g
s%@lang_options_files@%$lang_options_files%g
s%@thread_file@%$thread_file%g
s%@version@%$version%g
s%@gcc_version@%$gcc_version%g
s%@gcc_version_trigger@%$gcc_version_trigger%g
s%@local_prefix@%$local_prefix%g
s%@gxx_include_dir@%$gxx_include_dir%g
s%@fixincludes@%$fixincludes%g
@ -5909,7 +5916,8 @@ host_xmake_file='${host_xmake_file}'
dep_tmake_file='${dep_tmake_file}'
tmake_file='${tmake_file}'
thread_file='${thread_file}'
version='${version}'
gcc_version='${gcc_version}'
gcc_version_trigger='${gcc_version_trigger}'
local_prefix='${local_prefix}'
build_install_headers_dir='${build_install_headers_dir}'
build_exeext='${build_exeext}'

View File

@ -3125,8 +3125,13 @@ if [[ x$host_truncate_target != x ]]; then
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
fi
# Get the version number from the toplevel
version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
# Get the version trigger filename from the toplevel
if [[ "${with_gcc_version_trigger+set}" = set ]]; then
gcc_version_trigger=$with_gcc_version_trigger
else
gcc_version_trigger=${srcdir}/version.c
fi
gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${gcc_version_trigger}`
# Get an absolute path to the GCC top-level source directory
holddir=`pwd`
@ -3551,7 +3556,8 @@ AC_SUBST(host_xm_file_list)
AC_SUBST(lang_specs_files)
AC_SUBST(lang_options_files)
AC_SUBST(thread_file)
AC_SUBST(version)
AC_SUBST(gcc_version)
AC_SUBST(gcc_version_trigger)
AC_SUBST(local_prefix)
AC_SUBST(gxx_include_dir)
AC_SUBST(fixincludes)
@ -3654,7 +3660,8 @@ host_xmake_file='${host_xmake_file}'
dep_tmake_file='${dep_tmake_file}'
tmake_file='${tmake_file}'
thread_file='${thread_file}'
version='${version}'
gcc_version='${gcc_version}'
gcc_version_trigger='${gcc_version_trigger}'
local_prefix='${local_prefix}'
build_install_headers_dir='${build_install_headers_dir}'
build_exeext='${build_exeext}'

View File

@ -28,6 +28,7 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
target_alias = @target_alias@
gcc_version = @gcc_version@
gcc_version_trigger = @gcc_version_trigger@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
@ -193,7 +194,7 @@ ${srcdir}/libU77/configure: ${srcdir}/libU77/configure.in
cd $(srcdir)/libU77 && autoconf && rm -f config.cache
g2c.h Makefile: $(srcdir)/g2c.h.in $(srcdir)/Makefile.in config.status
$(SHELL) config.status
config.status: $(srcdir)/configure
config.status: $(srcdir)/configure $(gcc_version_trigger)
$(SHELL) config.status --recheck
info install-info clean-info dvi:

24
libf2c/configure vendored
View File

@ -1861,18 +1861,17 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
# Get the version number from the toplevel
if test x${with_gcc_version} = x; then
# Try to get the version number from a hopefully existing gcc directory.
if test -d ${srcdir}/../gcc; then
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/../gcc/version.c`
else
gcc_version=UNKNOWN
fi
# Get the version trigger filename from the toplevel
if [ "${with_gcc_version_trigger+set}" = set ]; then
gcc_version_trigger=$with_gcc_version_trigger
gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
else
gcc_version=${with_gcc_version}
gcc_version_trigger=
gcc_version=UNKNOWN
fi
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@ -1920,7 +1919,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:1924: checking host system type" >&5
echo "configure:1923: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -1941,7 +1940,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:1945: checking target system type" >&5
echo "configure:1944: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -1959,7 +1958,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1963: checking build system type" >&5
echo "configure:1962: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -2136,6 +2135,7 @@ s%@CPP@%$CPP%g
s%@F2C_INTEGER@%$F2C_INTEGER%g
s%@F2C_LONGINT@%$F2C_LONGINT%g
s%@gcc_version@%$gcc_version%g
s%@gcc_version_trigger@%$gcc_version_trigger%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g

View File

@ -343,18 +343,17 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
# Get the version number from the toplevel
if test x${with_gcc_version} = x; then
# Try to get the version number from a hopefully existing gcc directory.
if test -d ${srcdir}/../gcc; then
gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/../gcc/version.c`
else
gcc_version=UNKNOWN
fi
# Get the version trigger filename from the toplevel
if [[ "${with_gcc_version_trigger+set}" = set ]]; then
gcc_version_trigger=$with_gcc_version_trigger
gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${gcc_version_trigger}`
else
gcc_version=${with_gcc_version}
gcc_version_trigger=
gcc_version=UNKNOWN
fi
AC_SUBST(gcc_version)
AC_SUBST(gcc_version_trigger)
AC_CANONICAL_SYSTEM
AC_SUBST(target_alias)

View File

@ -221,6 +221,7 @@ if [ "${SUBDIRS}" != "" ] ; then
echo >&2 ' "gxx_include_dir=$(gxx_include_dir)" \'
echo >&2 ' "libsubdir=$(libsubdir)" \'
echo >&2 ' "gcc_version=$(gcc_version)" \'
echo >&2 ' "gcc_version_trigger=$(gcc_version_trigger)" \'
echo >&2 ' "AR=$(AR)" \'
echo >&2 ' "AR_FLAGS=$(AR_FLAGS)" \'
echo >&2 ' "CC=$(CC)" \'
@ -449,7 +450,7 @@ echo >&2 'force:'
echo >&2 ''
echo >&2 '# with the gnu make, this is done automatically.'
echo >&2 ''
echo >&2 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)'
echo >&2 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)'
echo >&2 ' $(SHELL) ./config.status'
echo >&2 ''
echo >&2 '.NOEXPORT:'