Skip to contentSkip to conversation

locking/mcs: Order the header files in Kbuild of each architecture in alphabetical order

tip:core/locking Peter Zijlstra 1 participant 1 message Feb 10, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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:

Quoted 5 lines

for i in arch/*/include/asm/Kbuild
do

        cat $i | gawk '/^generic-y/ {
                i = 3;
                do {
			n = NF;
                        for (; i <= n; i++) {
Quoted 2 lines
                                if ($i == "\\") {
                                        getline;
                                         i = 0;
Quoted 19 lines
                                        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