[csw-maintainers] GAR: Checking for certain variables inside a category file

Maciej (Matchek) Blizinski maciej at opencsw.org
Tue Oct 13 18:52:01 CEST 2009


On Tue, Oct 13, 2009 at 5:38 PM, Maciej (Matchek) Blizinski
<maciej at opencsw.org> wrote:
> On Tue, Oct 13, 2009 at 5:28 PM, Dagobert Michelsen <dam at opencsw.org> wrote:
>>> I'd like to implement checks for FILES and LOCAL_SRC: if undefined, I
>>> want GAR to display an error with an explanation. I need to do this
>>> inside a target. Which target to use?
>>
>> No. You can just put
>>
>> ifeq ($(FILES),)
>> $(error Please set FILE to ...)
>> endif
>>
>> in your categories/loose/category.mk. Or are there other reasons
>> you want to do that inside a target?
>
> No, no other reasons. My code looks like this:
>
> http://dpaste.com/106704/
>
> I'm getting this error:
>
> gar/categories/loose/category.mk:12: *** commands commence before
> first target.  Stop.

This code works correctly: http://dpaste.com/106711/

...but I'd rather avoid overriding the pre-fetch target inside a
category file. I suspect that pre-fetch is meant to be set inside the
package-specific Makefile.

Maciej



More information about the maintainers mailing list