Gentoo Archives: gentoo-dev

From: Aron Griffis <agriffis@×××××××.com>
To: gentoo-dev@××××××××××.org
Subject: Re: [gentoo-dev] emake question
Date: Fri, 17 Aug 2001 14:30:20
Message-Id: 20010817163016.E20226@zk3.dec.com
In Reply to: Re: [gentoo-dev] emake question by Daniel Robbins
1 Hi Daniel,
2
3 Daniel Robbins wrote: [Fri Aug 17 2001, 03:40:22PM EDT]
4 > On Fri, Aug 17, 2001 at 03:09:25PM -0400, Aron Griffis wrote:
5 > > Hello,
6 > >
7 > > I'm looking at emake, trying to understand what is being accomplished.
8 > > It seems useless to me, though I'll be quite happy if told that I'm
9 > > wrong.
10 > >
11 > > (1) It claims to "auto-parallel make without the annoying syntax". But
12 > > it does nothing to parallelize the make process that I can see.
13 > >
14 > > (2) It uses env, which does nothing in this case.
15 > >
16 > > (3) It uses a variable MAKEOPTS to pass options along to sub-makes.
17 > > Isn't that redundant to GNU make's built in MAKEFLAGS (which are set
18 > > and passed to sub-makes automatically)?
19 >
20 > By default, MAKEOPTS is defined at "-j 2", so emake does auto parallelize
21 > makes. The reason for emake is that some packages build in parallel, and
22 > some don't. Those that do build in parallel should use emake in order to
23 > build faster, and those that don't should have a little "doesn't work with
24 > emake" comment and just use plan make instead.
25
26 Sorry if I'm being obstinate, but it still doesn't seem useful to me.
27 The passing of MAKEOPTS to the sub-makes doesn't do anything, since GNU
28 make passes its flags to the sub-makes via MAKEFLAGS. This includes
29 parallelization via -j.
30
31 That reduces emake to essentially running "make -j2" instead of "make".
32 Seems like that part could be left up to the ebuild authors.
33
34 Exhibit A:
35
36 # A completely useless Makefile
37 all:
38 # Start a sub-make that does a lot of nothing
39 $(MAKE) asdf{0,1,2,3,4,5}{0,1,2,3,4,5,6,7,8,9}
40 asdf%:
41 @echo $@ -$(MAKEFLAGS)
42
43 Run exhibit A with "make -j" or "make -j10" or whatever a few times and
44 note that the sub-make is running in parallel... :-)
45
46 Thanks,
47 Aron (who likes abstractions but fights them when they just muddy the water)

Replies

Subject Author
Re: [gentoo-dev] emake question Mikael Hallendal <hallski@g.o>
Re: [gentoo-dev] emake question Daniel Robbins <drobbins@g.o>