RE: How to switch behaviour according to glibc version?

2016-04-06 Thread David Aldrich
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}

Re: How to switch behaviour according to glibc version?

2016-04-06 Thread Paul Smith
On Wed, 2016-04-06 at 09:46 +, David Aldrich wrote: > 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 b

RE: How to switch behaviour according to glibc version?

2016-04-06 Thread David Aldrich
> So, write: > > verstr := $(shell ldd --version | head -1 | awk '{print $$NF}') Thanks Paul, that worked fine. David ___ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make

Re: How to switch behaviour according to glibc version?

2016-04-06 Thread Yann Droneaud
Le mardi 05 avril 2016 à 08:54 +, David Aldrich a écrit : > Hi > > I am running gnu make 4.1 on Ubuntu.  Make builds my C++ application > that requires glibc 2.22 or higher.  Ubuntu 14.04 has only glibc 2.19 > so my makefile checks the host o/s and, if it's Ubuntu, it links to > my private cop

RE: How to switch behaviour according to glibc version?

2016-04-06 Thread David Aldrich
> How can "make" could build a C++ application that depends on glibc 2.22 when > your system only have glibc 2.19 ? glibc 2.19 has a bug that is critical for us. I don't want to upgrade the version of the system's glibc because that could break other applications. I have a copy of glibc 2.22 tha

make 4.1 has different silent functionality

2016-04-06 Thread drwho
Hello, Make version 4.1 in Ubuntu 16.04 has different behaviour using the @ (silent) . From my makefile. %o : %c @echo "CC$<" @$(CC) -c $(CFLAGS) $(INCDIR) $< -o $@ used to produce this output in older versions of make. CCmain.c CCbob.c CCsally.c no

Re: make 4.1 has different silent functionality

2016-04-06 Thread Paul Smith
On Wed, 2016-04-06 at 13:54 -0400, drwho wrote: > Make version 4.1 in Ubuntu 16.04 has different behaviour using the @ > (silent) . It's very helpful if you specify what the older version of make is that you were using that had different behavior. > > %o : %c > @echo "CC$<" >

Re: make 4.1 has different silent functionality

2016-04-06 Thread drwho
On 2016-04-06 02:35 PM, Paul Smith wrote: On Wed, 2016-04-06 at 13:54 -0400, drwho wrote: Make version 4.1 in Ubuntu 16.04 has different behaviour using the @ (silent) . It's very helpful if you specify what the older version of make is that you were using that had different behavior. %o : %c

Re: How to switch behaviour according to glibc version?

2016-04-06 Thread Bob Proulx
David Aldrich wrote: > glibc 2.19 has a bug that is critical for us. I don't want to > upgrade the version of the system's glibc because that could break > other applications. I have a copy of glibc 2.22 that we use just for > linking our application. Instead of doing either the usual thing in the