From 4a2808905cc0a2454fc625d9f5154b7c59b3a8a3 Mon Sep 17 00:00:00 2001 From: Matthew Kilgore Date: Sun, 8 Jan 2023 04:36:00 -0500 Subject: [PATCH] Delete qbx.o before every compile This helps when compiling several files in a row very quickly, Mac OS only has a one second accuracy on the file modification time which can cause Make to not notice a file has been modified. With the changes to avoid startup delays it's possible to have compiles happen that quickly in succession now. --- source/qb64pe.bas | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/qb64pe.bas b/source/qb64pe.bas index ea2703e4a..0a49c7044 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -12582,6 +12582,15 @@ FOR x = 1 TO ResolveStaticFunctions END IF NEXT x +' Delete existing qbx.o file, it ensures that it always gets rebuilt +ON ERROR GOTO qberror_test +IF tempfolderindex > 1 THEN + KILL "internal/c/qbx" + str2$(tempfolderindex) + ".o" +ELSE + KILL "internal/c/qbx.o" +END IF +ON ERROR GOTO qberror + IF os$ = "WIN" THEN makeline$ = makeline$ + " OS=win"