[csw-maintainers] Help needed for cswclassutils integration (PROTOTYPE_FILTER not working)

Dagobert Michelsen dam at opencsw.org
Sun Feb 8 21:45:57 CET 2009


Hi,

Am 08.02.2009 um 18:43 schrieb Peter Bonivart:
> On Sun, Feb 8, 2009 at 6:22 PM, Sebastian Kayser  
> <skayser at opencsw.org> wrote:
>> Thanks, Peter! That was spot on, i relocated the line and now the  
>> pkgmap
>> is fine.
>
> Great! I have updated both wikis to include this info. Now maybe Dago
> can explain why to us. :-)

Sure. It is these two lines in gar.pkg.mk:

$(foreach SPEC,$(_PKG_SPECS),$(if $(PROTOTYPE_FILTER_$(SPEC)),$(eval  
_PROTOTYPE_FILTER_$(SPEC) ?= | $(PROTOTYPE_FILTER_$(SPEC)))))
$(foreach SPEC,$(_PKG_SPECS),$(if $(PROTOTYPE_FILTER),$(eval  
_PROTOTYPE_FILTER_$(SPEC) ?= | $(PROTOTYPE_FILTER))))

This is execute during the "include". What is actually used for
filtering is _PROTOTYPE_FILTER_$(SPEC). This is set to the
value of PROTOTYPE_FILTER or ..._$(SPEC) with a pipe prefixed.
As this is evaluated only once during include resetting these
after the include doesn't change anything.

I guess I could change it where used to
   $(if $(or $(PROTOTYPE_FILTER_$*),$(PROTOTYPE_FILTER)), \
     | $(or $(PROTOTYPE_FILTER_$*),$(PROTOTYPE_FILTER)))
It should then make no difference if the define is before or
after the include.

To make a long story short, just follow these few rules and
everything should be fine:

- put variables defined with '=' before the include
- put rules below the include
- put overrides with ':=' also below the include


Best regards

   -- Dago



More information about the maintainers mailing list