Added out-of-date condition to link recipe

This commit is contained in:
Miguel M 2023-04-21 19:29:31 +01:00
parent c741706a11
commit 6e1af9c863
1 changed files with 7 additions and 1 deletions

View File

@ -56,6 +56,12 @@ for source_file in source_files:
def exe_not_exists():
return not os.path.exists(EXE_NAME)
def old_exe():
object_files = [
os.path.realpath(path)
for path in glob('**/*.obj', recursive=True)]
return Sane.file_condition(object_files, [EXE_NAME])()
@recipe(hook_deps=['obj_compile'],
info='Compile the source files.')
@ -63,7 +69,7 @@ def compile():
pass
@recipe(recipe_deps=[compile],
conditions=[exe_not_exists],
conditions=[exe_not_exists, old_exe],
info='Links the main executable.')
def link():
obj_files = glob(os.path.join(OBJ_DIR, '**', '*.obj').replace('\\', '/'),