1 |
Aron Griffis wrote: |
2 |
> Andrew Gaffney wrote: [Mon Feb 23 2004, 10:04:19PM EST] |
3 |
> |
4 |
>>Are their any methods other than running 'make -n | wc -l' and comparing to |
5 |
>>the current number of lines in 'make' output to figure out how far in the |
6 |
>>build you are? |
7 |
> |
8 |
> |
9 |
> You could run make -n and grab the output as keys into a hash with a |
10 |
> counter as the value. Then run make and match the output against the |
11 |
> hash. I don't know how much massaging of the data you'd have to do... |
12 |
|
13 |
My original method works fine for single directory source trees. I've come up with a |
14 |
different (yet very much the same) method for dealing with multiple directories in the |
15 |
source tree. I run the command 'make -n | grep "make\[.\]: Leaving", use a Perl regex to |
16 |
grab the dir from each one, and create an array. I define a variable to hold the current |
17 |
array position. I check each line of 'make' output for the directory contained in the |
18 |
current array element. If there's a match, the array position variable gets incremented. |
19 |
The percentage compiled is figured as '($current_array_position / $size_of_array) * 100'. |
20 |
It seems to work pretty well. I can post my code if anyone is interested. |
21 |
|
22 |
-- |
23 |
Andrew Gaffney |
24 |
Network Administrator |
25 |
Skyline Aeronautics, LLC. |
26 |
636-357-1548 |
27 |
|
28 |
|
29 |
-- |
30 |
gentoo-dev@g.o mailing list |