From: Ben Pfaff Date: Tue, 24 Dec 2013 16:37:32 +0000 (-0800) Subject: Makefile.am: Always use C locale for "sort" and "comm". X-Git-Tag: sliver-openvswitch-2.1.90-1~10^2~71 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a6da6967977daddbb68fbe170429f0b5385bde94;p=sliver-openvswitch.git Makefile.am: Always use C locale for "sort" and "comm". 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 Signed-off-by: Ben Pfaff --- diff --git a/AUTHORS b/AUTHORS index 7539b1af3..4c6c3655e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -183,6 +183,7 @@ Jeff Merrick jmerrick@vmware.com Jeongkeun Lee jklee@hp.com Jian Qiu swordqiu@gmail.com Joan Cirer joan@ev0.net +John Darrington john@darrington.wattle.id.au John Galgay john@galgay.net John Hurley john.hurley@netronome.com Kevin Mancuso kevin.mancuso@rackspace.com diff --git a/Makefile.am b/Makefile.am index 6acb0a6b4..857708f0c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -164,10 +164,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; \ @@ -182,7 +182,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