[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to switch behaviour according to glibc version?
From: |
David Aldrich |
Subject: |
RE: How to switch behaviour according to glibc version? |
Date: |
Wed, 6 Apr 2016 09:46:08 +0000 |
Hi David
Thanks again for your help. However, I’m not quite there yet.
If I do:
verstr := $(shell ldd --version | head -1)
$(info glibc $(verstr) detected)
I see:
glibc ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19 detected
But if I do:
verstr := $(shell ldd --version | head -1 | awk '{print $NF}')
$(info glibc $(verstr) detected)
I see:
glibc detected
So there is something wrong with the awk command. It works ok from the command
line but not in the makefile. Might the apostrophes be the problem?
Best regards
David
From: address@hidden [mailto:address@hidden On Behalf Of David Boyce
Sent: 05 April 2016 18:36
To: David Aldrich <address@hidden>
Cc: address@hidden
Subject: Re: How to switch behaviour according to glibc version?
Makefiles are divided between make syntax and shell (recipe) syntax. Here
you're trying to use a shell command (echo) in a place that's not a recipe.
Replace it with $(warning ...) which is the make-syntax equivalent.
On Tue, Apr 5, 2016 at 9:24 AM, David Aldrich
<address@hidden<mailto:address@hidden>> wrote:
Hi David
Thanks for your answer to my question. I have one outstanding problem. Part of
the makefile is now:
ifeq ($(DISTRO),debian)
verstr := $(ldd --version | head -1 | awk '{print $NF}')
@echo glibc $(verstr) detected
ifneq ($(call version_ge,$(verstr),2.22),TRUE)
@echo "Warning: system glibc is incompatible with Zodiac so using glibc
from OPEN_SOURCE_LIBS"
GLIBC=$(OPEN_SOURCE_LIBS)/glibc/v2_22/
GLIBC_FLAGS=
-Wl,-rpath=${GLIBC}:${GLIBC}/math:${GLIBC}/elf:${GLIBC}/dlfcn:${GLIBC}/nss:${GLIBC}/nis:${GLIBC}/rt:${GLIBC}/resolv:${GLIBC}/crypt:${GLIBC}/n$
endif
endif
For the first echo statement I get:
Makefile:236: *** missing separator. Stop.
Please can you suggest how I should correct that line?
Best regards
David
Click
here<https://www.mailcontrol.com/sr/djoNe5tCM8vGX2PQPOmvUnFKm77zQC2t99wVyMYG!KKWuh2fJJLnxEddCKX4K9u8Yv98euDengeTKOxjbsImtQ==>
to report this email as spam.
- How to switch behaviour according to glibc version?, David Aldrich, 2016/04/05
- Re: How to switch behaviour according to glibc version?, David Boyce, 2016/04/05
- RE: How to switch behaviour according to glibc version?, David Aldrich, 2016/04/05
- Re: How to switch behaviour according to glibc version?, David Boyce, 2016/04/05
- RE: How to switch behaviour according to glibc version?,
David Aldrich <=
- Re: How to switch behaviour according to glibc version?, Paul Smith, 2016/04/06
- RE: How to switch behaviour according to glibc version?, David Aldrich, 2016/04/06
- RE: How to switch behaviour according to glibc version?, Cook, Malcolm, 2016/04/14
Re: How to switch behaviour according to glibc version?, Yann Droneaud, 2016/04/06
RE: How to switch behaviour according to glibc version?, rakesh sharma, 2016/04/14