summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-10-31 19:12:59 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-10-31 19:12:59 (GMT)
commit2fc7d865887385495ae545d11ca9e5ff630a75fe (patch)
treec07b6745852ac1d7337613b834213d88f19149d5
parent88b792776f70fcf70a19258bb1c251eb4dcf84a9 (diff)
downloadhdf5-2fc7d865887385495ae545d11ca9e5ff630a75fe.zip
hdf5-2fc7d865887385495ae545d11ca9e5ff630a75fe.tar.gz
hdf5-2fc7d865887385495ae545d11ca9e5ff630a75fe.tar.bz2
[svn-r11640] Purpose:
New feature Description: A tool to fix configure file so that it can launch configure testing executable via the proper launching command, e.g., yod. (Thus the name yodconfigure is used.) Tested: Red Storm, both parallel and serial configure.
-rwxr-xr-xbin/yodconfigure46
1 files changed, 46 insertions, 0 deletions
diff --git a/bin/yodconfigure b/bin/yodconfigure
new file mode 100755
index 0000000..639cf2e
--- /dev/null
+++ b/bin/yodconfigure
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Fix configure file so that it can launch configure testing executable
+# via the proper launching command, e.g., yod. (Thus the name yodconfigure
+# is used.)
+#
+# Author: Albert Cheng
+# Email acheng@hdfgroup.org if you have improvement, suggestios, questions, ...
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <configure file>"
+ exit 1
+fi
+confile=$1
+
+if [ ! -w $confile ]; then
+ echo "$0: $confile is not writable"
+ exit 1
+fi
+
+# Insert the ACTRY function after the 1st line which is the #!/bin/sh.
+# Change all "eval $ac_try" commands to call ACTRY.
+#
+ed - $confile <<'EOF'
+1a
+# ===inserted by yodconfigure ====
+# ACTRY will figure out when it is approprirate to run the command by the
+# $RUNSERIAL launcher (e.g., yod -sz 1) and when to just run it as is.
+# So far, ./a.out and ./conftest are names of real executable that should
+# be run by $RUNSERIAL.
+#
+# (uncomment the echo line if you want to see what is going on.)
+ACTRY()
+{
+#echo ACTRY: args are: $* > /dev/tty
+if [ "$1" = ./a.out -o "$1" = ./conftest ]; then
+# echo $RUNSERIAL $* > /dev/tty
+ $RUNSERIAL $*
+else
+ $*
+fi
+}
+.
+g/eval $ac_try/s/eval/eval ACTRY/p
+w
+q
+EOF