diff options
author | hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-14 13:20:43 +0000 |
---|---|---|
committer | hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-14 13:20:43 +0000 |
commit | de4e1ab69e80df42173ea9f2449fbda8dc2ecdbd (patch) | |
tree | e8c6bad41b7e63e9d5e0a98b197fe43dc839d529 /gcc/configure | |
parent | 097fd46e9b7f2e76be14c229ad2140864014bf10 (diff) | |
download | gcc-de4e1ab69e80df42173ea9f2449fbda8dc2ecdbd.tar.gz |
* configure.ac: Add support for a "gcc_subdir" variable in
config-lang.in, to denote a subdirectory where the language/GCC
integration files are to be found.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135292 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/gcc/configure b/gcc/configure index c8351e02ca0..9f8cf5f19b9 100755 --- a/gcc/configure +++ b/gcc/configure @@ -23548,11 +23548,32 @@ do fi subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" subdirs="$subdirs $subdir" + + # $gcc_subdir is where the gcc integration files are to be found + # for a language, both for internal compiler purposes (compiler + # sources implementing front-end to GCC tree converters), and for + # build infrastructure purposes (Make-lang.in, etc.) + # + # This will be <subdir> (relative to $srcdir) if a line like + # gcc_subdir="<subdir>" or gcc_subdir=<subdir> + # is found in <langdir>/config-lang.in, and will remain <langdir> + # otherwise. + # + # Except for the language alias (fetched above), the regular + # "config-lang.in" contents are always retrieved from $gcc_subdir, + # so a <langdir>/config-lang.in setting gcc_subdir typically sets + # only this and the language alias. + + gcc_subdir=`sed -n -e 's,^gcc_subdir=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^gcc_subdir=\([^ ]*\).*$,\1,p' $lang` + if [ "$gcc_subdir" = "" ]; then + gcc_subdir="$subdir" + fi + case ",$enable_languages," in *,$lang_alias,*) all_selected_languages="$all_selected_languages $lang_alias" - if test -f $srcdir/$subdir/lang-specs.h; then - lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" + if test -f $srcdir/$gcc_subdir/lang-specs.h; then + lang_specs_files="$lang_specs_files $srcdir/$gcc_subdir/lang-specs.h" fi ;; esac @@ -23563,10 +23584,10 @@ do outputs= gtfiles= subdir_requires= - . ${srcdir}/$subdir/config-lang.in + . ${srcdir}/$gcc_subdir/config-lang.in if test "x$language" = x then - echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 + echo "${srcdir}/$gcc_subdir/config-lang.in doesn't set \$language." 1>&2 exit 1 fi @@ -23583,15 +23604,15 @@ do esac $ok || continue - all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" - if test -f $srcdir/$subdir/lang.opt; then - lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" + all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" + if test -f $srcdir/$gcc_subdir/lang.opt; then + lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" fi - if test -f $srcdir/$subdir/$subdir-tree.def; then - lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" + if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then + lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def" fi - if test -f ${srcdir}/$subdir/Makefile.in - then all_lang_makefiles="$subdir/Makefile" + if test -f ${srcdir}/$gcc_subdir/Makefile.in + then all_lang_makefiles="$gcc_subdir/Makefile" fi all_languages="$all_languages $language" all_compilers="$all_compilers $compilers" |