[Olsr-dev] [PATCH v2 1/2] linux: use /usr/lib64 on 64bit machines if it exists

Ferry Huberts (spam-protected)
Fri May 11 11:49:22 CEST 2012



On 11-05-12 11:40, Henning Rogge wrote:
> On 05/11/2012 09:36 AM, Ferry Huberts wrote:
>>
>>
>> On 11-05-12 08:01, Henning Rogge wrote:
>>> On 05/10/2012 10:04 PM, Ferry Huberts wrote:
>>>> On 10-05-12 21:47, Ferry Huberts wrote:
>>>>> From: Ferry Huberts<(spam-protected)>
>>>>>
>>>>> Signed-off-by: Ferry Huberts<(spam-protected)>
>>>>> ---
>>>>> make/Makefile.linux | 8 +++++++-
>>>>> 1 files changed, 7 insertions(+), 1 deletions(-)
>>>>>
>>>>> diff --git a/make/Makefile.linux b/make/Makefile.linux
>>>>> index e73be7c..fa729ba 100644
>>>>> --- a/make/Makefile.linux
>>>>> +++ b/make/Makefile.linux
>>>>> @@ -4,7 +4,13 @@
>>>>>
>>>>> ARCH := $(shell uname -m)
>>>>> DESTDIR ?=
>>>>> -LIBDIR = $(DESTDIR)/usr/lib
>>>>> +LIBDIR = $(DESTDIR)/usr/lib
>>>>> +ifeq ($(strip $(ARCH)),x86_64)
>>>>> + LIB64DIR := $(shell test -d "/usr/lib64"&& echo "YES")
>>>>> + ifeq ($(strip $(LIB64DIR)),YES)
>>>>> + LIBDIR = /usr/lib64
>>>>
>>>> damn, a typo here. must stop working now...
>>>> > + LIBDIR = $(DESTDIR)/usr/lib64
>>>
>>> and the shell test must be changed too... I wonder if its worth the
>>
>> You mean the 'no space before the &&'? That appears to have been deleted
>> by accident by me, it's there in the original patch.
>
> $(shell test -d "/usr/lib64"&& echo "YES")
>
> should be
>
> $(shell test -d "$(DESTDIR)/usr/lib64"&& echo "YES")
>
> I think.
>

don't think so.
I want to detect whether the system has a /usr/lib64.
Changing it to your version will never use lib64

>>> effort, is there any distribution that does not have the /usr/lib
>>> directory?
>>>
>>
>> Yes, _all_ Red Hat/Fedora variants
>>
>> The point is that these distributions are true multi-arch and separate
>> their 32 and 64 bit libraries by means of these directories.
>> Always using /usr/lib would prevent simultaneous install of both
>> versions of a library, and does not comply with their guidelines.
>>
>> I'm going to push these patches, any more comments?
>
> what do you think about the version without the "if" ?
>
> LIBDIRSUFFIX := $(shell test -d "$(DESTDIR)/usr/lib64" && echo "64")
> LIBDIR = $(DESTDIR)/usr/lib$(LIBDIRSUFFIX)
>

I already pushed my version, but have no real preference. they do the 
same (apart from the DESTDIR that shouldn't be in the shell test)

> Henning Rogge

-- 
Ferry Huberts




More information about the Olsr-dev mailing list