1 |
Drake Wyrm wrote: |
2 |
> On Fri, 2004-04-30, 02:31:39 -0400, in |
3 |
> <200404300231.39292.vapier@g.o>, Mike Frysinger |
4 |
> <vapier@g.o> wrote: |
5 |
> |
6 |
>>On Friday 30 April 2004 02:25 am, Drake Wyrm wrote: |
7 |
... |
8 |
>>ive personally used the fact that use echos the flag when building |
9 |
>>packages ... for example, a package with a crapy build system: |
10 |
>>for vid in `use sdl` `use X` `use opengl` `use svga` ; do |
11 |
>> make clean |
12 |
>> make VID=$vid |
13 |
>> mv binary ../binary.$vid |
14 |
>>done |
15 |
> |
16 |
> |
17 |
> That's beautiful. Now, there's an example of elegance! |
18 |
|
19 |
Beautiful? It is an example of code replication! |
20 |
|
21 |
What about about the following? |
22 |
|
23 |
for vid in sdl X opengl svga; do |
24 |
if use $vid; then |
25 |
make clean |
26 |
make VID=$vid |
27 |
mv binary ../binary.$vid |
28 |
fi |
29 |
done |
30 |
|
31 |
|
32 |
Regards |
33 |
|
34 |
Stephan |
35 |
|
36 |
|
37 |
-- |
38 |
gentoo-dev@g.o mailing list |