+Sat Jul 18 00:24:14 1998 Tom Tromey <tromey@cygnus.com>
+
+ * automake.in (variable_conditions_sub): If var is not
+ conditional, but does have conditional subvariables, then return
+ value should be all permutations of subvariable conditions. Test
+ cond4.test.
+ (handle_source_transform): Define _OBJECTS variable with each
+ condition; no need to define multiple new variables.
+
Fri Jul 17 12:56:14 1998 Tom Tromey <tromey@cygnus.com>
* automake.in (am_install_var): Use DESTDIR, not DATADIR. From
Tue Jun 2 13:27:34 1998 Tom Tromey <tromey@cygnus.com>
* automake.in (scan_one_configure_file): Make CONFIGURE file
- handle local.
+ handle local. From Kevin Street.
* automake.in (read_am_file): Error if blank line or comment
follows trailing backslash. Test syntax.test.
Karl Berry kb@cs.umb.edu
Karl Heuer kwzh@gnu.org
Kevin Dalley kevin@aimnet.com
+Kevin Street street@iname.com
L. Peter Deutsch ghost@aladdin.com
Maciej W. Rozycki macro@ds2.pg.gda.pl
Marius Vollmer mvo@zagadka.ping.de
+* There are probably more bugs in variable_conditions_sub along
+ the lines of the one that caused cond4.test to fail.
+
* give user more control over -I flags
in particular document a way to override the defaults
}
else
{
- local ($cond, $cond_var_name);
- local ($count) = 0;
- local (@namelist) = ();
+ local ($cond);
foreach $cond (@conds)
{
@files = &variable_value_as_list ($var, $cond);
@files);
$linker = $temp if $linker eq '';
- # We have to have a new name for each such
- # variable. Then we define the _OBJECTS variable
- # as the union of all such variables. Hopefully
- # this is the Right Thing.
- $cond_var_name = 'cond' . $count . $one_file . '_OBJECTS';
- &define_pretty_variable ($cond_var_name, $cond, @result)
+ # Define _OBJECTS conditionally.
+ &define_pretty_variable ($one_file . '_OBJECTS', $cond,
+ @result)
unless $prefix eq 'EXTRA_';
- push (@namelist, '$(' . $cond_var_name . ')');
- ++$count;
}
- &define_pretty_variable ($one_file . '_OBJECTS', '',
- @namelist);
-
next;
}
}
}
}
- return &variable_conditions_reduce (@new_conds);
+ # Now we want to return all permutations of the subvariable
+ # conditions.
+ local (%allconds, $item);
+ foreach $item (@new_conds)
+ {
+ foreach (split ('@', $item))
+ {
+ next if ! $_;
+ s/_(TRUE|FALSE)$//;
+ $allconds{$_ . '_TRUE'} = 1;
+ }
+ }
+
+ return &variable_conditions_permutations (keys %allconds);
}
local (@this_conds) = ();
+Sat Jul 18 00:27:26 1998 Tom Tromey <tromey@cygnus.com>
+
+ * cond3.test: Changed to match recent fixes.
+
+Fri Jul 17 23:44:49 1998 Tom Tromey <tromey@cygnus.com>
+
+ * cond4.test, cond5.test: New files.
+
Tue May 26 01:44:37 1998 Tom Tromey <tromey@cygnus.com>
* syntax.test: New file.
texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \
java.test sinclude.test javaprim.test javasubst.test aclocalii.test \
lex2.test libobj8.test version3.test instdata.test exdir2.test \
-colon5.test library.test syntax.test
+colon5.test library.test syntax.test cond4.test cond5.test
EXTRA_DIST = defs $(TESTS)
texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \
java.test sinclude.test javaprim.test javasubst.test aclocalii.test \
lex2.test libobj8.test version3.test instdata.test exdir2.test \
-colon5.test library.test syntax.test
+colon5.test library.test syntax.test cond4.test cond5.test
EXTRA_DIST = defs $(TESTS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
$AUTOMAKE || exit 1
-test "`grep '^targ_OBJECTS' Makefile.in | wc -l`" -eq 1
+test "`grep 'targ_OBJECTS =' Makefile.in | wc -l`" -eq 8
--- /dev/null
+#! /bin/sh
+
+# Another sources-in-conditional test. Report from Tim Goodwin.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_PROG_CC
+AM_CONDITIONAL(ONE, true)
+AM_CONDITIONAL(TWO, false)
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = targ
+
+if ONE
+OPT1 = one.c
+endif
+
+if TWO
+OPT2 = two.c
+endif
+
+targ_SOURCES = main.c $(OPT1) $(OPT2)
+END
+
+$AUTOMAKE || exit 1
+
+test "`grep TWO_FALSE Makefile.in | wc -l`" -eq 2
--- /dev/null
+#! /bin/sh
+
+# Yet another sources-in-conditional test. Report from Tim Goodwin.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_PROG_CC
+AM_CONDITIONAL(ONE, true)
+AM_CONDITIONAL(TWO, false)
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = targ
+
+if ONE
+OPT_SRC = one.c
+endif
+
+if TWO
+OPT_SRC = $(OPT_SRC) two.c
+endif
+
+targ_SOURCES = main.c $(OPT_SRC)
+END
+
+# The bug is that automake hangs. So we give it a few seconds and
+# then kill it.
+$AUTOMAKE &
+pid=$!
+
+sleep 5
+kill -0 $pid && {
+ kill $pid
+ exit 1
+}
+exit 0