s3-modules: Fix the build of gpfs.c on RHEL 6.0 with gpfs 3.4.0-4
[Samba/gebeck_regimport.git] / buildtools / mktowscript / rebuild_all.sh
blobe3ed7cfd24dc1f2db4098a9a09c4ef59aad353d6
1 #!/bin/sh
3 cat mklist.txt |
4 while read line; do
5 ws=""
6 list=""
7 for f in $line; do
8 echo "Processing $f"
9 f="../../$f"
10 test -f $f || {
11 echo "$f doesn't exist"
12 exit 1
14 ws="$(dirname $f)/wscript_build"
15 if [ -f $ws ]; then
16 if test -s $ws && ! grep "AUTOGENERATED.by.mktowscript" $ws > /dev/null; then
17 echo "Skipping manually edited file $ws"
18 continue
21 list="$list $f"
22 done
23 if [ "$list" = "" ]; then
24 continue
26 ./mktowscript.pl $list > wscript_build.$$ || {
27 echo "Failed on $f"
28 rm -f wscript_build.$$
29 exit 1
31 if cmp wscript_build.$$ $ws > /dev/null 2>&1; then
32 rm -f wscript_build.$$
33 else
34 mv wscript_build.$$ $ws || exit 1
36 #exit 1
37 done