From: pcm <pcm...@us...> - 2005-05-11 01:10:56
|
Update of /cvsroot/javapathfinder/javapathfinder/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14852 Modified Files: jpf-dot Log Message: updated jpf-dot script Index: jpf-dot =================================================================== RCS file: /cvsroot/javapathfinder/javapathfinder/bin/jpf-dot,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- jpf-dot 26 Apr 2005 19:43:03 -0000 1.1.1.1 +++ jpf-dot 11 May 2005 01:10:42 -0000 1.2 @@ -13,52 +13,54 @@ #if we have class files, we probably want to use those first CP=$JPF_HOME/build/jpf CP=$CP:$JPF_HOME/build/test -#otherwise, we look for the jar (binary distributions) -CP=$CP:$JPF_HOME/lib/jpf.jar - -#those are the external libs we use at runtime -CP=$CP:$JPF_HOME/lib/bcel.jar -CP=$CP:$JPF_HOME/lib/md5-twmacinta.jar -CP=$CP:$JPF_HOME/lib/edu.jar -CP=$CP:$JPF_HOME/lib/scale.jar -CP=$CP:$JPF_HOME/lib/xercesImpl.jar:$JPF_HOME/lib/xmlParserAPIs.jar - -#our standard native peer environment -# * For our source distribution. -CP=$CP:$JPF_HOME/build/env/jvm -# * For our binary dirtribution -CP=$CP:$JPF_HOME/lib/env_jvm.jar +#add (recursively) any *.jar or *.zip that's under $JPF_HOME/lib +#note that those take precedence over what already is in the classpath +if test -d "$JPF_HOME/lib"; then + CP=$CP:`find "$JPF_HOME"/lib \( -name "*.jar" -or -name "*.zip" \) -exec echo -n {}":" \;` +fi -# * For C runtime environment (source distribution) -CP=$CP:$JPF_HOME/build/env/c-runtime +if test -d "$JPF_HOME/extensions"; then + CP=$CP:`find "$JPF_HOME"/extensions \( -name "*.jar" -or -name "*.zip" \) -exec echo -n {}":" \;` +fi -# * For c_runtime environment -CP=$CP:$JPF_HOME/build/lib/env_c_runtime.jar +#our standard native peer environment (just the peer, NOT the model classes) +CP=$CP:$JPF_HOME/build/env/jvm #Examples -CP=$CP:$JPF_HOME/examples CP=$CP:$JPF_HOME/build/examples -#add the global CLASSPATH - +#append the global CLASSPATH if $_cygwin; then CP=`cygpath --path --windows "$CP"` + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"` CP="$CP;$CLASSPATH" - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` else CP="$CP:$CLASSPATH" fi -BCP=$JPF_HOME/build/env/jpf:$JPF_HOME/lib/env_jpf.jar -if $_cygwin; then - BCP=`cygpath --path --windows "$BCP"` +#now check if we find our mandatory jars +if test ! `expr "$CP" : ".*\(bcel[^\.]*\.jar\).*"`; then + echo "*** you don't seem to have bcel.jar in your CLASSPATH, please fix ***" + exit +fi +if test ! `expr "$CP" : ".*\(xercesImpl\.jar\).*"`; then + echo "*** you don't seem to have the Xerces libs in your CLASSPATH, please fix ***" + exit fi +#no good way to check for the MD5 since it could be a zip, a jar, or just a path -# StateSpaceDot tool options -SSDO="-show-source -transition-numbers" +if test -z $JVM_FLAGS; then + JVM_FLAGS="-Xmx1024m" +fi -JVM_FLAGS="-Xmx1024m" +java $JVM_FLAGS -classpath "$CP" gov.nasa.jpf.JPF "$@" -java $JVM_FLAGS -classpath "$CP" $JPF_JVM_FLAGS gov.nasa.jpf.tools.StateSpaceDot $SSDO -jpf-bootclasspath "$BCP" $@ + +# StateSpaceDot tool options +if test -z $SSDOT_FLAGS; then + SSDOT_FLAGS="-show-source -transition-numbers" +fi + +java $JVM_FLAGS -classpath "$CP" gov.nasa.jpf.tools.StateSpaceDot "$SSDOT_FLAGS" $@ |