Make sure cins and cdefs are always in the same order
This commit is contained in:
parent
f810003ab9
commit
00e35a2d0f
|
@ -103,7 +103,7 @@ def _computeCinc(scope: TargetScope) -> str:
|
||||||
elif c.type == model.Kind.LIB:
|
elif c.type == model.Kind.LIB:
|
||||||
res.add(str(Path(c.dirname()).parent))
|
res.add(str(Path(c.dirname()).parent))
|
||||||
|
|
||||||
return " ".join(set(map(lambda i: f"-I{i}", res)))
|
return " ".join(sorted(map(lambda i: f"-I{i}", res)))
|
||||||
|
|
||||||
|
|
||||||
@var("cdefs")
|
@var("cdefs")
|
||||||
|
@ -121,7 +121,7 @@ def _computeCdef(scope: TargetScope) -> str:
|
||||||
res.add(f"-D__ck_{sanatize(k)}_{sanatize(str(v))}__")
|
res.add(f"-D__ck_{sanatize(k)}_{sanatize(str(v))}__")
|
||||||
res.add(f"-D__ck_{sanatize(k)}_value={str(v)}")
|
res.add(f"-D__ck_{sanatize(k)}_value={str(v)}")
|
||||||
|
|
||||||
return " ".join(res)
|
return " ".join(sorted(res))
|
||||||
|
|
||||||
|
|
||||||
def buildpath(scope: ComponentScope, path) -> Path:
|
def buildpath(scope: ComponentScope, path) -> Path:
|
||||||
|
@ -306,7 +306,7 @@ def build(
|
||||||
shell.mkdir(scope.target.builddir)
|
shell.mkdir(scope.target.builddir)
|
||||||
ninjaPath = os.path.join(scope.target.builddir, "build.ninja")
|
ninjaPath = os.path.join(scope.target.builddir, "build.ninja")
|
||||||
|
|
||||||
if not os.path.exists(ninjaPath):
|
# if not os.path.exists(ninjaPath):
|
||||||
with open(ninjaPath, "w") as f:
|
with open(ninjaPath, "w") as f:
|
||||||
gen(f, scope)
|
gen(f, scope)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue