• Masahiro Yamada's avatar
    kbuild: add a script to remove stale generated files · 1476fee5
    Masahiro Yamada authored
    We maintain .gitignore and Makefiles so build artifacts are properly
    ignored by Git, and cleaned up by 'make clean'. However, the code is
    always changing; generated files are often moved to another directory,
    or removed when they become unnecessary. Such garbage files tend to be
    left over in the source tree because people usually git-pull without
    cleaning the tree.
    
    This is not only the noise for 'git status', but also a build issue
    in some cases.
    
    One solution is to remove a stale file like commit 223c24a7 ("kbuild:
    Automatically remove stale <linux/version.h> file") did. Such workaround
    should be removed after a while, but we forget about that if we scatter
    the workaround code in random places.
    
    So, this commit adds a new script to collect cleanings of stale files.
    
    As a start point, move the code in arch/arm/boot/compressed/Makefile
    into this script.
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    1476fee5
remove-stale-files 1.3 KB