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
for _LDADD.
}
$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")
&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;
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
## 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
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
--- /dev/null
+# 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`
+])
# 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
])
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`
-])
## Process this file with automake to create Makefile.in
-XFAIL_TESTS = subdir5.test subobj8.test ccnoco.test
+XFAIL_TESTS = subdir5.test
TESTS = \
acinclude.test \
_am_quote = @_am_quote@
install_sh = @install_sh@
-XFAIL_TESTS = subdir5.test subobj8.test ccnoco.test
+XFAIL_TESTS = subdir5.test
TESTS = \
acinclude.test \