diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-03 00:59:56 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-03 01:00:29 -0700 |
commit | 7f4e28a8634e1057b9239683e68ca12dd3ff1581 (patch) | |
tree | 06c496149b68cb2f807c8f5062c66514bb6b4569 /tests/Makefile.am | |
parent | c767ed70eca9a82d76f07dcdbcaafa21ec7f86d6 (diff) | |
download | grep-7f4e28a8634e1057b9239683e68ca12dd3ff1581.tar.gz |
tests: test egrep/fgrep help only if our grep
Problem reported by Christian Weisgerber in: http://bugs.gnu.org/23146
* tests/Makefile.am (TESTS_ENVIRONMENT):
Test egrep and fgrep only if they use our grep.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 0326ff4e..b65fc390 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -182,6 +182,14 @@ TESTS_ENVIRONMENT = \ done; \ }; \ fi; \ + \ + : 'Test egrep/fgrep help if they use our grep.'; \ + grep=`echo grep | sed -e '$(transform)'` || exit; \ + if test "$$grep" = grep; then \ + built_programs='grep egrep fgrep'; \ + else \ + built_programs='grep'; \ + fi; \ \ export_with_values \ VERSION='$(VERSION)' \ @@ -193,7 +201,7 @@ TESTS_ENVIRONMENT = \ abs_top_builddir='$(abs_top_builddir)' \ abs_top_srcdir='$(abs_top_srcdir)' \ abs_srcdir='$(abs_srcdir)' \ - built_programs='grep egrep fgrep' \ + built_programs="$$built_programs" \ srcdir='$(srcdir)' \ top_srcdir='$(top_srcdir)' \ CC='$(CC)' \ |