]> sourceware.org Git - automake.git/commitdiff
2001-07-19 Tom Tromey <tromey@redhat.com>
authorTom Tromey <tromey@redhat.com>
Fri, 20 Jul 2001 01:25:12 +0000 (01:25 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 20 Jul 2001 01:25:12 +0000 (01:25 +0000)
            Alexandre Duret-Lutz  <duret_g@epita.fr>

Fix for ccnoco.test, subobj8.test:
* m4/Makefile.am (m4data_DATA): Added auxdir.m4.
* tests/Makefile.am (XFAIL_TESTS): Removed ccnoco.test,
subobj8.test.
* m4/minuso.m4 (AM_PROG_CC_C_O): Use absolute path to compile.
Use AM_AUX_DIR_EXPAND.
* lib/compile: Handle case where `-o' argument is the name of an
executable, not an object file.
* m4/auxdir.m4: New file, from...
* m4/missing.m4: ... here.  Moved AM_AUX_DIR_EXPAND.
* automake.in (handle_single_transform_list, lang_c_rewrite):
Require compile using `require_config_file'.

ChangeLog
automake.in
lib/compile
m4/Makefile.am
m4/Makefile.in
m4/auxdir.m4 [new file with mode: 0644]
m4/minuso.m4
m4/missing.m4
tests/Makefile.am
tests/Makefile.in

index a42667d6e1b5be63b26847db34364dce44b5d1f2..1bf04825683021cfb8fdcda689a244cb29a6de8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-07-19  Tom Tromey  <tromey@redhat.com>
+            Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       Fix for ccnoco.test, subobj8.test:
+       * m4/Makefile.am (m4data_DATA): Added auxdir.m4.
+       * tests/Makefile.am (XFAIL_TESTS): Removed ccnoco.test,
+       subobj8.test.
+       * m4/minuso.m4 (AM_PROG_CC_C_O): Use absolute path to compile.
+       Use AM_AUX_DIR_EXPAND.
+       * lib/compile: Handle case where `-o' argument is the name of an
+       executable, not an object file.
+       * m4/auxdir.m4: New file, from...
+       * m4/missing.m4: ... here.  Moved AM_AUX_DIR_EXPAND.
+       * automake.in (handle_single_transform_list, lang_c_rewrite):
+       Require compile using `require_config_file'.
+
 2001-07-19  Tom Tromey  <tromey@redhat.com>
 
        * automake.texi (Program and Library Variables): Added X example
index a15ceb310ce8ad5da01905c2b632d9803a9c7ef1..f5b444356dde8b67886f545434f185f1b44e09cc 100755 (executable)
@@ -1869,7 +1869,7 @@ sub handle_single_transform_list ($$$@)
                 }
                 $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 @@ sub lang_c_rewrite
            &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 7370ae595606a12c843a15254e5685c97f4cd922..9bb997a6a9b4549a733ed71f7e449e70c89f7a69 100755 (executable)
@@ -37,8 +37,18 @@ args=
 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 3825b3e216bd67e8d17958889bd173400429960c..5bc5d9f274d9ddf47f63073b7d1f41b74077f550 100644 (file)
@@ -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 f1501fb33e9a31ca44298d085553fc21a0762411..42d3c0b9e3b4ad577bdc8783fd73b8ba563615e5 100644 (file)
@@ -67,8 +67,8 @@ _am_quote = @_am_quote@
 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
diff --git a/m4/auxdir.m4 b/m4/auxdir.m4
new file mode 100644 (file)
index 0000000..a99f76e
--- /dev/null
@@ -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 e1ffa3cb10f0089a5f798e14348580ea12de3e35..23a170351f81ce0348f8830e6b93c249205aefa0 100644 (file)
@@ -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 a8dab46460d5b8f6a34d8ec8a8a0520345b170ca..1b1577431f295cfde7470c86afb5e2e029409791 100644 (file)
@@ -47,27 +47,3 @@ else
   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 98865c014f3b2402251be18f9c2866cf0513321a..3c9d2623554bf6458b1f61ea1f81b532eaa8dda5 100644 (file)
@@ -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 3d4d9cd1e15461d6251b7c094a573e04ee595510..d2493891ebd857b4fe8672e0f0acb14f3418cac9 100644 (file)
@@ -66,7 +66,7 @@ _am_include = @_am_include@
 _am_quote = @_am_quote@
 install_sh = @install_sh@
 
-XFAIL_TESTS = subdir5.test subobj8.test ccnoco.test
+XFAIL_TESTS = subdir5.test
 
 TESTS = \
 acinclude.test \
This page took 0.047058 seconds and 5 git commands to generate.