[Buildroot] [PATCH v2 4/4] Makefile: staging symlink uses a relative path

Samuel Martin s.martin49 at gmail.com
Sun Jul 19 07:15:54 UTC 2015


Hi Jérome, all,

On Thu, Jul 16, 2015 at 12:17 PM, Jérôme Pouiller <jezz at sysmic.org> wrote:
> Hello Samuel,
>
> On Monday 13 July 2015 10:18:47 Samuel Martin wrote:
>> A step forward toward a relocatable SDK.
>>
>> Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
>> ---
>>  Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index daf692e..30a2d0e 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -447,7 +447,7 @@ $(STAGING_DIR):
>>       @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
>>       @mkdir -p $(STAGING_DIR)/usr/include
>>       @mkdir -p $(STAGING_DIR)/usr/bin
>> -     @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
>> +     @ln -snf $(subst $(BASE_DIR)/,,$(STAGING_DIR)) $(BASE_DIR)/staging
> Does it work if user customize BR2_HOST_DIR?
Yes and no. :-)

I mean, Buildroot still works correctly, but the symlink is not
relative because the substitution does not have any effect when
BR2_HOST_DIR points somewhere out of BASE_DIR.

I'm not sure a relative symlink is judicious when BR2_HOST_DIR is set,
moreover when it points somewhere out of BASE_DIR.

>
> BR,
>
> --
> Jérôme Pouiller, Sysmic
> Embedded Linux specialist
> http://www.sysmic.fr

Regards,

-- 
Samuel



More information about the buildroot mailing list