automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: fix ccnoco and subobj8


From: Tom Tromey
Subject: Patch: fix ccnoco and subobj8
Date: 19 Jul 2001 19:49:50 -0600

I'm checking this in.  This incorporates Alexandre Duret-Lutz's
subobj8 fix, plus changes to fix ccnoco.test.  It is a bit
complicated.  Basically, now AM_PROG_CC_C_O generates a result which
respects auxdir and which can be used elsewhere in configure.
Plus, more problems in `compile' are fixed.

Tom

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1155
diff -u -r1.1155 automake.in
--- automake.in 2001/07/19 07:49:11 1.1155
+++ automake.in 2001/07/20 01:23:43
@@ -1869,7 +1869,7 @@
                 }
                 $object = $dname . '-' . $object;
 
-                &require_file ($FOREIGN, 'compile')
+                &require_config_file ($FOREIGN, 'compile')
                     if $lang->name eq 'c';
 
                 &prog_error ("$lang->name flags defined without compiler")
@@ -4917,8 +4917,7 @@
            &am_error ("C objects in subdir but `AM_PROG_CC_C_O' not in 
`$configure_ac'");
        }
 
-       &require_file ($FOREIGN, 'compile')
-           if $relative_dir eq '.';
+       &require_config_file ($FOREIGN, 'compile');
     }
 
     $de_ansi_files{$base} = 1;
Index: lib/compile
===================================================================
RCS file: /cvs/automake/automake/lib/compile,v
retrieving revision 1.5
diff -u -r1.5 compile
--- lib/compile 2001/07/18 05:59:07 1.5
+++ lib/compile 2001/07/20 01:23:43
@@ -37,8 +37,18 @@
 while test $# -gt 0; do
    case "$1" in
     -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we do something ugly here.
        ofile=$2
        shift
+       case "$ofile" in
+       *.o | *.obj)
+          ;;
+       *)
+          args="$args -o $ofile"
+          ofile=
+          ;;
+       esac
        ;;
     *.c)
        cfile=$1
Index: m4/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.am,v
retrieving revision 1.32
diff -u -r1.32 Makefile.am
--- m4/Makefile.am 2001/06/09 00:34:29 1.32
+++ m4/Makefile.am 2001/07/20 01:23:43
@@ -1,8 +1,8 @@
 ## Process this file with automake to create Makefile.in
 
 m4datadir = $(datadir)/aclocal
-m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \
-error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
+m4data_DATA = auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \
+dmalloc.m4 error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
 maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \
 ptrdiff.m4 python.m4 regex.m4 sanity.m4 strip.m4 strtod.m4 termios.m4 \
 winsz.m4
Index: m4/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.in,v
retrieving revision 1.154
diff -u -r1.154 Makefile.in
--- m4/Makefile.in 2001/07/04 03:44:18 1.154
+++ m4/Makefile.in 2001/07/20 01:23:43
@@ -67,8 +67,8 @@
 install_sh = @install_sh@
 
 m4datadir = $(datadir)/aclocal
-m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \
-error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
+m4data_DATA = auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \
+dmalloc.m4 error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
 maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \
 ptrdiff.m4 python.m4 regex.m4 sanity.m4 strip.m4 strtod.m4 termios.m4 \
 winsz.m4
Index: m4/auxdir.m4
===================================================================
RCS file: auxdir.m4
diff -N auxdir.m4
--- /dev/null   Tue May  5 13:32:27 1998
+++ m4/auxdir.m4 Thu Jul 19 18:23:44 2001
@@ -0,0 +1,23 @@
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to ${srcdir}/foo.  In other projects, it is set to `.'.
+# Of course, Automake must honor this variable whenever it calls a tool
+# from the auxiliary directory.  The problem is that $srcdir (and therefore
+# $ac_aux_dir as well) can be either an absolute path or a path relative to
+# $top_srcdir, depending on how configure is run.  This is pretty annoying,
+# since it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a relative
+# path needs to be adjusted first.
+# - calling $top_srcdir/$ac_aux_dir/missing would succeed if $ac_aux_dir was
+#   relative, but fail if it was absolute.
+# - conversly, calling $ac_aux_dir/missing would fail if $ac_aux_dir was
+#   relative, and succeed on absolute paths.
+#
+# Consequently, we define and use $am_aux_dir, the "always absolute"
+# version of $ac_aux_dir.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
Index: m4/minuso.m4
===================================================================
RCS file: /cvs/automake/automake/m4/minuso.m4,v
retrieving revision 1.3
diff -u -r1.3 minuso.m4
--- m4/minuso.m4 2001/01/16 11:04:36 1.3
+++ m4/minuso.m4 2001/07/20 01:23:44
@@ -5,12 +5,17 @@
 # Like AC_PROG_CC_C_O, but changed for automake.
 AC_DEFUN([AM_PROG_CC_C_O],
 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
    # Losing compiler, so override with the script.
-   CC="\$(top_srcdir)/compile $CC"
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
 fi
 ])
Index: m4/missing.m4
===================================================================
RCS file: /cvs/automake/automake/m4/missing.m4,v
retrieving revision 1.15
diff -u -r1.15 missing.m4
--- m4/missing.m4 2001/07/19 00:49:57 1.15
+++ m4/missing.m4 2001/07/20 01:23:44
@@ -47,27 +47,3 @@
   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
 fi
 ])
-
-# AM_AUX_DIR_EXPAND
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to ${srcdir}/foo.  In other projects, it is set to `.'.
-# Of course, Automake must honor this variable whenever it calls a tool
-# from the auxiliary directory.  The problem is that $srcdir (and therefore
-# $ac_aux_dir as well) can be either an absolute path or a path relative to
-# $top_srcdir, depending on how configure is run.  This is pretty annoying,
-# since it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a relative
-# path needs to be adjusted first.
-# - calling $top_srcdir/$ac_aux_dir/missing would succeed if $ac_aux_dir was
-#   relative, but fail if it was absolute.
-# - conversly, calling $ac_aux_dir/missing would fail if $ac_aux_dir was
-#   relative, and succeed on absolute paths.
-#
-# Consequently, we define and use $am_aux_dir, the "always absolute"
-# version of $ac_aux_dir.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
-])
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.324
diff -u -r1.324 Makefile.am
--- tests/Makefile.am 2001/07/18 05:49:46 1.324
+++ tests/Makefile.am 2001/07/20 01:23:44
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-XFAIL_TESTS = subdir5.test subobj8.test ccnoco.test
+XFAIL_TESTS = subdir5.test
 
 TESTS =        \
 acinclude.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.424
diff -u -r1.424 Makefile.in
--- tests/Makefile.in 2001/07/18 05:49:46 1.424
+++ tests/Makefile.in 2001/07/20 01:23:44
@@ -66,7 +66,7 @@
 _am_quote = @_am_quote@
 install_sh = @install_sh@
 
-XFAIL_TESTS = subdir5.test subobj8.test ccnoco.test
+XFAIL_TESTS = subdir5.test
 
 TESTS = \
 acinclude.test \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]