summaryrefslogtreecommitdiff
path: root/automake.in
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2004-02-29 19:10:21 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2004-02-29 19:10:21 +0000
commit2ac4685e495eae08c7b7ca778558102a70af28a1 (patch)
tree8b7400fbfa41cc564276e313582bb358d6707da7 /automake.in
parenta9800a566efb292d0cba6301815e40c42ff1b552 (diff)
downloadautomake-2ac4685e495eae08c7b7ca778558102a70af28a1.tar.gz
* automake.in (lang_yacc_target_hook): Use Automake::Rule::define
so that rules for the same headers are not output twice. * lib/Automake/Variable.pm (value_as_list_recursive): Do not call `return' inside `map'. * tests/cond30.test: Make sure `a.c' and `b.c' both appear in the Makefile.in. * tests/cond35.test, tests/cond36.test: New files. * tests/Makefile.am (TESTS): Add cond35.test and cond36.test. Report from Roman Fietze.
Diffstat (limited to 'automake.in')
-rwxr-xr-xautomake.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/automake.in b/automake.in
index f22cffc88..af5a86fa4 100755
--- a/automake.in
+++ b/automake.in
@@ -5064,13 +5064,20 @@ sub lang_yacc_target_hook
# Add a dependency for the generated header file, and arrange
# for that file to be included in the distribution.
# FIXME: this fails for `nodist_*_SOURCES'.
- $output_rules .= ("${header}: $output\n"
- # Recover from removal of $header
- . "\t\@if test ! -f \$@; then \\\n"
- . "\t rm -f $output; \\\n"
- . "\t \$(MAKE) $output; \\\n"
- . "\telse :; fi\n");
+ foreach my $cond (Automake::Rule::define (${header}, 'internal',
+ RULE_AUTOMAKE, TRUE,
+ INTERNAL))
+ {
+ my $condstr = $cond->subst_string;
+ $output_rules .= ("$condstr${header}: $output\n"
+ # Recover from removal of $header
+ . "$condstr\t\@if test ! -f \$@; then \\\n"
+ . "$condstr\t rm -f $output; \\\n"
+ . "$condstr\t \$(MAKE) $output; \\\n"
+ . "$condstr\telse :; fi\n");
+ }
&push_dist_common ($header);
+
# If the files are built in the build directory, then we want
# to remove them with `make clean'. If they are in srcdir
# they shouldn't be touched. However, we can't determine this