Commit 015089dd by Tim Josling

Clean up configure.in checks for bad languages; fix typos in treelang.

From-SVN: r54800
parent a616effa
2002-06-20 Tim Josling <tej@melbpc.org.au>
* Makefile.in: Clean up code to check for misspecified languages
in enable-languages.
2002-06-19 Andrew Pinski <pinskia@physics.uc.edu> 2002-06-19 Andrew Pinski <pinskia@physics.uc.edu>
* cpptrad.c (_cpp_replacement_text_len): initialize len. * cpptrad.c (_cpp_replacement_text_len): initialize len.
......
...@@ -2244,7 +2244,7 @@ EOF ...@@ -2244,7 +2244,7 @@ EOF
fi fi
# Find some useful tools # Find some useful tools
for ac_prog in mawk gawk nawk awk for ac_prog in gawk mawk nawk awk
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
...@@ -7929,7 +7929,8 @@ if test x"${enable_languages+set}" != xset; then ...@@ -7929,7 +7929,8 @@ if test x"${enable_languages+set}" != xset; then
enable_languages=all enable_languages=all
fi fi
else else
if test x"${enable_languages}" = x; if test x"${enable_languages}" = x \
|| test x"${enable_languages}" = xyes;
then then
{ echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
fi fi
...@@ -7967,7 +7968,8 @@ do ...@@ -7967,7 +7968,8 @@ do
esac esac
done done
remaining_languages=${enable_languages} expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
found_languages=
subdirs= subdirs=
for lang in ${srcdir}/*/config-lang.in .. for lang in ${srcdir}/*/config-lang.in ..
do do
...@@ -7991,8 +7993,8 @@ do ...@@ -7991,8 +7993,8 @@ do
*,all,*) add_this_lang=yes ;; *,all,*) add_this_lang=yes ;;
*) add_this_lang=no ;; *) add_this_lang=no ;;
esac esac
found_languages="${found_languages} ${lang_alias}"
if test x"${add_this_lang}" = xyes; then if test x"${add_this_lang}" = xyes; then
remaining_languages=`echo $remaining_languages | sed -e s/${lang_alias}//g`
case $lang in case $lang in
${srcdir}/ada/config-lang.in) ${srcdir}/ada/config-lang.in)
if test x$have_gnat = xyes ; then if test x$have_gnat = xyes ; then
...@@ -8008,12 +8010,33 @@ do ...@@ -8008,12 +8010,33 @@ do
esac esac
done done
remaining_languages_check=`echo $remaining_languages | sed -e 's/,//g' -e 's/^c$//'g` missing_languages=
if test "xxx$remaining_languages_check" != "xxx" -a "xxx$remaining_languages_check" != "xxxall" ; then for expected_language in ${expected_languages} ..
remaining_languages_clean=`echo $remaining_languages | sed -e 's/^c,//' -e 's/,c,/,/' -e 's/,c$//' -e 's/^c$//' -e 's/,,*/,/g' -e 's/^,//g' -e 's/,$//g' ` do
echo "Language alias(es) not found: $remaining_languages_clean" if test "${expected_language}" != ..; then
echo "Refer to the configure instructions in the doc directory" missing_language="${expected_language}"
exit 1 if test "${expected_language}" = "c" \
|| test "${expected_language}" = "all"; then
missing_language=
fi
for found_language in ${found_languages} ..
do
if test "${found_language}" != ..; then
if test "${expected_language}" = "${found_language}"; then
missing_language=
fi
fi
done
if test "x${missing_language}" != x; then
missing_languages="${missing_languages} ${missing_language}"
fi
fi
done
if test "x$missing_languages" != x; then
{ echo "configure: error:
The following requested languages were not found:${missing_languages}
The following languages were available: c${found_languages}" 1>&2; exit 1; }
fi fi
# Make gthr-default.h if we have a thread file. # Make gthr-default.h if we have a thread file.
...@@ -8060,7 +8083,7 @@ fi ...@@ -8060,7 +8083,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:8064: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo "configure:8087: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode" enableval="$enable_maintainer_mode"
......
...@@ -2181,7 +2181,8 @@ if test x"${enable_languages+set}" != xset; then ...@@ -2181,7 +2181,8 @@ if test x"${enable_languages+set}" != xset; then
enable_languages=all enable_languages=all
fi fi
else else
if test x"${enable_languages}" = x; if test x"${enable_languages}" = x \
|| test x"${enable_languages}" = xyes;
then then
AC_MSG_ERROR([--enable-languages needs at least one language argument]) AC_MSG_ERROR([--enable-languages needs at least one language argument])
fi fi
...@@ -2221,7 +2222,8 @@ changequote([,])dnl ...@@ -2221,7 +2222,8 @@ changequote([,])dnl
esac esac
done done
remaining_languages=${enable_languages} expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
found_languages=
subdirs= subdirs=
for lang in ${srcdir}/*/config-lang.in .. for lang in ${srcdir}/*/config-lang.in ..
do do
...@@ -2246,8 +2248,8 @@ changequote(,)dnl ...@@ -2246,8 +2248,8 @@ changequote(,)dnl
*,all,*) add_this_lang=yes ;; *,all,*) add_this_lang=yes ;;
*) add_this_lang=no ;; *) add_this_lang=no ;;
esac esac
found_languages="${found_languages} ${lang_alias}"
if test x"${add_this_lang}" = xyes; then if test x"${add_this_lang}" = xyes; then
remaining_languages=`echo $remaining_languages | sed -e s/${lang_alias}//g`
case $lang in case $lang in
${srcdir}/ada/config-lang.in) ${srcdir}/ada/config-lang.in)
if test x$have_gnat = xyes ; then if test x$have_gnat = xyes ; then
...@@ -2264,12 +2266,33 @@ changequote([,])dnl ...@@ -2264,12 +2266,33 @@ changequote([,])dnl
esac esac
done done
remaining_languages_check=`echo $remaining_languages | sed -e 's/,//g' -e 's/^c$//'g` missing_languages=
if test "xxx$remaining_languages_check" != "xxx" -a "xxx$remaining_languages_check" != "xxxall" ; then for expected_language in ${expected_languages} ..
remaining_languages_clean=`echo $remaining_languages | sed -e 's/^c,//' -e 's/,c,/,/' -e 's/,c$//' -e 's/^c$//' -e 's/,,*/,/g' -e 's/^,//g' -e 's/,$//g' ` do
echo "Language alias(es) not found: $remaining_languages_clean" if test "${expected_language}" != ..; then
echo "Refer to the configure instructions in the doc directory" missing_language="${expected_language}"
exit 1 if test "${expected_language}" = "c" \
|| test "${expected_language}" = "all"; then
missing_language=
fi
for found_language in ${found_languages} ..
do
if test "${found_language}" != ..; then
if test "${expected_language}" = "${found_language}"; then
missing_language=
fi
fi
done
if test "x${missing_language}" != x; then
missing_languages="${missing_languages} ${missing_language}"
fi
fi
done
if test "x$missing_languages" != x; then
AC_MSG_ERROR([
The following requested languages were not found:${missing_languages}
The following languages were available: c${found_languages}])
fi fi
# Make gthr-default.h if we have a thread file. # Make gthr-default.h if we have a thread file.
......
2002-06-19 Paolo Bonzini <bonzini@gnu.org>
* lex.l (yyparse) Return AUTOMATIC for 'automatic' token rather
than STATIC.
2002-06-10 Tim Josling <tej@melbpc.org.au> 2002-06-10 Tim Josling <tej@melbpc.org.au>
Cleanup Cleanup
...@@ -25,7 +30,7 @@ ...@@ -25,7 +30,7 @@
* tree1.c (main): Remove include of "output.h". * tree1.c (main): Remove include of "output.h".
(symbol_table): Add GTY details. (symbol_table): Add GTY details.
(symbol_table_ggc): Remove. (symbol_table_ggc): Remove.
(treelang_init): Remove root definitions for garage collection. (treelang_init): Remove root definitions for garbage collection.
(mark_production_used): Remove. (mark_production_used): Remove.
(mark_token_used): Remove. (mark_token_used): Remove.
(main, at end): include generated garage collection routines. (main, at end): include generated garage collection routines.
......
...@@ -11,6 +11,9 @@ the GCC back end 'tree' interface in syntax. ...@@ -11,6 +11,9 @@ the GCC back end 'tree' interface in syntax.
Thanks to Richard Kenner, Joachim Nadler and many others for helping Thanks to Richard Kenner, Joachim Nadler and many others for helping
me to understand enough of GCC to do this. me to understand enough of GCC to do this.
Please note, the documentation is not a good model to use for GCC
front end documentation.
Tim Josling Tim Josling
May 2001 19 June 2002
...@@ -166,7 +166,7 @@ static void dump_lex_value (int lexret); ...@@ -166,7 +166,7 @@ static void dump_lex_value (int lexret);
"automatic" { "automatic" {
update_lineno_charno (); update_lineno_charno ();
SAVE_RETURN (STATIC); SAVE_RETURN (AUTOMATIC);
} }
"int" { "int" {
......
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