Fixes #796; wasnt rebuilding XPath stuff with latest 4.5

This commit is contained in:
Terence Parr 2015-01-19 16:13:00 -08:00
parent 0e03820487
commit 368aad8223
1 changed files with 10 additions and 1 deletions

11
bild.py
View File

@ -154,13 +154,22 @@ def mkjar_runtime():
def mkjar(): def mkjar():
rmdir("out")
mkjar_complete() mkjar_complete()
# put it in JARCARCHE too so bild can find it during antlr4() # put it in JARCARCHE too so bild can find it during antlr4()
copyfile(src="dist/antlr4-" + VERSION + "-complete.jar", trg=JARCACHE+"/antlr-"+VERSION+"-complete.jar") # note mvn wants antlr4-ver-... but I want antlr-ver-... copyfile(src="dist/antlr4-" + VERSION + "-complete.jar", trg=JARCACHE+"/antlr-"+VERSION+"-complete.jar") # note mvn wants antlr4-ver-... but I want antlr-ver-...
# rebuild/bootstrap XPath with this version so it can use current runtime (gen'd with previous ANTLR at this point) # rebuild/bootstrap XPath with this version so it can use current runtime (gen'd with previous ANTLR at this point)
rmdir("gen4/org/antlr/v4/runtime/tree/xpath") # kill previous-version-generated code log("rebuilding XPath with "+VERSION)
print("rebuilding XPath with "+VERSION)
# kill previous-version-generated code
os.remove("out/org/antlr/v4/runtime/tree/xpath/XPathLexer.class")
os.remove("gen4/org/antlr/v4/runtime/tree/xpath/XPathLexer.java")
antlr4("runtime/Java/src/org/antlr/v4/runtime/tree/xpath", "gen4", version=VERSION, antlr4("runtime/Java/src/org/antlr/v4/runtime/tree/xpath", "gen4", version=VERSION,
package="org.antlr.v4.runtime.tree.xpath") package="org.antlr.v4.runtime.tree.xpath")
args = ["-Xlint", "-Xlint:-serial", "-g", "-sourcepath", "gen4"]
javac("gen4", "out", version="1.6", cp=uniformpath("out"), args=args) # force recompile of XPath stuff
mkjar_complete() # make it again with up to date XPath lexer mkjar_complete() # make it again with up to date XPath lexer
mkjar_runtime() # now build the runtime jar mkjar_runtime() # now build the runtime jar