* milena/tests/unit_test/build_unit_test.sh,
* scribo/tests/unit_test/build_unit_test.sh
(LC_ALL): Set envvar to C.
* milena/generate_dist_headers.sh,
* milena/doc/generate_dist_files.sh:
Likewise.
Use plain `sort' instead of `sort -d'.
---
ChangeLog | 12 ++++++++++++
milena/doc/generate_dist_files.sh | 5 ++++-
milena/generate_dist_headers.sh | 7 +++++--
milena/tests/unit_test/build_unit_test.sh | 2 ++
scribo/tests/unit_test/build_unit_test.sh | 2 ++
5 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 28f856d..d11b7d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-05-27 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Improve determinism of Makefile helpers generators.
+
+ * milena/tests/unit_test/build_unit_test.sh,
+ * scribo/tests/unit_test/build_unit_test.sh
+ (LC_ALL): Set envvar to C.
+ * milena/generate_dist_headers.sh,
+ * milena/doc/generate_dist_files.sh:
+ Likewise.
+ Use plain `sort' instead of `sort -d'.
+
2009-05-22 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
* configure.ac: Configure milena/tests/core/image/dmorph.
diff --git a/milena/doc/generate_dist_files.sh b/milena/doc/generate_dist_files.sh
index fdef488..9c77f20 100755
--- a/milena/doc/generate_dist_files.sh
+++ b/milena/doc/generate_dist_files.sh
@@ -8,13 +8,16 @@
## would be to only emit lines ended with newlines.
ECHO_N=printf
+# Use the C locale to have a deterministic sort.
+export LC_ALL=C
+
for dir in figures outputs examples; do
OUT="$dir/$dir.mk"
echo "## Generated by ../generate_dist_files, do not modify." > $OUT
echo >>$OUT
$ECHO_N "EXTRA_DIST += " >> $OUT
for ftype in cc.raw p*m txt; do
- for file in `find $dir -mindepth 1 -name *.$ftype | sort -d `; do
+ for file in `find $dir -mindepth 1 -name *.$ftype | sort`; do
echo " \\" >> $OUT
$ECHO_N $file >> $OUT
done
diff --git a/milena/generate_dist_headers.sh b/milena/generate_dist_headers.sh
index d6cfa4d..6f72a5f 100755
--- a/milena/generate_dist_headers.sh
+++ b/milena/generate_dist_headers.sh
@@ -4,14 +4,17 @@
# ------------------------------
# List all the headers in order to make them part of distribution.
+# Use the C locale to have a deterministic sort.
+export LC_ALL=C
+
echo "## Generated by ./generate_dist_headers, do not modify ##" >
headers.mk
echo "" >> headers.mk
echo "nobase_include_HEADERS = \\" >> headers.mk
echo "mln/version.hh \\" >> headers.mk
echo "generating headers.mk"
-find mln -type f -name '*.hh'| grep -v "\.svn" | sed -e 's/$/
\\/g' | sort -d >> headers.mk
-find mln -type f -name '*.hxx'| grep -v "\.svn" | sed -e 's/$/
\\/g'| sort -d >> headers.mk
+find mln -type f -name '*.hh'| grep -v "\.svn" | sed -e 's/$/
\\/g' | sort >> headers.mk
+find mln -type f -name '*.hxx'| grep -v "\.svn" | sed -e 's/$/
\\/g'| sort >> headers.mk
last_line=`tail -n 1 headers.mk | sed -e 's/\\\//g'` # remove '\' in last
line
sed '$d' < headers.mk > headers.mk.tmp # remove last line
diff --git a/milena/tests/unit_test/build_unit_test.sh
b/milena/tests/unit_test/build_unit_test.sh
index 310823d..dee4436 100755
--- a/milena/tests/unit_test/build_unit_test.sh
+++ b/milena/tests/unit_test/build_unit_test.sh
@@ -8,6 +8,8 @@
## would be to only emit lines ended with newlines.
ECHO_N=printf
+# Use the C locale to have a deterministic sort.
+export LC_ALL=C
test $# -eq 1 || { echo "Usage: $0 <mln path>" && exit 1; }
diff --git a/scribo/tests/unit_test/build_unit_test.sh
b/scribo/tests/unit_test/build_unit_test.sh
index 7c80671..87863e3 100755
--- a/scribo/tests/unit_test/build_unit_test.sh
+++ b/scribo/tests/unit_test/build_unit_test.sh
@@ -8,6 +8,8 @@
## would be to only emit lines ended with newlines.
ECHO_N=printf
+# Use the C locale to have a deterministic sort.
+export LC_ALL=C
test $# -eq 1 || { echo "Usage: $0 <scribo path>" && exit 1; }
--
1.6.1.2