[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: FYI: new test and fix
From: |
Tom Tromey |
Subject: |
Patch: FYI: new test and fix |
Date: |
30 Jul 2001 22:49:38 -0600 |
I'm checking this in.
This makes 1.5 more aware of a new autoconf macro.
It also fixes an existing bug with an undefined variable.
We are going to really bite on full use of the new autoconf.
Hopefully future releases can be more carefully synchronized.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* tests/Makefile.am (TESTS): Added aclibobj.test.
* tests/aclibobj.test: New file.
* automake.in (handle_lib_objects_cond): Avoid undefined variable
error.
(scan_one_autoconf_file): Handle AC_LIBSOURCE and AC_LIBSOURCES.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1163
diff -u -r1.1163 automake.in
--- automake.in 2001/07/27 02:34:40 1.1163
+++ automake.in 2001/07/31 04:20:03
@@ -2174,14 +2174,15 @@
# means adding entries to dep_files.
if ($lsearch =~ /^\@(LT)address@hidden/)
{
+ my $lt = $1 ? $1 : '';
my $myobjext = ($1 ? 'l' : '') . 'o';
push (@dep_list, $lsearch);
$seen_libobjs = 1;
if (! keys %libsources
- && ! &variable_defined ($1 . 'LIBOBJS'))
+ && ! &variable_defined ($lt . 'LIBOBJS'))
{
- &am_line_error ($var, "address@hidden" . "LIBOBJS\@ seen but
never set in `$configure_ac'");
+ &am_line_error ($var, "address@hidden" . "LIBOBJS\@ seen but
never set in `$configure_ac'");
}
foreach my $iter (keys %libsources)
@@ -2216,11 +2217,12 @@
}
elsif ($lsearch =~ /^\@(LT)address@hidden/)
{
+ my $lt = $1 ? $1 : '';
my $myobjext = ($1 ? 'l' : '') . 'o';
push (@dep_list, $lsearch);
&am_line_error ($var,
- "address@hidden" . "ALLOCA\@ seen but
`AC_FUNC_ALLOCA' not in `$configure_ac'")
+ "address@hidden" . "ALLOCA\@ seen but
`AC_FUNC_ALLOCA' not in `$configure_ac'")
if ! defined $libsources{'alloca.c'};
$dep_files{'$(DEPDIR)/alloca.P' . $myobjext} = 1;
&require_file_with_line ($var, $FOREIGN, 'alloca.c');
@@ -4481,6 +4483,17 @@
elsif (/AC_LIBOBJ\(([^)]+)\)/)
{
$libsources{"$1.c"} = 1;
+ }
+ elsif (/AC_LIBSOURCE\(([^)]+)\)/)
+ {
+ $libsources{&unquote_m4_arg ($1)} = 1;
+ }
+ elsif (/AC_LIBSOURCES\(([^)]+)\)/)
+ {
+ foreach my $lc_iter (split (/[, ]+/, &unquote_m4_arg ($1)))
+ {
+ $libsources{$lc_iter} = 1;
+ }
}
if (! $in_ac_replace && s/AC_REPLACE_FUNCS\s*\(\[?//)
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.333
diff -u -r1.333 Makefile.am
--- tests/Makefile.am 2001/07/27 00:02:43 1.333
+++ tests/Makefile.am 2001/07/31 04:20:03
@@ -4,6 +4,7 @@
TESTS = \
acinclude.test \
+aclibobj.test \
aclocal.test \
aclocali.test \
aclocali1.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.433
diff -u -r1.433 Makefile.in
--- tests/Makefile.in 2001/07/27 00:02:43 1.433
+++ tests/Makefile.in 2001/07/31 04:20:03
@@ -70,6 +70,7 @@
TESTS = \
acinclude.test \
+aclibobj.test \
aclocal.test \
aclocali.test \
aclocali1.test \
Index: tests/aclibobj.test
===================================================================
RCS file: aclibobj.test
diff -N aclibobj.test
--- /dev/null Tue May 5 13:32:27 1998
+++ tests/aclibobj.test Mon Jul 30 21:20:03 2001
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+# Make sure AC_LIBOBJ and friends work.
+
+. $srcdir/defs || exit 1
+
+cat > X << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
+END
+
+: > maude.c
+: > liver.c
+
+$ACLOCAL
+
+set -e
+
+cp X configure.in
+echo 'AC_LIBSOURCE(maude.c)' >> configure.in
+$AUTOMAKE
+
+cp X configure.in
+echo 'AC_LIBSOURCES([maude.c, liver.c])' >> configure.in
+$AUTOMAKE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: FYI: new test and fix,
Tom Tromey <=