Michael already wrote such a program. It's part of the dancing
makefiles patch, which btw is a kernel build system that is not only
correct but also faster than the old one..
It's scripts/mk/fix_dep.c in a kernel tree with the following patch
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/