summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-15 06:54:15 +0000
committerJim Meyering <jim@meyering.net>2003-08-15 06:54:15 +0000
commitdcdee393d78dcd78cebffa148acff2eb7cf6eac2 (patch)
tree67d759f2c9d6fcb3c05f019ee6d5950eaf1feed3
parent2faafb85123a032357c4a01678feb9f65bbdcb52 (diff)
downloadcoreutils-dcdee393d78dcd78cebffa148acff2eb7cf6eac2.tar.xz
.
-rw-r--r--man/Makefile.in11
-rw-r--r--src/Makefile.in9
-rw-r--r--tests/Makefile.in7
3 files changed, 21 insertions, 6 deletions
diff --git a/man/Makefile.in b/man/Makefile.in
index 7a3958b8c..ef1d2dd64 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -181,10 +181,15 @@ SUFFIXES = .x .1
t = $*.td
mapped_name = `echo $*|sed 's/install/ginstall/; s/test/[/'`
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
programs = \
echo 'spy:;@echo $$(all_programs)' \
| MAKEFLAGS= $(MAKE) -s -C $(srcdir)/../src -f Makefile -f - spy \
- | fmt -1 | sort -u | grep -v '\['
+ | fmt -1 | $(ASSORT) -u | grep -v '\['
subdir = man
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -492,8 +497,8 @@ check-local: check-x-vs-1 check-programs-vs-x
check-x-vs-1:
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=ls-files.$$$$; \
- (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | sort > $$t; \
- echo $(dist_man_MANS) | fmt -w1 | sed 's/\.1$$//' | sort -u \
+ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
+ echo $(dist_man_MANS) | fmt -w1 | sed 's/\.1$$//' | $(ASSORT) \
| diff - $$t || { rm $$t; exit 1; }; \
rm $$t
diff --git a/src/Makefile.in b/src/Makefile.in
index 08663cf57..72979b9db 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -280,6 +280,11 @@ all_programs = \
$(EXTRA_PROGRAMS)
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
pm = progs-makefile
pr = progs-readme
@@ -1587,7 +1592,7 @@ check: check-README check-misc
check-README:
rm -rf $(pr) $(pm)
echo $(all_programs) \
- | tr -s ' ' '\n' | sort -u > $(pm)
+ | tr -s ' ' '\n' | $(ASSORT) -u > $(pm) && \
sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
| sed -n '/^ */s///p' | tr -s ' ' '\n' > $(pr)
diff $(pm) $(pr) && rm -rf $(pr) $(pm)
@@ -1619,7 +1624,7 @@ check-misc:
prog=`echo $$i|sed 's/\.c$$//'`; \
echo "$$prog: $$a"; \
fi; \
- done | sort -u ) > $@-t
+ done | $(ASSORT) -u ) > $@-t
chmod a-w $@-t
mv $@-t $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 4d972ca3f..96ee63575 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -152,10 +152,15 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
all_programs = \
echo 'spy:;@echo $$(all_programs)' \
| MAKEFLAGS= $(MAKE) -s -C ../src -f Makefile -f - spy \
- | fmt -1 | sort -u
+ | fmt -1 | $(ASSORT) -u
TESTS = help-version