aboutsummaryrefslogtreecommitdiff
path: root/tomo.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-17 19:29:28 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-17 19:29:28 -0400
commit0bba31912665a82f848642e6b4247071a3ee177a (patch)
treeae5c3ac7501a0841c9a858d6559a0dfb7db69035 /tomo.c
parent94993c5f113b27083e586c7620eb896fe750c6d1 (diff)
Big overhaul:
- Clean up environment code using type strings instead of manually defining types - Add Commands module - Move Shell lang into an example module that uses Commands module - Fix some bugs with chained library dependencies
Diffstat (limited to 'tomo.c')
-rw-r--r--tomo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tomo.c b/tomo.c
index 279a7c79..07c431a4 100644
--- a/tomo.c
+++ b/tomo.c
@@ -21,7 +21,6 @@
#include "stdlib/optionals.h"
#include "stdlib/patterns.h"
#include "stdlib/paths.h"
-#include "stdlib/shell.h"
#include "stdlib/text.h"
#include "typecheck.h"
#include "types.h"
@@ -490,6 +489,12 @@ void build_file_dependency_graph(Path_t path, Table_t *to_compile, Table_t *to_l
case USE_MODULE: {
Text_t lib = Text$format("'%s/.local/share/tomo/installed/%s/lib%s.so'", getenv("HOME"), use->path, use->path);
Table$set(to_link, &lib, ((Bool_t[1]){1}), Table$info(&Text$info, &Bool$info));
+
+ Array_t children = Path$glob(Path$from_str(heap_strf("%s/.local/share/tomo/installed/%s/*.tm", getenv("HOME"), use->path)));
+ for (int64_t i = 0; i < children.length; i++) {
+ Path_t *child = (Path_t*)(children.data + i*children.stride);
+ build_file_dependency_graph(*child, to_compile, to_link);
+ }
break;
}
case USE_SHARED_OBJECT: {