From: Tom Tromey Date: Tue, 31 Jul 2001 04:22:06 +0000 (+0000) Subject: * tests/Makefile.am (TESTS): Added aclibobj.test. X-Git-Tag: Release-1-4j~3 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=0aef0905f5dc738ad4f53e12746e2e0001432628;p=automake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 07814ef3..dfc98187 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2001-07-30 Tom Tromey + * 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. + * automake.texi (Dist): Mention other distribution types. (Install): Updates. diff --git a/automake.in b/automake.in index f0ff3213..c61b9e52 100755 --- a/automake.in +++ b/automake.in @@ -2174,14 +2174,15 @@ sub handle_lib_objects_cond # means adding entries to dep_files. if ($lsearch =~ /^\@(LT)?LIBOBJS\@$/) { + 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, "\@$1" . "LIBOBJS\@ seen but never set in `$configure_ac'"); + &am_line_error ($var, "\@$lt" . "LIBOBJS\@ seen but never set in `$configure_ac'"); } foreach my $iter (keys %libsources) @@ -2216,11 +2217,12 @@ sub handle_lib_objects_cond } elsif ($lsearch =~ /^\@(LT)?ALLOCA\@$/) { + my $lt = $1 ? $1 : ''; my $myobjext = ($1 ? 'l' : '') . 'o'; push (@dep_list, $lsearch); &am_line_error ($var, - "\@$1" . "ALLOCA\@ seen but `AC_FUNC_ALLOCA' not in `$configure_ac'") + "\@$lt" . "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'); @@ -4482,6 +4484,17 @@ sub scan_one_autoconf_file { $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*\(\[?//) { diff --git a/tests/Makefile.am b/tests/Makefile.am index 089cb18a..aa8e64f3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,6 +4,7 @@ XFAIL_TESTS = subdir5.test auxdir2.test TESTS = \ acinclude.test \ +aclibobj.test \ aclocal.test \ aclocali.test \ aclocali1.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 900e5d6e..d1a8dc00 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -70,6 +70,7 @@ XFAIL_TESTS = subdir5.test auxdir2.test TESTS = \ acinclude.test \ +aclibobj.test \ aclocal.test \ aclocali.test \ aclocali1.test \ diff --git a/tests/aclibobj.test b/tests/aclibobj.test new file mode 100755 index 00000000..1bcbc5e3 --- /dev/null +++ b/tests/aclibobj.test @@ -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