Pass output directory throuh to consts and call a cleanup function
[ldk-java] / genbindings.py
index 1443a41ac6aaa2e68a4de02546d7f273e07b68d1..ca66da196ce963abd2940449ecd9cc1b08f9912f 100755 (executable)
@@ -31,7 +31,7 @@ else:
     sys.exit(1)
 
 
-consts = Consts(DEBUG, target=target)
+consts = Consts(DEBUG, target=target, outdir=sys.argv[4])
 
 local_git_version = os.getenv("LDK_GARBAGECOLLECTED_GIT_OVERRIDE")
 if local_git_version is None:
@@ -1058,3 +1058,4 @@ with open(f"{sys.argv[4]}/version.c", "w") as out_c:
     out_c.write(consts.c_version_file.replace('<git_version_ldk_garbagecollected>', local_git_version))
 with open(f"{sys.argv[3]}/structs/UtilMethods{consts.file_ext}", "a") as util:
     util.write(consts.util_fn_sfx)
+consts.cleanup()