From 784aba8e2d2ac8d9ccd4115865c2601a442aa467 Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Tue, 19 Feb 2019 22:13:10 +0100 Subject: [PATCH] HaikuDepot: Fix Code-Generation Jam Logic The Jam build logic for HaikuDepot was potentially creating a dummy file that was newer than the generated .cpp/.h files. This then, in turn, caused the dependent .o files to be considered needing to be re-built. This change will ensure that the dummy file is touched first so it is not newer than the generated sources and also if the dummy does end up being newer then the generated sources will be touched. trac #14853 Change-Id: Ieefb0b2aa14bf43b7cbbdfee4228c215cad5b6fa Reviewed-on: https://review.haiku-os.org/c/1070 Reviewed-by: Adrien Destugues --- src/apps/haikudepot/build/jam/HdsSchemaGenRules | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/apps/haikudepot/build/jam/HdsSchemaGenRules b/src/apps/haikudepot/build/jam/HdsSchemaGenRules index 7e40f4deeb..8d2100b730 100644 --- a/src/apps/haikudepot/build/jam/HdsSchemaGenRules +++ b/src/apps/haikudepot/build/jam/HdsSchemaGenRules @@ -41,8 +41,8 @@ rule HdsSchemaGenModel Depends $(1) : $(2) $(3) ; MkDir $(1:D) ; - HdsSchemaGenModel1 $(1) : $(2) $(3) $(1:D) ; HdsSchemaGenTouch $(1) ; + HdsSchemaGenModel1 $(1) : $(2) $(3) $(1:D) ; } actions HdsSchemaGenModel1 @@ -65,8 +65,8 @@ rule HdsSchemaGenBulkParser Depends $(1) : $(2) $(3) ; MkDir $(1:D) ; - HdsSchemaGenBulkParser1 $(1) : $(2) $(3) $(1:D) ; HdsSchemaGenTouch $(1) ; + HdsSchemaGenBulkParser1 $(1) : $(2) $(3) $(1:D) ; } actions HdsSchemaGenBulkParser1 @@ -81,7 +81,7 @@ actions HdsSchemaGenBulkParser1 # output files and the target for a given python script run. # 1 : generated files (.h and .cpp) -# 2 : target that will generate the generated files +# 2 : target that will generate the generated files (dummy file) rule HdsSchemaGenAppSrcDependsOnGeneration { local generatedSource ; @@ -90,4 +90,8 @@ rule HdsSchemaGenAppSrcDependsOnGeneration { MakeLocate $(1) : $(2:D) ; Depends $(1) : $(2) ; Clean $(1) ; + + # just in case the dummy file ends up being newer than the generated + # sources, update the modified timestamp on the generated files. + HdsSchemaGenTouch $(1) ; } \ No newline at end of file