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

Henning Rogge (spam-protected)
Fri May 11 08:01:00 CEST 2012


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 
effort, is there any distribution that does not have the /usr/lib directory?

Another option to do it would be to introduce an environment variable 
called LIBDIRSUFFIX, then all our installer scripts could use

LIBDIRSUFFIX := $(shell test -d "/usr/lib64" && echo "64")
LIBDIR = /usr/lib$(LIBDIRSUFFIX)

Henning Rogge

>> + endif
>> +endif
>>
>> SRCS += $(wildcard src/linux/*.c src/unix/*.c)
>> HDRS += $(wildcard src/linux/*.h src/unix/*.h)
>


-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6156 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120511/70bf58d7/attachment.bin>


More information about the Olsr-dev mailing list