diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-11-27 17:43:00 -0800 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-27 17:43:00 -0800 |
commit | a320a0921a2846aaa7ecd91ae3a06c2d3aaaf9c8 (patch) | |
tree | 721da9053e6898672da9988ffdf9612657f4e2ac /lib/am | |
parent | 948c5fa480879368cbe2f79f66fcaa6854896ad9 (diff) | |
download | automake-a320a0921a2846aaa7ecd91ae3a06c2d3aaaf9c8.tar.gz |
dejagnu: add support for silent builds with site.exp.
* lib/am/dejagnu.am (site.exp): Use $(AM_V_GEN) and merge all
independent shell calls into one.
Diffstat (limited to 'lib/am')
-rw-r--r-- | lib/am/dejagnu.am | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index 8b5c1af49..f65247db6 100644 --- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -49,33 +49,34 @@ check-DEJAGNU: site.exp ## the possibility of a corrupted site.exp if make is interrupted. ## Jim Meyering has some useful text on this topic. site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) - @echo 'Making a new site.exp file ...' - @echo '## these variables are automatically generated by make ##' >site.tmp - @echo '# Do not edit here. If you wish to override these values' >>site.tmp - @echo '# edit the last section' >>site.tmp - @echo 'set srcdir "$(srcdir)"' >>site.tmp - @echo "set objdir \"`pwd`\"" >>site.tmp + $(AM_V_GEN)set -e; ( \ + echo '## these variables are automatically generated by make ##'; \ + echo '# Do not edit here. If you wish to override these values'; \ + echo '# edit the last section'; \ + echo 'set srcdir "$(srcdir)"'; \ + echo "set objdir \"`pwd`\""; \ ## Quote the *_alias variables because they might be empty. -?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp -?BUILD? @echo 'set build_triplet $(build_triplet)' >>site.tmp -?HOST? @echo 'set host_alias "$(host_alias)"' >>site.tmp -?HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp -?TARGET? @echo 'set target_alias "$(target_alias)"' >>site.tmp -?TARGET? @echo 'set target_triplet $(target_triplet)' >>site.tmp +?BUILD? echo 'set build_alias "$(build_alias)"'; \ +?BUILD? echo 'set build_triplet $(build_triplet)'; \ +?HOST? echo 'set host_alias "$(host_alias)"'; \ +?HOST? echo 'set host_triplet $(host_triplet)'; \ +?TARGET? echo 'set target_alias "$(target_alias)"'; \ +?TARGET? echo 'set target_triplet $(target_triplet)'; \ ## Allow the package author to extend site.exp. - @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ - echo "## Begin content included from file $$f. Do not modify. ##" \ - && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ - && echo "## End content included from file $$f. ##" \ - || exit 1; \ - done >> site.tmp - @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp - @if test -f site.exp; then \ - sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ - fi - @-rm -f site.bak - @test ! -f site.exp || mv site.exp site.bak - @mv site.tmp site.exp + list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; \ + for f in $$list; do \ + echo "## Begin content included from file $$f. Do not modify. ##"; \ + cat `test -f "$$f" || echo '$(srcdir)/'`$$f; \ + echo "## End content included from file $$f. ##"; \ + done; \ + echo "## End of auto-generated content; you can edit from here. ##"; \ + if test -f site.exp; then \ + sed -e '1,/^## End of auto-generated content.*##/d' site.exp; \ + fi; \ + ) >site.tmp; \ + rm -f site.bak; \ + test ! -f site.exp || mv site.exp site.bak; \ + mv site.tmp site.exp ## ---------- ## ## Cleaning. ## |