JPRED-2 Add alscript to the Git repository
[jpred.git] / sources / alscript / build
diff --git a/sources/alscript/build b/sources/alscript/build
new file mode 100755 (executable)
index 0000000..7b73dfc
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/csh
+#  csh script to compile the elements of alscript
+#  
+#  type ./build <machine>
+#
+#  e.g.  ./build sun  or ./build sgi or ./build gcc
+#
+# ./build linux
+#
+#  Note that BUILD linux should also work under cygwin, though 
+#  you will need to add --unix to the make arguments.
+#  In release 2.07 the cygwin binaries are included in the distribution.
+#
+#  This script will create a subdirectory /bin if it does not 
+#  already exist.  It will then create a subsub directory /bin/machine
+#  where executables for the architecture will be stored.
+#
+#  You should then add this directory to your path, or add links
+#  from a directory that is on your path (e.g. /usr/local/bin) 
+# 
+echo ""
+echo "Trying to build alscript for $1"
+echo ""
+if(! -e bin) then
+  echo "Creating bin directory"
+  mkdir bin
+endif
+if(! -e bin/$1) then
+  echo  "Creating subdirectory bin/$1"
+  mkdir bin/$1
+endif
+if(-e src/alscript.o) then
+       echo "Deleting old object files"
+       /bin/rm src/*.o
+endif
+echo "Copying Makefile"
+/bin/cp src/makefile.$1 src/makefile
+echo "Attempting make"
+make -C src
+echo ""
+echo "Moving executables to bin directory"
+echo ""
+/bin/mv src/alscript bin/$1
+/bin/mv src/msf2blc bin/$1
+/bin/mv src/clus2blc bin/$1
+/bin/mv src/fast2blc bin/$1
+/bin/mv src/alsnum bin/$1
+echo ""
+echo "Deleting object files"
+echo ""
+/bin/rm src/*.o gjutil/*.o
+echo ""
+echo " All should be complete!"
+echo ""