Skip to content

Commit

Permalink
Works without proguard now
Browse files Browse the repository at this point in the history
  • Loading branch information
colder committed Oct 5, 2012
1 parent bb3b3a4 commit f75749e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lib/cup/dist/java-cup-11a.jar
lib/cup/java/parser.java
lib/cup/java/sym.java
lib/cup/dist
lib/phantm-files.jar
*.out
*.dump
target/
Expand Down
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ warning:
@ echo "To (re)compile scala/java code, use 'sbt package'"


bootstrap: setup build_cup cup jflex
bootstrap: setup build_cup cup jflex makejar

setup:
@ test -d classes || mkdir classes
Expand All @@ -20,3 +20,17 @@ cup:

jflex:
java -jar bin/JFlex.jar -d src/main/java/phantm/parser/ -nobak spec/php.jflex

makejar:
@ mkdir -p tmp/spec tmp/tables
@ echo -n "<build><version>" > tmp/build.xml
@ grep -o 'version := ".\+"' build.sbt | cut -d'"' -f2 >> tmp/build.xml
@ echo -n "</version><date>" >> tmp/build.xml
@ date >> tmp/build.xml
@ echo -n "</date></build>" >> tmp/build.xml
@ cp spec/internal_api.xml tmp/spec
@ cp src/main/java/phantm/parser/action_table.bin tmp/tables
@ cp src/main/java/phantm/parser/production_table.bin tmp/tables
@ cp src/main/java/phantm/parser/reduce_table.bin tmp/tables
jar cf lib/phantm-files.jar -C tmp build.xml -C tmp spec -C tmp tables
@ rm -rf tmp
3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.4")
2 changes: 1 addition & 1 deletion src/main/scala/phantm/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ object Main {
def version = {
val data = XML.load(getClass().getClassLoader().getResourceAsStream("build.xml"))

println("phantm "+(data \ "version").text+" (built: "+(data \ "date").text+")")
println("phantm "+(data \ "version").text.trim+" (built: "+(data \ "date").text.trim+")")
}

def usage = {
Expand Down

0 comments on commit f75749e

Please sign in to comment.