[haiku-commits] haiku: hrev52901 - src/apps/haikudepot/build/jam

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 19 Feb 2019 16:34:27 -0500 (EST)

hrev52901 adds 1 changeset to branch 'master'
old head: 768957dca124dc39664263bf622b548830092d16
new head: 784aba8e2d2ac8d9ccd4115865c2601a442aa467
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=784aba8e2d2a+%5E768957dca124

----------------------------------------------------------------------------

784aba8e2d2a: 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 <pulkomandy@xxxxxxxxx>

                                    [ Andrew Lindesay <apl@xxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52901
Commit:      784aba8e2d2ac8d9ccd4115865c2601a442aa467
URL:         https://git.haiku-os.org/haiku/commit/?id=784aba8e2d2a
Author:      Andrew Lindesay <apl@xxxxxxxxxxxxxx>
Date:        Tue Feb 19 21:13:10 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Tue Feb 19 21:34:23 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/14853

----------------------------------------------------------------------------

1 file changed, 7 insertions(+), 3 deletions(-)
src/apps/haikudepot/build/jam/HdsSchemaGenRules | 10 +++++++---

----------------------------------------------------------------------------

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


Other related posts:

  • » [haiku-commits] haiku: hrev52901 - src/apps/haikudepot/build/jam - waddlesplash