[ovs-dev] [PATCH] Makefile.am: Always use C locale for "sort" and "comm".
Ben Pfaff
blp at nicira.com
Tue Dec 24 16:39:24 UTC 2013
Otherwise, if the user changes locales between running the "dist-hook-git"
and "distfiles" targets (e.g. in different invocations of "make"), then
the "dist-hook-git" target might falsely report that the distribution is
missing files.
Reported-by: John Darrington <john at darrington.wattle.id.au>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
AUTHORS | 1 +
Makefile.am | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 7539b1a..4c6c365 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -183,6 +183,7 @@ Jeff Merrick jmerrick at vmware.com
Jeongkeun Lee jklee at hp.com
Jian Qiu swordqiu at gmail.com
Joan Cirer joan at ev0.net
+John Darrington john at darrington.wattle.id.au
John Galgay john at galgay.net
John Hurley john.hurley at netronome.com
Kevin Mancuso kevin.mancuso at rackspace.com
diff --git a/Makefile.am b/Makefile.am
index 0faed67..bafd810 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,10 +158,10 @@ dist-hook-git: distfiles
@if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
(cd datapath && $(MAKE) distfiles); \
(cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \
- sort -u > all-distfiles; \
+ LC_ALL=C sort -u > all-distfiles; \
(cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \
- sort -u > all-gitfiles; \
- comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \
+ LC_ALL=C sort -u > all-gitfiles; \
+ LC_ALL=C comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \
if test -s missing-distfiles; then \
echo "The distribution is missing the following files:"; \
cat missing-distfiles; \
@@ -176,7 +176,8 @@ distfiles: Makefile
list='$(DISTFILES)'; \
for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | sort -u > $@
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | \
+ LC_ALL=C sort -u > $@
CLEANFILES += distfiles
endif
.PHONY: dist-hook-git
--
1.7.10.4
More information about the dev
mailing list