aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-24 16:36:37 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-03-24 16:36:37 -0400
commitad940126956db2f5aa8e6965b3e4c4f09e7f797e (patch)
treebb8253b89de3227e3da726d2652842e46ddbed28
parent42431a8742a646016546feae034f9db570d6fd21 (diff)
Check .c and .h file for staleness
-rw-r--r--tomo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tomo.c b/tomo.c
index a2e5342f..03056bfc 100644
--- a/tomo.c
+++ b/tomo.c
@@ -252,7 +252,8 @@ int transpile(const char *filename, bool force_retranspile)
int compile_object_file(const char *filename, bool force_recompile)
{
const char *obj_file = heap_strf("%s.o", filename);
- if (!force_recompile && !stale(obj_file, filename)) {
+ if (!force_recompile && !stale(obj_file, filename)
+ && !stale(obj_file, heap_strf("%s.c", filename)) && !stale(obj_file, heap_strf("%s.h", filename))) {
return 0;
}
const char *cmd = heap_strf("%s %s -c %s.c -o %s.o", cc, cflags, filename, filename);