This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] remove 'for x in .. ${foo}' idiom from configure.in


This idiom is for Makefiles.  The shell quite happily handles
for x in ${foo}
where ${foo} evaluates to nothing. (It does nothing in this case.)

Configured and built on i686-pc-linux-gnu.  (Stage 2 bootstrap is
failing already for an unrelated reason:
../../gcc-main/gcc/gengtype.c: In function `adjust_field_tree_exp':
../../gcc-main/gcc/gengtype.c:718: internal compiler error: tree check: expected field_decl, have tree_list in gen_struct_or_union_type_die, at dwarf2out.c:11330
is the error message
)

This leaves the indentation in this file in even worse shape than before.
But I decided not to punish branch managers with a reindentation patch
right now...

	* configure.in: Remove uses of "for x in .. ${foo}" idiom.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.720
diff -u -r1.720 configure.in
--- configure.in	31 Aug 2003 19:00:37 -0000	1.720
+++ configure.in	31 Aug 2003 19:21:11 -0000
@@ -1264,7 +1264,7 @@
 
 # Conditionalize the makefile for this host machine.
 xmake_file=
-for f in .. ${host_xmake_file}
+for f in ${host_xmake_file}
 do
 	if test -f ${srcdir}/config/$f
 	then
@@ -1274,7 +1274,7 @@
 
 # Conditionalize the makefile for this target machine.
 tmake_file_=
-for f in .. ${tmake_file}
+for f in ${tmake_file}
 do
 	if test -f ${srcdir}/config/$f
 	then
@@ -2534,11 +2534,9 @@
 # First scan to see if an enabled language requires some other language.
 # We assume that a given config-lang.in will list all the language
 # front ends it requires, even if some are required indirectly.
-for lang in ${srcdir}/*/config-lang.in ..
+for lang in ${srcdir}/*/config-lang.in
 do
    case $lang in
-    ..)
-       ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
 changequote(,)dnl
@@ -2567,10 +2565,9 @@
 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's:  *: :g' -e 's:  *: :g' -e 's:^ ::' -e 's: $::'`
 found_languages=
 subdirs=
-for lang in ${srcdir}/*/config-lang.in ..
+for lang in ${srcdir}/*/config-lang.in
 do
 	case $lang in
-	..) ;;
 	# The odd quoting in the next line works around
 	# an apparent bug in bash 1.12 on linux.
 changequote(,)dnl
@@ -2738,10 +2735,8 @@
 
 language_hooks="Make-hooks"
 
-for s in .. $subdirs
+for s in $subdirs
 do
-	if test $s != ".."
-	then
 		language=
 		boot_language=
 		compilers=
@@ -2767,15 +2762,11 @@
 		all_stagestuff="$all_stagestuff $stagestuff"
 		all_outputs="$all_outputs $outputs"
 		all_gtfiles="$all_gtfiles $gtfiles"
-                for f in .. $gtfiles
+                for f in $gtfiles
                 do
-          	     if test $f != ".."
-                     then
                          all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
                          all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
-                     fi
                 done
-	fi
 done
 
 # Pick up gtfiles for c
@@ -2783,22 +2774,16 @@
 s="c"
 . ${srcdir}/c-config-lang.in
 all_gtfiles="$all_gtfiles $gtfiles"
-for f in .. $gtfiles
+for f in $gtfiles
 do
-     if test $f != ".."
-     then
         all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
         all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
-     fi
 done
 
 check_languages=
-for language in .. $all_languages
+for language in $all_languages
 do
-	if test $language != ".."
-	then
 		check_languages="$check_languages check-$language"
-	fi
 done
 
 # Since we can't use `::' targets, we link each language in
@@ -2815,11 +2800,9 @@
 for t in $target_list
 do
 	x=
-	for lang in .. $all_languages
+	for lang in $all_languages
 	do
-		if test $lang != ".."; then
 			x="$x $lang.$t"
-		fi
 	done
 	echo "lang.$t: $x" >> Make-hooks
 done
@@ -3008,11 +2991,9 @@
 echo > cstamp-h ;;
 esac
 # Make sure all the subdirs exist.
-for d in .. $subdirs
+for d in $subdirs
 do
-  if test $d != ..; then
     test -d $d || mkdir $d
-  fi
 done
 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
 # bootstrapping and the installation procedure can still use
@@ -3021,8 +3002,7 @@
 # This is virtually a duplicate of what happens in configure.lang; we do
 # an extra check to make sure this only happens if ln -s can be used.
 if test "$symbolic_link" = "ln -s"; then
- for d in .. ${subdirs} fixinc ; do
-   if test $d != ..; then
+ for d in ${subdirs} fixinc ; do
 	STARTDIR=`${PWDCMD-pwd}`
 	cd $d
 	for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
@@ -3031,7 +3011,6 @@
 		$symbolic_link ../$t $t 2>/dev/null
 	done
 	cd $STARTDIR
-   fi
  done
 else true ; fi
 ], 

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]