From 172b0292ee6f43dfe71dea74c3c978600c81b136 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 12 Mar 2001 11:15:11 +0000 Subject: [PATCH] * automake.in (&variable_conditions_permutations): Separate the conditions. * tests/cond3.test: Improve the sed expression. --- ChangeLog | 6 ++++++ automake.in | 7 ++++--- tests/cond3.test | 19 +++++++++++-------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5578e7fa..e5a17ff9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-03-12 Akim Demaille + + * automake.in (&variable_conditions_permutations): Separate the + conditions. + * tests/cond3.test: Improve the sed expression. + 2001-03-09 Pavel Roskin * Makefile.am (maintainer-check): Scan all *.am files and tests diff --git a/automake.in b/automake.in index b7704bb2..5c80bc91 100755 --- a/automake.in +++ b/automake.in @@ -5487,7 +5487,8 @@ sub make_condition unless $res; $res = '@' . $res . '@'; - $res =~ s/ /@@/; + $res =~ s/ /@@/g; + return $res; } @@ -5869,8 +5870,8 @@ sub variable_conditions_permutations my @ret; foreach my $sub (&variable_conditions_permutations (@comps)) { - push (@ret, $comp . $sub); - push (@ret, $neg . $sub); + push (@ret, "$comp $sub"); + push (@ret, "$neg $sub"); } if (! @ret) { diff --git a/tests/cond3.test b/tests/cond3.test index e00beb53..8f53e0d1 100755 --- a/tests/cond3.test +++ b/tests/cond3.test @@ -40,14 +40,17 @@ END $AUTOMAKE || exit 1 -sed -n -e '/am_targ_OBJECTS =.*\\$/ { - :loop - p - n - /\\$/ b loop - p - n - }' -e '/am_targ_OBJECTS =/ p' Makefile.in >produced +# `b top' so that +sed -n ' +/am_targ_OBJECTS =/ { + : loop + /\\$/ { + p + n + b loop + } + p +}' Makefile.in >produced cat >expected << 'EOF' -- 2.43.5