From ad940126956db2f5aa8e6965b3e4c4f09e7f797e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Mar 2024 16:36:37 -0400 Subject: Check .c and .h file for staleness --- tomo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3