[Build] Skip `tup parse` invocation if the Tupfile didn't change

Saving some additional milliseconds.

Part of P0282, funded by [Anonymous].
This commit is contained in:
nmlgc 2024-06-27 23:50:09 +02:00
parent 6842b64f5c
commit b59ee0bb5f
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@ set unparsed=.tup\unparsed.bat
set parsed=.tup\parsed.bat
set final=build_dumb.bat
: The separate `tup parse` call might take some time.
xcopy /-I /L /D /Y Tupfile.lua %final% | findstr /B /C:"1 " >NUL || ^
xcopy /-I /L /D /Y Pipeline\rules.lua %final% | findstr /B /C:"1 " >NUL
if errorlevel 1 goto tup
: Tup insists on reparsing the Tupfile if we add or remove any file between
: `tup parse` and `tup`… unless we place it in `.tup/`, which might not exist
: yet.