[Scratchbox-users] detecting scratchbox from Makefile
Jussi Hakala
jussi.hakala at movial.fi
Tue Jun 24 18:16:11 EEST 2008
The most reliable thing would be probably to test the presence of a
scratchbox-like directory layout [1] or if env output contains any SBOX_
prefixed variables [2] (but this may lead to ambiguity between sb1 and sb2).
Regards,
Jussi
[1]
if [ -e /targets/links/scratchbox.config ] ; then
...
fi
[2]
if env | grep -q ^SBOX_ ; then
...
fi
Aras Vaichas wrote:
> Hi,
>
> I've written a Makefile which checks to see if it is running within
> Scratchbox:
>
> dummy:
> ifeq ($(strip $(SBOX_USE_CCACHE)),yes)
> make $(EXECUTABLE)
> else
> scratchbox -d $(DIRECTORY) make $(EXECUTABLE)
> endif
>
> I chose SBOX_USE_CCACHE pretty much at random as a way of detecting the scratchbox environment.
>
> Is there a better or proper way?
>
> Aras Vaichas
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
> _______________________________________________
> Scratchbox-users mailing list
> Scratchbox-users at lists.scratchbox.org
> http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
More information about the Scratchbox-users
mailing list