Commit Graph

2 Commits

Author SHA1 Message Date
Carlos O'Donell
b0528456a6 scripts: sort-makefile-lines.py
We must return < 0, 0, or > 0 as the result of the comparison function
for cmp_to_key() to work correctly across all comparisons.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-05-18 12:33:24 -04:00
Carlos O'Donell
1270549a26 scripts: Add sort-makefile-lines.py to sort Makefile variables.
The scripts/sort-makefile-lines.py script sorts Makefile variables
according to project expected order.

The script can be used like this:

$ scripts/sort-makefile-lines.py < elf/Makefile > elf/Makefile.tmp
$ mv elf/Makefile.tmp elf/Makefile

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-05-10 13:14:52 -04:00