From 368aad82235cfd5bfa017e2239abc2d1f679a92b Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Mon, 19 Jan 2015 16:13:00 -0800 Subject: [PATCH] Fixes #796; wasnt rebuilding XPath stuff with latest 4.5 --- bild.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bild.py b/bild.py index c7bc21b8f..a67603e0e 100755 --- a/bild.py +++ b/bild.py @@ -154,13 +154,22 @@ def mkjar_runtime(): def mkjar(): + rmdir("out") mkjar_complete() # 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-... + # 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, 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_runtime() # now build the runtime jar