don't blow away conv-mach-opt.[h, sh] when doing second build.
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 22 Jul 2003 18:00:32 +0000 (18:00 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 22 Jul 2003 18:00:32 +0000 (18:00 +0000)
build

diff --git a/build b/build
index 59e290d7c10ed5677a5a2e34dd7e5d28b973214c..0f656112062004ec60296de742f413ea5be6f6cd 100755 (executable)
--- a/build
+++ b/build
@@ -222,10 +222,13 @@ chmod +x $ConvUsr
 # Create conv-mach-opt headers with special build-time options
 ConvHeader="$VERSION/tmp/conv-mach-opt.h"
 ConvSh="$VERSION/tmp/conv-mach-opt.sh"
-echo "Generating $ConvHeader, conv-mach-opt.sh"
-echo '/* Build-time options header, automatically generated by charm/build*/'> $ConvHeader
-echo '# Built-time options header, automatically generated by charm/build'> $ConvSh
-echo '[ -z "$CHARMINC" ] && CHARMINC="."' >> $ConvSh
+if [ ! -f $ConvSh -o ! -f $ConvHeader ]
+then
+  echo "Generating $ConvHeader, conv-mach-opt.sh"
+  echo '/* Build-time options header, automatically generated by charm/build*/'> $ConvHeader
+  echo '# Built-time options header, automatically generated by charm/build'> $ConvSh
+  echo '[ -z "$CHARMINC" ] && CHARMINC="."' >> $ConvSh
+fi
 if test -n "$COMPILER"
 then
       i="$COMPILER"