diff options
author | Jim Meyering <meyering@redhat.com> | 2009-04-23 08:45:51 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-04-23 21:02:43 +0200 |
commit | f41f926aab38d52734b3908eeb0496ebf1285cbd (patch) | |
tree | 8f6471a9eea56d6d5a16bdd3deccc67c9b881e6a | |
parent | cbc4d9bd1366b0ed277b5dfe2585d22d4070e969 (diff) | |
download | coreutils-f41f926aab38d52734b3908eeb0496ebf1285cbd.tar.xz |
tests: make the check-AUTHORS test more portable, now that it's...
run as part of "make check".
* src/Makefile.am (check-AUTHORS): Don't depend on en_US.UTF-8.
Instead, use the French UTF8 locale, if configure found one.
If not found, just skip the test.
-rw-r--r-- | src/Makefile.am | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index be134be01..a266d7b31 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -382,12 +382,17 @@ check-duplicate-no-install: tr test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`" # Ensure that the list of programs and author names is accurate. +# We need a UTF8 locale, and any one should do, but since configure +# already tries to find a French one, use it. It's fine to skip this test. au_dotdot = authors-dotdot au_actual = authors-actual .PHONY: check-AUTHORS check-AUTHORS: $(all_programs) - @rm -f $(au_actual) $(au_dotdot) - @for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \ + @locale='$(LOCALE_FR_UTF8)'; \ + case "$$locale" in \ + ''|none) echo "$@: skipping this check"; exit 0;; esac; \ + rm -f $(au_actual) $(au_dotdot); \ + for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \ | $(ASSORT) -u`; do \ test "$$i" = '[' && continue; \ exe=$$i; \ @@ -396,7 +401,7 @@ check-AUTHORS: $(all_programs) elif test "$$i" = test; then \ exe='['; \ fi; \ - LC_ALL=en_US.UTF-8 ./$$exe --version \ + LC_ALL="$$locale" ./$$exe --version \ | perl -0 -pi -e 's/,\n/, /gm' \ | sed -n -e '/Written by /{ s//'"$$i"': /;' \ -e 's/,* and /, /; s/\.$$//; p; }'; \ |