Re: [tip:core/locking] locking/mcs: Order the header files in Kbuildof each architecture in alphabetical order

From: Peter Zijlstra
Date: Mon Feb 10 2014 - 08:53:38 EST


On Mon, Feb 10, 2014 at 05:32:32AM -0800, tip-bot for Tim Chen wrote:

This script is actually buggy and lost some headers; the fixed version
is as follows:

> for i in arch/*/include/asm/Kbuild
> do
> cat $i | gawk '/^generic-y/ {
> i = 3;
> do {
n = NF;
for (; i <= n; i++) {
> if ($i == "\\") {
> getline;
i = 0;
> continue;
> }
> if ($i != "")
> hdr[$i] = $i;
> }
> break;
> } while (1);
> next;
> }
> // {
> print $0;
> }
> END {
> n = asort(hdr);
> for (i = 1; i <= n; i++)
> print "generic-y += " hdr[i];
> }' > ${i}.sorted;
> mv ${i}.sorted $i;
> done
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/