[csw-maintainers] GAR: BUILD_ARGS when custom build scripts

Peter FELECAN pfelecan at opencsw.org
Sat Jun 9 18:54:02 CEST 2012


"Maciej (Matchek) Bliziński" <maciej at opencsw.org> writes:

> 2012/6/9 Peter FELECAN <pfelecan at opencsw.org>
>>
>> > When you say that you're using a custom build and you wish to pass
>> > specific arguments to all or some of the specific scripts, what do you
>> > mean by 'a script'?
>>
>> I mean 'target'. See autogen's recipe where the build is split in 4
>> targets, 3 of them having additional PATH set.
>
> Right, so you need custom build-* targets to do that.
>
> BUILD_SCRIPTS += foo
>
> build-foo:
>     (cd $(WORKSRC); PATH=... gmake ...)
>     @$(MAKECOOKIE)

This is what I've done. But there is the BUILD_ARGS variable which can
add extra arguments to the default build. My question is related to
this: how to add custom arguments to custom builds?

BTW, I use the following construct:

build-foo:
	PATH="/opt/csw/gnu:$$PATH" $(MAKE) -C $(WORKSRC)
	$(MAKECOOKIE)

which, for me, is a little bit more readable, but that is a question of
taste...

-- 
Peter


More information about the maintainers mailing list