Quoting Bean <bean12...@gmail.com>:
Perhaps you could also take a look at my previous patch
[PATCH] Use symbol database to maintain module dependence
It add a program grub-symdb to maintain symbol database and therefore
eliminate def- and unf- files, it also allows incremental build.
grub-symdb would need to be compiled by a native C compiler.
Otherwise, it won't work when cross-compiling the utilities.
It's not that it's a big deal per se, but it is will add complexity if
we try to use autoconf to look for it.
Adding grub-symdb to bin_UTILITIES would result in it being installed
along with the utilities that are actually used after the build. I
think it's wrong. Temporary build tools don't belong there.
I think awk is a better choice than native C, as it's assumed to be
available on the build system. I could rewrite genmoddep.awk in shell
script, if we want to eliminate awk from the build. But I'm not sure
every shell would handle the needed amount of environment variables to
emulate arrays. And it would be almost certainly slower.
The awk script could be changed to run nm and to parse output of
different kinds on nm. We could probably remove another Apple hack
from the makefiles by having awk do the parsing.
I think we could specify the dependencies manually and have the script
check them rather than generate them. That would mean that no
dependencies will be created unknowingly. Chances are it will allow
more incremental builds.
Going offtopic, another approach to avoid massive rebuilds for minor
changes would be to ban most typedefs, so that we can use forward
declarations for structures instead of including files that are
otherwise unneeded (fresh example: dl.h including elf.h just to use a
pointer to the structure).
--
Regards,
Pavel Roskin
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel