diff options
| author | Paul Eggert | 2015-05-18 18:05:26 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-05-18 18:06:05 -0700 |
| commit | 88e4dfaadb1daf6f1ce0e80442af5a2dae7853bc (patch) | |
| tree | e63c6562470a5528752edbc2319e65cec0d0dbdc | |
| parent | d464818ca2fdae2655a312c0f3fa8b66481c6522 (diff) | |
| download | emacs-88e4dfaadb1daf6f1ce0e80442af5a2dae7853bc.tar.gz emacs-88e4dfaadb1daf6f1ce0e80442af5a2dae7853bc.zip | |
Don't skip new etags tests on non-UTF-8 hosts
Problem reported by Eli Zaretskii for MS-Windows.
* test/etags/Makefile (UTF8_LOCALE, UTF8_ENCODING): Remove.
(LC_ALL): Set to C if the current locale isn't UTF-8.
(.PHONY): Remove ediff_1 thru ediff_5.
(check): Always run.
| -rw-r--r-- | test/etags/Makefile | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/test/etags/Makefile b/test/etags/Makefile index 3f4ad7b7035..4a01c280bf0 100644 --- a/test/etags/Makefile +++ b/test/etags/Makefile | |||
| @@ -44,31 +44,24 @@ ARGS=- < srclist | |||
| 44 | 44 | ||
| 45 | infiles = $(filter-out ${NONSRCS},${SRCS}) srclist regexfile | 45 | infiles = $(filter-out ${NONSRCS},${SRCS}) srclist regexfile |
| 46 | 46 | ||
| 47 | # This test requires a UTF-8 locale. Use the current locale if it is UTF-8, | 47 | # Although this test uses UTF-8 data, some platforms lack UTF-8 locales. |
| 48 | # else $(UTF8_LOCALE) if it works, else skip this test. | 48 | # If the current locale isn't known to use UTF-8, fall back on the C locale. |
| 49 | UTF8_LOCALE = en_US.utf8 | 49 | # Although the C locale in theory is not safe for UTF-8 data, in practice |
| 50 | UTF8_ENCODING = yes | 50 | # it should be good enough. |
| 51 | ifneq ($(shell locale -k charmap), charmap="UTF-8") | 51 | ifneq ($(shell locale -k charmap), charmap="UTF-8") |
| 52 | ifeq ($(shell LC_ALL=$(UTF8_LOCALE) locale -k charmap), charmap="UTF-8") | 52 | export LC_ALL = C |
| 53 | export LC_ALL = $(UTF8_LOCALE) | ||
| 54 | else | ||
| 55 | UTF8_ENCODING = no | ||
| 56 | endif | ||
| 57 | endif | 53 | endif |
| 58 | 54 | ||
| 59 | .PHONY: check ediff_1 ediff_2 ediff_3 ediff_4 ediff_5 cdiff ETAGS CTAGS | 55 | .PHONY: check cdiff ETAGS CTAGS |
| 56 | # Can't make ediff_1 through ediff_5 .PHONY, as they're implicit. | ||
| 60 | 57 | ||
| 61 | check: | 58 | check: |
| 62 | ifeq ($(UTF8_ENCODING), yes) | ||
| 63 | @$(MAKE) OPTIONS='--no-members' ediff_1 | 59 | @$(MAKE) OPTIONS='--no-members' ediff_1 |
| 64 | @$(MAKE) OPTIONS='--declarations --no-members' ediff_2 | 60 | @$(MAKE) OPTIONS='--declarations --no-members' ediff_2 |
| 65 | @$(MAKE) OPTIONS='--members' ediff_3 | 61 | @$(MAKE) OPTIONS='--members' ediff_3 |
| 66 | @$(MAKE) OPTIONS='--regex=@regexfile --no-members' ediff_4 | 62 | @$(MAKE) OPTIONS='--regex=@regexfile --no-members' ediff_4 |
| 67 | @$(MAKE) OPTIONS='nonexistent --members --declarations --regex=@regexfile' ediff_5 | 63 | @$(MAKE) OPTIONS='nonexistent --members --declarations --regex=@regexfile' ediff_5 |
| 68 | @$(MAKE) cdiff | 64 | @$(MAKE) cdiff |
| 69 | else | ||
| 70 | : 'No locale with UTF-8 found; skipping check' | ||
| 71 | endif | ||
| 72 | 65 | ||
| 73 | ediff%: ETAGS.good% ETAGS ${infiles} | 66 | ediff%: ETAGS.good% ETAGS ${infiles} |
| 74 | diff -u --suppress-common-lines --width=80 ETAGS.good$* ETAGS | 67 | diff -u --suppress-common-lines --width=80 ETAGS.good$* ETAGS |