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]

[toplevel configury] Do not prepend $srcdir to /dev/null


All the makefile fragments go through a process of

    foo_frag=/dev/null
    case $something in
       ... zillion possibilities
       special)  foo_frag=config/special ;;
    esac

    foo_frag=${srcdir}/${foo_frag}
    AC_SUBST_FILE(foo_frag)

which leads to sed attempting to open /path/to/source//dev/null for reading
during the file creation phase of configure (config.status to be precise).

Fortunately, sed silently deals with failure to open a nonexistent file
and keeps going.  When by unhappy chance the file exists, hilarity ensues.

Tested both by configuring and by visual inspection of config.status.  Okay?



2004-07-05  Phil Edwards  <phil@codesourcery.com>

	* configure.in:  Do not prepend $srcdir to /dev/null in
	makefile fragments.
	* configure:  Regenerate.


Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.298
diff -u -p -r1.298 configure.in
--- configure.in	2 Jul 2004 07:55:37 -0000	1.298
+++ configure.in	5 Jul 2004 18:45:13 -0000
@@ -2039,10 +2039,13 @@ CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(ST
 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
 
 # Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
+for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
+do
+  eval fragval=\$$frag
+  if test $fragval != /dev/null; then
+    eval $frag=${srcdir}/$fragval
+  fi
+done
 AC_SUBST_FILE(host_makefile_frag)
 AC_SUBST_FILE(target_makefile_frag)
 AC_SUBST_FILE(alphaieee_frag)


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