A few comments on read-through (but without checking out-of-mail
context):
brane_at_apache.org wrote on Fri, Aug 17, 2012 at 16:58:22 -0000:
> Author: brane
> Date: Fri Aug 17 16:58:22 2012
> New Revision: 1374357
>
> URL: http://svn.apache.org/viewvc?rev=1374357&view=rev
> Log:
> Followup to r1374198: Introduce a new build.conf predicate "when", which names
> the post-configure substituted variable that controls the building and linking
> of a module. Since the makefiles are generated before configure, "when" cannot
> control the dependencies, but it can control the build/link commands.
>
Could you document 'when' somewhere in the tree itself, please? In
build.conf comments, or build/generator/, I don't care, but not just in
the log message please. :-)
> @@ -396,7 +397,8 @@ class Generator(gen_base.GeneratorBase):
>
> # ### TODO: This is a hack. See discussion here:
> # ### http://mid.gmane.org/20120316191639.GA28451@daniel3.local
Is this comment still applicable?
> - apache_files = [t.filename for t in inst_targets
> + apache_files = [gen_base.FileInfo(t.filename, t.when)
> + for t in inst_targets
> if isinstance(t, gen_base.TargetApacheMod)]
>
> files = [f for f in files if f not in apache_files]
> +++ subversion/trunk/build/generator/templates/makefile.ezt Fri Aug 17 16:58:22 2012
> @@ -112,7 +112,7 @@ $([target.varname]_OBJECTS): $([target.v
> [else][target.varname]_DEPS = [target.add_deps][for target.objects] [target.objects][end][for target.deps] [target.deps][end]
> [target.varname]_OBJECTS =[for target.objnames] [target.objnames][end]
> [target.filename]: $([target.varname]_DEPS)
> - cd [target.path] && [target.link_cmd] $([target.varname]_LDFLAGS) -o [target.basename] [target.undefined_flag] $([target.varname]_OBJECTS)[for target.libs] [target.libs][end] $(LIBS)
> + [if-any target.when]if $([target.when]) ; then [else][end]cd [target.path] && [target.link_cmd] $([target.varname]_LDFLAGS) -o [target.basename] [target.undefined_flag] $([target.varname]_OBJECTS)[for target.libs] [target.libs][end] $(LIBS)[if-any target.when] ; else echo "fake" > [target.filename] ; fi[else][end]
Suggest:
if [if-any target.when]$([target.when])[else]true[endif] ; then ...
This avoids the need for another if-any at the end of the line.
Received on 2012-08-21 18:58:00 CEST