1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
From e0c1c414ac05564c73ac4fb4cbe42a8e826c1489 Mon Sep 17 00:00:00 2001
From: Reiner Herrmann <reiner@reiner-h.de>
Date: Mon, 29 Feb 2016 14:45:02 +0100
Subject: [PATCH] Make sorting independent of locale
Sort behaves differently depending on the configured locale.
To get reproducible results, sort the file lists with the C locale.
Closes: #792856
---
src/gen-makefile-am.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gen-makefile-am.sh b/src/gen-makefile-am.sh
index 70f3be9..9bdb9ed 100755
--- a/src/gen-makefile-am.sh
+++ b/src/gen-makefile-am.sh
@@ -74,7 +74,7 @@ LIBSYNTHESIS_SOURCES=`find ${ENGINE_SOURCES} \
sysync_SDK/DB_Interfaces/text_db \
\( -name '*.cpp' -o -name '*.[ch]' \) |
grep -v -E -f EXCLUDE_FILES |
- sort`
+ LC_ALL=C sort`
LIBSYNTHESIS_SOURCES=`echo $LIBSYNTHESIS_SOURCES`
# files to be included in both libsynthesis and libsynthesissdk;
@@ -84,7 +84,7 @@ cat SERVER_FILES CLIENT_FILES EXTRA_FILES > EXCLUDE_FILES
LIBSYNTHESISSDK_SOURCES_BOTH=`find sysync_SDK/Sources \
\( -name '*.cpp' -o -name '*.c' \) |
grep -v -E -f EXCLUDE_FILES |
- sort`
+ LC_ALL=C sort`
LIBSYNTHESISSDK_SOURCES_BOTH=`echo $LIBSYNTHESISSDK_SOURCES_BOTH`
# files only needed in libsynthesissdk
@@ -93,7 +93,7 @@ LIBSYNTHESISSDK_SOURCES_ONLY=`find sysync_SDK/Sources \
\( -name '*.cpp' -o -name '*.c' \) |
grep -E -f SDK_FILES |
grep -v -E -f EXCLUDE_FILES |
- sort`
+ LC_ALL=C sort`
LIBSYNTHESISSDK_SOURCES_ONLY=`echo $LIBSYNTHESISSDK_SOURCES_ONLY`
# files needed in libsmltk
@@ -101,12 +101,12 @@ LIBSMLTK_SOURCES=`find syncml_tk \
\( -name '*.cpp' -o -name '*.[ch]' \) \
\! \( -path syncml_tk/src/sml/\*/palm/\* -o \
-path syncml_tk/src/sml/\*/win/\* \) |
- sort`
+ LC_ALL=C sort`
LIBSMLTK_SOURCES=`echo $LIBSMLTK_SOURCES`
# header files required for using libsynthesissdk,
# with "synthesis/" prefix
-LIBSYNTHESISSDK_HEADERS=`find sysync_SDK/Sources -name '*.h' | sed -e 's;.*/;synthesis/;' | sort`
+LIBSYNTHESISSDK_HEADERS=`find sysync_SDK/Sources -name '*.h' | sed -e 's;.*/;synthesis/;' | LC_ALL=C sort`
LIBSYNTHESISSDK_HEADERS=`echo $LIBSYNTHESISSDK_HEADERS`
sed -e "s;@LIBSYNTHESIS_SOURCES@;$LIBSYNTHESIS_SOURCES;" \
|