don't include generated math into build_file, use cache, ui
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// don't ever include stuff that build_file will generate code for!
|
||||
#define DONT_INCLUDE_GENERATED_MATH
|
||||
#include "src/core/core_inc.h"
|
||||
#include "src/core/core_inc.c"
|
||||
|
||||
@@ -22,13 +23,13 @@ void list_files_recursive(sb8_t *sb, s8_t path) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
cache_init(&Perm, s8_lit("cache_build_file"));
|
||||
int ok = 0;
|
||||
|
||||
ma_arena_t *arena = ma_create(ma_default_reserve_size);
|
||||
meta_app(arena);
|
||||
meta_ui(arena);
|
||||
|
||||
b32 generate_math_library = false; // WARNING: be wary of this, cause it might break build file
|
||||
b32 execute_python_snippets = false; // make sure to not abuse just for quick maths
|
||||
b32 run_server = false;
|
||||
|
||||
@@ -36,7 +37,7 @@ int main(int argc, char **argv) {
|
||||
b32 win32_target = true;
|
||||
b32 wasm_target = false;
|
||||
|
||||
if (generate_math_library) {
|
||||
if (cache_code_modified(s8_lit("../src/core/core_math_gen.py"), s8_null)) {
|
||||
os_set_working_dir("../src/core");
|
||||
os_systemf("py core_math_gen.py");
|
||||
os_set_working_dir("../../build");
|
||||
@@ -110,5 +111,7 @@ int main(int argc, char **argv) {
|
||||
os_copy("main.wasm", "../package/main.wasm", os_copy_overwrite);
|
||||
if (ok != 0) return ok;
|
||||
}
|
||||
|
||||
cache_save();
|
||||
return ok;
|
||||
}
|
||||
Reference in New Issue
Block a user