lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Building wx samples in parallel (was: Re: wx xrcdemo and --disable


From: Vadim Zeitlin
Subject: [lmi] Building wx samples in parallel (was: Re: wx xrcdemo and --disable-gif)
Date: Mon, 14 Aug 2017 17:32:45 +0200

On Mon, 14 Aug 2017 14:49:26 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2017-08-13 23:41, Vadim Zeitlin wrote:
GC> > On Sun, 13 Aug 2017 16:54:56 +0000 Greg Chicares <address@hidden> wrote:
GC> 
GC> [...building wx samples in parallel...]
GC> 
GC> >  So it looks like it might be better to avoid writing loops at all, I
GC> > wonder if something like the following would work:
GC> > 
GC> >   all clean distclean: $(SAMPLES_SUBDIRS)
GC> > 
GC> >   $(SAMPLES_SUBDIRS):
GC> >           $(MAKE) -C $@ $(MAKECMDGOALS) $(.TARGETS)
GC> 
GC> That works if and only if I mark the subdirs as phony targets:
GC> 
GC>     .PHONY: $(SAMPLES_SUBDIRS)

 Yes, sorry for omitting this from my post. I did do it like this in my
actual change at https://github.com/wxWidgets/wxWidgets/pull/536 and it
seems to have worked, so I'd just like to wait a little to see if Vaclav
has any comments about this before committing it.

GC> > (the last line tries to be compatible with both GNU and BSD makes).
GC> 
GC> I don't know why "$(.TARGETS)" worked with gnu make here

 .TARGETS is just an undefined variable like any other for GNU make, but it
should expand into the same thing as MAKECMDGOALS for BSD make. I was too
lazy to test this though, as I don't even have a remotely up to date
FreeBSD VM nowadays...

GC> I hadn't proposed using the '-C' option because it's not POSIX,
GC> but it is indeed honored by BSD and GNU/Linux.

 Yes, and as I only know about MAKECMDGOALS and .TARGETS and don't know how
to make this work for any other make flavour, it shouldn't be a problem to
use "-C" here.

 Thanks for testing!
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]