Makefile restructuring?
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Aug 15 00:57:44 PDT 2012
On 2012-08-14 11:29, David Holmes wrote:
> Hi Magnus,
>
> Welcome back :)
Thanks! :)
>
> Wow do we really have 60+ native libs?
$ grep SetupNativeCompilation * | wc
68 215 5569
$
In CompileNativeLibraries there are 58, the rest are from demos, tools, etc.
And this is only the JDK; I'm not sure if or how many native libs the
other projects are contributing...
> How well do these libraries currently group?
I don't know. I might give it a try to group them just to see if it
turns out to be a natural formation.
>
> Seems to me that this file would shrink considerably if we could move
> away from having to list all the source files individually.
How do you mean? We like to only specify a directory per library, but
unfortunately all too often the source is badly organised, so we have to
resort to long lists. I can't see how this can be fixed short of a file
restructuring process.
> It might also help to split out into os specific variants and do away
> with the ifdefs. Otherwise it is not clear to me that any of the three
> options:
> - mega file
> - file per lib
> - file per "area"
> really stand out as better or worse.
In my opinion, the current "mega file" stands out as worse. It is hard
to navigate and modify. You just lose track of things, and it tends to
make stuff duplicated, or that related stuff is not put together simply
because it's impossible to get a grip on the whole file.
> I must admit I hadn't yet had a chance to really figure out all the
> Gen* files. It certainly is not obvious to me what belongs in each
> file - or where I would go to find specific things. My concern with
> moving them into subdirectories is that at present I tend to use "grep
> <val> *" an awful lot to find things, and that will be harder with
> subdirectories involved :)
Just add a -r. :-) If you use a modern Linux, you can use "grep <val> *
-r" -- I always forget to add the grep flags at the start, thankfully
nowadays GNU grep accepts flags at the end.
/Magnus
More information about the build-infra-dev
mailing list