1 |
Hi Mikael and Daniel, |
2 |
|
3 |
Mikael Hallendal wrote: [Fri Aug 17 2001, 04:51:05PM EDT] |
4 |
> And that is the purpose of it. When creating the ebuild the user can |
5 |
> write the much shorter and cleaner syntax 'emake' instead of 'make |
6 |
> ${MAKEOPTS}'. Where MAKEOPTS being defined in /etc/make.{globals,conf}. |
7 |
|
8 |
Daniel Robbins wrote: [Fri Aug 17 2001, 05:11:55PM EDT] |
9 |
> Yes, this is all emake does. The reason why we don't leave it up to the |
10 |
> ebuild authors is that -j2 is optimal for uniprocessors, -j3 for dual |
11 |
> processors, and -j5 for quad processors. So the -j part needs to be |
12 |
> definable by the user. It's easier to type: |
13 |
> |
14 |
> emake |
15 |
> |
16 |
> than |
17 |
> make $MAKEOPTS MAKE="make $MAKEOPTS" |
18 |
> |
19 |
> Also, it's less prone to have syntax errors, and easier to remember. |
20 |
|
21 |
Okay, what is being accomplished here finally makes sense to me! Thanks |
22 |
for being patient enough to get it through my skull. However there are |
23 |
a couple things I would like to suggest. |
24 |
|
25 |
(1) The line in emake is |
26 |
|
27 |
exec env make ${MAKEOPTS} MAKE="make ${MAKEOPTS}" "$@" |
28 |
|
29 |
however it could be |
30 |
|
31 |
exec make ${MAKEOPTS} "$@" |
32 |
|
33 |
and this has the same result, since it relies on make to pass the |
34 |
flags to the sub-makes using the builtin MAKEFLAGS. I think it's |
35 |
actually better, since it allows GNU make to manage it's own |
36 |
subprocesses instead of forcing flags on the sub-makes. |
37 |
|
38 |
(2) However emake is currently inflexible. For example, say that we |
39 |
wanted to provide more potential options to an ebuild's make? We'd |
40 |
add them to MAKEOPTS. Great! Except that packages that can't build |
41 |
in parallel would also miss out on the extra flags. |
42 |
|
43 |
(3) Considering the above, a solution would be to provide a couple of |
44 |
variables to the ebuild developers. For example, |
45 |
|
46 |
MAKEJOPT = ideal -j option for the current machine (preferably |
47 |
determined at run-time, not install-time) |
48 |
|
49 |
MAKEOPTS = other make flags (currently empty) |
50 |
|
51 |
Emake can become |
52 |
|
53 |
exec make $MAKEJOPT $MAKEOPTS "$@" |
54 |
|
55 |
If parallel building doesn't work, the ebuild author could still do |
56 |
the following if they want the non-parallel flags. |
57 |
|
58 |
make $MAKEOPTS |
59 |
|
60 |
Does this make sense? Would it be worthwhile or not? |
61 |
|
62 |
Aron |