This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] Update minimum make version to 3.81
- From: Florian Weimer <fweimer at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Tue, 28 Jun 2016 15:33:11 +0200
- Subject: Re: [RFC] Update minimum make version to 3.81
- Authentication-results: sourceware.org; auth=none
- References: <9be74649-8a90-1023-df39-a319b6d85b74 at linux dot vnet dot ibm dot com> <20160610222744 dot B09AB2C39F7 at topped-with-meat dot com> <ec2d5c66-e492-3e4b-8783-d987d638b14b at redhat dot com> <20160624161032 dot GG24532 at vapier dot lan> <43894edc-19de-08c5-958a-5087b261a83c at redhat dot com> <20160624174926 dot GJ24532 at vapier dot lan> <69ed845a-44a8-614c-e8fe-2e9ba5da91cf at redhat dot com> <20160624184612 dot GK24532 at vapier dot lan> <cdfe741d-2038-e12a-3e20-6b600b31fcba at redhat dot com> <20160624205017 dot GM24532 at vapier dot lan>
On 06/24/2016 10:50 PM, Mike Frysinger wrote:
On 24 Jun 2016 22:11, Florian Weimer wrote:
On 06/24/2016 08:46 PM, Mike Frysinger wrote:
what about using target-specific variables and relying on inheritance  ?
does this work ?
$(tests): CPPFLAGS += ...
It would have to be something like:
$(tests:%=$(objpfx)%.o): CPPFLAGS += -DTEST_NO_MALLOPT
did you verify that ? target-specific variables inherit across targets.
$ cat Makefile
tests = a
$(tests): CPPFLAGS += FOO
Oh wow. It does work (even with make 3.81).
But how is this a good idea? It means that if a target match %.o is
built not via $(tests), but as a prerequisite of another target, the
variable is not applied (and the target is not rebuilt for the other
dependency chain, I assume).
that might be the case, as well as the other way around: if a lib
is rebuilt via the tests dep, it'll have that flag added.
It turns out that the targets are prefixed with $(objpfx), so I do have
$(tests:%=$(objpfx)%): CPPFLAGS += -DTEST_NO_MALLOPT
At this point, I can well add the trailing .o, to cut down the magic