Hello, I have several questions regarding config-ml.in.
First, the recent change to support a ${Makefile} with a different name seems to have a bug. Well, I can't see how the value of ${Makefile} is transported to the makefile fragment. I think the small patch below should fix that. It also removes one instance of ${Makefile} which had been present (as `Makefile') in the `for dir in ...' line, since the initial SVN revision of config-ml.in in the GCC tree but seems to not make sense at all. I'd need somebody to approve this patch and apply it to both GCC and src; also for the other patch below. 2007-11-22 Ralf Wildenhues <[EMAIL PROTECTED]> * config-ml.in (multi-clean): Substitute ${Makefile}. Remove superfluous ${Makefile} in list. --- config-ml.in 2007-11-22 21:56:24.000000000 +0100 +++ config-ml.in 2007-11-22 22:13:43.000000000 +0100 @@ -586,8 +586,12 @@ true; \ else \ lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ - for dir in ${Makefile} $(MULTIDIRS); do \ - if [ -f ../$${dir}/$${lib}/${Makefile} ]; then \ + for dir in $(MULTIDIRS); do \ +EOF +cat >>Multi.tem <<EOF + if [ -f ../\$\${dir}/\$\${lib}/${Makefile} ]; then \\ +EOF +cat >>Multi.tem <<\EOF if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ then true; \ else exit 1; \ Second, the passing of ${ml_config_env} introduced in 2007-04-14 <http://gcc.gnu.org/viewcvs/trunk/config-ml.in?r1=114622&r2=123825> seems to break the multlib.test in the Automake testsuite: <http://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob;f=tests/multlib.test;hb=HEAD> because a configure argument of CC=.../build/../mycc is changed to CC=.../build/debug/../mycc later. I must confess I don't exactly see where that happens. In case the mangling is on purpose, I suppose the test is wrong. Would this be an appropriate fix for the test? --- tests/multlib.test +++ tests/multlib.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -49,6 +49,7 @@ gcc ${1+"$@"} END chmod +x mycc +PATH=`pwd`:$PATH cat >Makefile.am <<'EOF' SUBDIRS = @subdirs@ @@ -130,7 +131,7 @@ cd .. # Check VPATH builds mkdir build cd build -../configure --enable-multilib CC=`pwd`/../mycc +../configure --enable-multilib CC=mycc $MAKE $MAKE install $MAKE distcleancheck @@ -138,5 +139,5 @@ $MAKE distcleancheck # Check standard builds. cd .. # Why to I have to specify --with-target-subdir? -./configure --enable-multilib --with-target-subdir=. CC=`pwd`/mycc +./configure --enable-multilib --with-target-subdir=. CC=mycc $MAKE Third, I would like to remove some limitations in Automake wrt. white space in absolute file names (`pwd`). Would you consider the following patch against config-ml.in? Should I post these three issues independently? Thanks, Ralf 2007-11-22 Ralf Wildenhues <[EMAIL PROTECTED]> * config-ml.in: Robustify against white space in absolute file names. --- config-ml.in 2007-11-22 21:56:24.000000000 +0100 +++ config-ml.in 2007-11-22 22:35:37.000000000 +0100 @@ -540,7 +540,7 @@ else \ rootpre=`${PWD_COMMAND}`/; export rootpre; \ srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \ - lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ + lib=`echo "$${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ compiler="$(CC)"; \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ dir=`echo $$i | sed -e 's/;.*$$//'`; \ @@ -696,7 +696,7 @@ fi ml_origdir=`${PWDCMD-pwd}` - ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'` + ml_libdir=`echo "$ml_origdir" | sed -e 's,^.*/,,'` # cd to top-level-build-dir/${with_target_subdir} cd .. @@ -732,7 +732,7 @@ case ${srcdir} in ".") - echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir} + echo "Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir}" if [ "${with_target_subdir}" != "." ]; then ml_unsubdir="../" else @@ -797,7 +797,7 @@ else # Create a regular expression that matches any string as long # as ML_POPDIR. - popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` + popdir_rx=`echo "${ML_POPDIR}" | sed 's,.,.,g'` CC_= for arg in ${CC}; do case $arg in @@ -901,11 +901,11 @@ exit 1 fi - cd ${ML_POPDIR} + cd "${ML_POPDIR}" done - cd ${ml_origdir} + cd "${ml_origdir}" fi fi # ${ml_toplevel_p} = yes