Makefile reimports when import script changes
This commit is contained in:
+2
-4
@@ -38,6 +38,7 @@ const GeoLayout mario_geo_libsm64[] = {
|
||||
};
|
||||
|
||||
void *mario_geo_ptr = (void*)mario_geo_libsm64;
|
||||
|
||||
"""
|
||||
|
||||
geo_inc_h = """
|
||||
@@ -56,10 +57,6 @@ model_inc_h = """
|
||||
def main():
|
||||
global model_inc_h
|
||||
|
||||
if os.path.exists("src/mario/geo.inc.c") and os.path.exists("src/mario/model.inc.c") \
|
||||
and os.path.exists("src/mario/geo.inc.h") and os.path.exists("src/mario/model.inc.h"):
|
||||
return;
|
||||
|
||||
shutil.rmtree("src/mario", ignore_errors=True)
|
||||
os.makedirs("src/mario", exist_ok=True)
|
||||
|
||||
@@ -85,6 +82,7 @@ def main():
|
||||
lines.insert(0, "#include \"../load_tex_data.h\"")
|
||||
model_inc_c = "\n".join(lines)
|
||||
|
||||
|
||||
with open("src/mario/geo.inc.c", "w") as file:
|
||||
file.write(geo_inc_c_header + geo_inc_c + geo_inc_c_footer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user