From: Tom Tromey Date: Wed, 26 Aug 1998 00:48:46 +0000 (+0000) Subject: Don't create site.exp target if already defined X-Git-Tag: v1.10.2~2901 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8b913ec8327757e4796b9aa85ee7dffff9ece69;p=platform%2Fupstream%2Fautomake.git Don't create site.exp target if already defined --- diff --git a/ChangeLog b/ChangeLog index ab62af4..24835c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 25 18:40:51 1998 Tom Tromey + + * automake.in (handle_tests): Don't create site.exp target if it + is already in Makefile.am. + Sun Aug 16 23:26:26 1998 Tom Tromey * automake.in (handle_configure): Use @inputs, not diff --git a/automake.in b/automake.in index 0834031..dd90e16 100755 --- a/automake.in +++ b/automake.in @@ -3829,46 +3829,51 @@ sub handle_tests &define_program_variable ('EXPECT', 'build', 'expect', 'expect'); &define_program_variable ('RUNTEST', 'src', 'dejagnu', 'runtest'); - # Note that in the rule we don't directly generate site.exp to - # avoid the possibility of a corrupted site.exp if make is - # interrupted. Jim Meyering has some useful text on this - # topic. - $output_rules .= ("site.exp: Makefile\n" - . "\t\@echo 'Making a new site.exp file...'\n" - . "\t-\@rm -f site.bak\n" - . "\t\@echo '## these variables are automatically generated by make ##' > \$\@-t\n" - . "\t\@echo '# Do not edit here. If you wish to override these values' >> \$\@-t\n" - . "\t\@echo '# edit the last section' >> \$\@-t\n" - . "\t\@echo 'set tool \$(DEJATOOL)' >> \$\@-t\n" - . "\t\@echo 'set srcdir \$(srcdir)' >> \$\@-t\n" - . "\t\@echo 'set objdir' \`pwd\` >> \$\@-t\n"); - - # Extra stuff for AC_CANONICAL_* - local (@whatlist) = (); - if ($seen_canonical) - { - push (@whatlist, 'host') - } - - # Extra stuff only for AC_CANONICAL_SYSTEM. - if ($seen_canonical == $AC_CANONICAL_SYSTEM) - { - push (@whatlist, 'target', 'build'); - } + # Only create site.exp rule if user hasn't already written + # one. + if (! &target_defined ('site.exp')) + { + # Note that in the rule we don't directly generate + # site.exp to avoid the possibility of a corrupted + # site.exp if make is interrupted. Jim Meyering has some + # useful text on this topic. + $output_rules .= ("site.exp: Makefile\n" + . "\t\@echo 'Making a new site.exp file...'\n" + . "\t-\@rm -f site.bak\n" + . "\t\@echo '## these variables are automatically generated by make ##' > \$\@-t\n" + . "\t\@echo '# Do not edit here. If you wish to override these values' >> \$\@-t\n" + . "\t\@echo '# edit the last section' >> \$\@-t\n" + . "\t\@echo 'set tool \$(DEJATOOL)' >> \$\@-t\n" + . "\t\@echo 'set srcdir \$(srcdir)' >> \$\@-t\n" + . "\t\@echo 'set objdir' \`pwd\` >> \$\@-t\n"); + + # Extra stuff for AC_CANONICAL_* + local (@whatlist) = (); + if ($seen_canonical) + { + push (@whatlist, 'host'); + } - local ($c1, $c2); - foreach $c1 (@whatlist) - { - foreach $c2 ('alias', 'triplet') + # Extra stuff only for AC_CANONICAL_SYSTEM. + if ($seen_canonical == $AC_CANONICAL_SYSTEM) { - $output_rules .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})' >> \$\@-t\n"; + push (@whatlist, 'target', 'build'); } - } - $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> \$\@-t\n" - . "\t-\@sed '1,/^## All variables above are.*##/ d' site.bak >> \$\@-t\n" - . "\t-\@mv site.exp site.bak\n" - . "\t\@mv \$\@-t site.exp\n"); + local ($c1, $c2); + foreach $c1 (@whatlist) + { + foreach $c2 ('alias', 'triplet') + { + $output_rules .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})' >> \$\@-t\n"; + } + } + + $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> \$\@-t\n" + . "\t-\@sed '1,/^## All variables above are.*##/ d' site.bak >> \$\@-t\n" + . "\t-\@mv site.exp site.bak\n" + . "\t\@mv \$\@-t site.exp\n"); + } } else {