diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-29 14:18:07 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-29 14:18:07 -0500 |
| commit | bb2f890fd470fff3e42698710b56c68164491d85 (patch) | |
| tree | 13de7c4402037f0b655ddc809fad6e23454501fe /src/compile | |
| parent | 6db7b88c930657c38512709f808b422d39484a12 (diff) | |
Overhaul to versioning system (paths go tov2025-11-29
`/tomo@TOMOVERSION/lib@LIBVERSION` instead of using underscores.
Tomo versioning now uses date-based versions.
Diffstat (limited to 'src/compile')
| -rw-r--r-- | src/compile/files.c | 2 | ||||
| -rw-r--r-- | src/compile/headers.c | 6 | ||||
| -rw-r--r-- | src/compile/statements.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/compile/files.c b/src/compile/files.c index b916f23f..03c08bf6 100644 --- a/src/compile/files.c +++ b/src/compile/files.c @@ -194,7 +194,7 @@ Text_t compile_file(env_t *env, ast_t *ast) { const char *name = file_base_name(ast->file->filename); return Texts(env->do_source_mapping ? Texts("#line 1 ", quoted_str(ast->file->filename), "\n") : EMPTY_TEXT, "#define __SOURCE_FILE__ ", quoted_str(ast->file->filename), "\n", - "#include <tomo_" TOMO_VERSION "/tomo.h>\n" + "#include <tomo@" TOMO_VERSION "/tomo.h>\n" "#include \"", name, ".tm.h\"\n\n", includes, env->code->local_typedefs, "\n", env->code->lambdas, "\n", env->code->staticdefs, "\n", top_level_code, "public void ", diff --git a/src/compile/headers.c b/src/compile/headers.c index f132b312..1dcf7abb 100644 --- a/src/compile/headers.c +++ b/src/compile/headers.c @@ -158,7 +158,7 @@ Text_t compile_file_header(env_t *env, Path_t header_path, ast_t *ast) { Text_t header = Texts("#pragma once\n", env->do_source_mapping ? Texts("#line 1 ", quoted_str(ast->file->filename), "\n") : EMPTY_TEXT, - "#include <tomo_" TOMO_VERSION "/tomo.h>\n"); + "#include <tomo@" TOMO_VERSION "/tomo.h>\n"); compile_typedef_info_t info = {.env = env, .header = &header, .header_path = header_path}; visit_topologically(Match(ast, Block)->statements, (Closure_t){.fn = (void *)_make_typedefs, &info}); @@ -183,8 +183,8 @@ Text_t compile_statement_type_header(env_t *env, Path_t header_path, ast_t *ast) case USE_MODULE: { module_info_t mod = get_used_module_info(ast); glob_t tm_files; - const char *folder = mod.version ? String(mod.name, "_", mod.version) : mod.name; - if (glob(String(TOMO_PATH, "/lib/tomo_" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, + const char *folder = mod.version ? String(mod.name, "@", mod.version) : mod.name; + if (glob(String(TOMO_PATH, "/lib/tomo@" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, &tm_files) != 0) { if (!try_install_module(mod, true)) code_err(ast, "Could not find library"); diff --git a/src/compile/statements.c b/src/compile/statements.c index c6ceccd9..638f1341 100644 --- a/src/compile/statements.c +++ b/src/compile/statements.c @@ -196,8 +196,8 @@ static Text_t _compile_statement(env_t *env, ast_t *ast) { } else if (use->what == USE_MODULE) { module_info_t mod = get_used_module_info(ast); glob_t tm_files; - const char *folder = mod.version ? String(mod.name, "_", mod.version) : mod.name; - if (glob(String(TOMO_PATH, "/lib/tomo_" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, + const char *folder = mod.version ? String(mod.name, "@", mod.version) : mod.name; + if (glob(String(TOMO_PATH, "/lib/tomo@" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, &tm_files) != 0) { if (!try_install_module(mod, true)) code_err(ast, "Could not find library"); |
