Add explicit dependency from asmoffsets.s to errno.h
authorDavid Cock <david.cock@inf.ethz.ch>
Mon, 31 Aug 2015 09:19:12 +0000 (11:19 +0200)
committerDavid Cock <david.cock@inf.ethz.ch>
Mon, 31 Aug 2015 09:19:12 +0000 (11:19 +0200)
Otherwise there's a race condition.

Signed-off-by: David Cock <david.cock@inf.ethz.ch>

tools/asmoffsets/Hakefile

index e355cee..6ad50b4 100644 (file)
@@ -17,7 +17,13 @@ concat [ let
                                       d /= Dep InstallTree arch "/include/asmoffsets.h"]
                  }
    in
-     [ Rule (makecToAssembler opts "src" "asmoffsets.c" "asmoffsets.s"), -- asmoffsets.s here is not the output it is the stem of the presumed output for the depenedency
+     -- asmoffsets.s here is not the output it is the stem of the presumed
+     -- output for the dependency.
+     [ Rule (makecToAssembler opts { extraDependencies =
+                                        extraDependencies opts ++
+                                        [ Dep BuildTree arch
+                                              "/include/errors/errno.h" ] }
+                              "src" "asmoffsets.c" "asmoffsets.s"),
        makeDependAssembler opts "src" "asmoffsets.c",
        Rule [ Str "grep -E '^#(if|ifndef|ifdef|define|undef|endif)'",
            In BuildTree arch (assemblerFilePath opts "asmoffsets.c"),