add edu.berkeley.sbp.misc.TestAstGenerator
[sbp.git] / Makefile
index da56cde..c3642cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,95 +1,94 @@
 
 java = java -Xmx900m
 
+default: edu.berkeley.sbp.jar
+
 tibdoc: edu.berkeley.sbp.jar
        $(java) -cp $< edu.berkeley.sbp.tib.TibDoc \
                tests/tibdoc.g \
                tests/bitstream.tib
 
+java15: edu.berkeley.sbp.jar
+       $(java) -cp $< edu.berkeley.sbp.misc.Java15 \
+               tests/java15.g \
+               tests/java15.test
+
 demo: edu.berkeley.sbp.jar
        $(java) -cp $< edu.berkeley.sbp.misc.Demo \
                tests/demo.g \
                '(11+2*3)-44'
 
+demo2: edu.berkeley.sbp.jar
+       $(java) -cp $< edu.berkeley.sbp.misc.Demo2
+
+ast: edu.berkeley.sbp.jar
+       $(java) -cp $< edu.berkeley.sbp.misc.TestAstGenerator tests/math.g
+
 regress:
        make boot
        rm edu.berkeley.sbp.jar
        make test
 
-profile: edu.berkeley.sbp.jar
-       $(java) -agentlib:yjpagent \
-               -cp $< edu.berkeley.sbp.misc.RegressionTests \
-               -profile \
-               tests/meta.g \
-               tests/testcase.g \
-               tests/regression.tc
-
+#-Dsbp.verbose=true
 test: edu.berkeley.sbp.jar
        $(java) -cp $< edu.berkeley.sbp.misc.RegressionTests \
-               tests/meta.g \
+               src/edu/berkeley/sbp/meta/meta.g \
                tests/testcase.g \
                tests/regression.tc
 
-archscript: edu.berkeley.sbp.jar
-       cd tests; \
-       $(java) -cp ArchSimA3.jar:../$< ArchScript \
-               test.archscript
-
-codebag: edu.berkeley.sbp.jar
-       cd tests; \
-       $(java) -cp ArchSimA3.jar:../$< CodeBagParser \
-               test.fleet
-
-javatest: edu.berkeley.sbp.jar
-       $(java) -cp $< edu.berkeley.sbp.misc.RegressionTests \
-               tests/meta.g \
-               tests/testcase.g \
-               tests/java.tc
-
-loop: edu.berkeley.sbp.jar
-       $(java) -cp $< edu.berkeley.sbp.misc.RegressionTests \
-               -graph \
-               tests/meta.g \
-               tests/testcase.g \
-               tests/loop.tc
-
-pain: edu.berkeley.sbp.jar
-       $(java) -cp $< edu.berkeley.sbp.misc.RegressionTests \
-               -graph \
-               tests/meta.g \
-               tests/testcase.g \
-               tests/pain.tc
-
-ifthen: edu.berkeley.sbp.jar
-       $(java) -cp $< edu.berkeley.sbp.misc.RegressionTests \
-               tests/meta.g \
+profile: edu.berkeley.sbp.jar
+       $(java) -agentpath:/Applications/YourKit.app/bin/mac/libyjpagent.jnilib -cp $< edu.berkeley.sbp.misc.RegressionTests \
+               -profile \
+               src/edu/berkeley/sbp/meta/meta.g \
                tests/testcase.g \
-               tests/ifthen.tc
+               tests/regression.tc
 
 boot: edu.berkeley.sbp.jar
        cd src; \
        $(java) -cp ../$< \
                edu.berkeley.sbp.meta.MetaGrammar \
-               ../tests/meta.g \
+               ../src/edu/berkeley/sbp/meta/meta.g \
                edu.berkeley.sbp.meta.MetaGrammar
 
 edu.berkeley.sbp.jar: $(shell find src -name \*.java)
        mkdir -p bin
-       javac -cp javax.servlet.jar:tests/ArchSimA3.jar:tests/grappa.jar -d bin -sourcepath src $^
-       cd bin; jar cf ../$@ .
-
+       javac  -cp javax.servlet.jar -d bin -sourcepath src $^
+       echo 'Main-Class: edu.berkeley.sbp.misc.CommandLine' > bin/manifest
+       cd bin; jar cmf manifest ../$@ .
+#-Xlint:unchecked
 javadoc:
        rm -rf doc/api
        mkdir -p doc/api
-       javadoc -sourcepath src -public -d doc/api `find src -name \*.java`
+       javadoc \
+               -linksource \
+               -windowtitle "SBP: the Scannerless Boolean Parser" \
+               -sourcepath src \
+               -header "<b>SBP </b><br>v1.0" \
+               -public \
+               -notree \
+               -noindex \
+               -nonavbar \
+               -stylesheetfile doc/javadoc.css \
+               -noqualifier all \
+               -d doc/api \
+               edu.berkeley.sbp
+       javadoc \
+               -linksource \
+               -windowtitle "SBP: the Scannerless Boolean Parser" \
+               -sourcepath src \
+               -header "<b>SBP </b><br>v1.0" \
+               -public \
+               -notree \
+               -noindex \
+               -nonavbar \
+               -noqualifier all \
+               -d doc/api \
+               edu.berkeley.sbp.meta \
+               edu.berkeley.sbp.chr \
+               edu.berkeley.sbp.misc \
+               edu.berkeley.sbp.util
 
 clean:
        rm -rf doc/api edu.berkeley.sbp.jar bin edu.berkeley.sbp.tar.gz
-
-upload:
-       make clean
-       make javadoc
-       darcs dist
-       echo '<html><head><meta HTTP-EQUIV="Refresh" CONTENT="0;URL=doc/sbp.html"></head></html>' > index.html
-       rsync -are ssh --progress --verbose --delete ./ argus.cs.berkeley.edu:public_html/sbp/
+       rm -rf Makefile.bak *.hi *.o *.class *.jar Header_*.hs Class_*.hs *_JVM.hs InterfaceMyClass