Commit 01dac007 authored by Roland Levillain's avatar Roland Levillain
Browse files

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'.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@3891 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 261f571d
2009-05-27 Roland Levillain <roland@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@lrde.epita.fr>
* configure.ac: Configure milena/tests/core/image/dmorph.
......
......@@ -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
......
......@@ -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
......
......@@ -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; }
......
......@@ -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; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment