[RFC] Update minimum make version to 3.81
Mike Frysinger
vapier@gentoo.org
Fri Jun 24 18:46:00 GMT 2016
On 24 Jun 2016 20:01, Florian Weimer wrote:
> On 06/24/2016 07:49 PM, Mike Frysinger wrote:
> > On 24 Jun 2016 18:31, Florian Weimer wrote:
> >> On 06/24/2016 06:10 PM, Mike Frysinger wrote:
> >>> On 24 Jun 2016 13:24, Florian Weimer wrote:
> >>>> On 06/11/2016 12:27 AM, Roland McGrath wrote:
> >>>>> eval is a pretty horrible feature and I'd probably object to introducing
> >>>>> any uses of it into libc's makefiles. We already have lots of things that
> >>>>> might have been done that way, but are instead done with generated makefiles.
> >>>>
> >>>> I would like to put this into malloc/Makefile:
> >>>>
> >>>> $(foreach t,$(tests),$(eval CFLAGS-$t.c += -DTEST_NO_MALLOPT))
> >>>>
> >>>> What's the alternative for adding a -D flag to every test compilation in
> >>>> a subdirectory?
> >>>
> >>> maybe something like (untested):
> >>> CPPFLAGS += $(if $(filter $(@F),$(tests)),-DTEST_NO_MALLOPT)
> >>
> >> Hmm, right. It's relying on the delayed expansion. Not sure how this
> >> is less evil, though. It also has at least quadratic run-time behavior.
> >
> > what about using target-specific variables and relying on inheritance [1] ?
> > 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.
example:
$ cat Makefile
tests = a
check: $(tests)
$(tests): CPPFLAGS += FOO
a: a.o
a.o:
echo $(CPPFLAGS)
false
$ make
echo FOO
FOO
...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160624/65f284f1/attachment.sig>
More information about the Libc-alpha
mailing list