> AFAICS the value of ‘configureFlags’ always appears in the build log,
> but I don’t see how this relates to this commit.
Sorry. your're right. I tried talking about make flags only. Probably it
was too late.
> I see this factorization benefit. However, wouldn’t it work to use
> ‘makeFlags’ for ‘-j’ flags?
It would. That's when opt-out starts mattering. How would you implement opt-out
for each phase then?
That's why I replaced the simple runMake function by a runMake function which
conditionally adds -l -j option only.
$curPhase is set by the builder anyway. This leads to the names being
disliked by Eelco Dolstra: NO_PARALLEL_BUILD_buildPhase etc:
runMake(){
local optout=NO_PARALLEL_BUILD_${curPhase}
[ -n "${!optout}" ] || \
local j="$makeFlagsParallelBuild"
cmd make ${makefile:+-f $makefile} "$@" $j
}
Not having to write something like this for each phase made me think
about the previous commit you were talking about.
So instead of
echo "dist flags: $distFlags ${distflagsarr...@]}"
make ${makefile:+-f $makefile} $distFlags "${distflagsarr...@]}"
${distTarget:-dist} \
$([ -z $OPT_OUT_DIST_PHASE ]; echo $makeFlags)
we have
runMake $distFlags "{ istFlagsArray[]}" ${}istTarget:-dist
Of course the first gives us a way to name the opt-out env vars the way
we want. Having one more generic functions ensures that they are all
named in a consistent way which is - so I hoped - easier to remember.
Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev