Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 
0003 set -e
0004 
0005 # When you move, remove or rename generated files, you probably also update
0006 # .gitignore and cleaning rules in the Makefile. This is the right thing
0007 # to do. However, people usually do 'git pull', 'git bisect', etc. without
0008 # running 'make clean'. Then, the stale generated files are left over, often
0009 # causing build issues.
0010 #
0011 # Also, 'git status' shows such stale build artifacts as untracked files.
0012 # What is worse, some people send a wrong patch to get them back to .gitignore
0013 # without checking the commit history.
0014 #
0015 # So, when you (re)move generated files, please move the cleaning rules from
0016 # the Makefile to this script. This is run before Kbuild starts building
0017 # anything, so people will not be annoyed by such garbage files.
0018 #
0019 # This script is not intended to grow endlessly. Rather, it is a temporary scrap
0020 # yard. Stale files stay in this file for a while (for some release cycles?),
0021 # then will be really dead and removed from the code base entirely.
0022 
0023 rm -f arch/powerpc/purgatory/kexec-purgatory.c
0024 
0025 # These were previously generated source files. When you are building the kernel
0026 # with O=, make sure to remove the stale files in the output tree. Otherwise,
0027 # the build system wrongly compiles the stale ones.
0028 if [ -n "${building_out_of_srctree}" ]; then
0029         for f in fdt_rw.c fdt_ro.c fdt_wip.c fdt.c ashldi3.S bswapsdi2.S font.c lib1funcs.S hyp-stub.S
0030         do
0031                 rm -f arch/arm/boot/compressed/${f}
0032         done
0033 
0034         for f in uart-ath79.c ashldi3.c bswapdi.c bswapsi.c
0035         do
0036                 rm -f arch/mips/boot/compressed/${f}
0037         done
0038 
0039         for f in firmware.c real2.S
0040         do
0041                 rm -f arch/parisc/boot/compressed/${f}
0042         done
0043 fi
0044 
0045 rm -f arch/riscv/purgatory/kexec-purgatory.c
0046 
0047 rm -f scripts/extract-cert
0048 
0049 rm -f arch/x86/purgatory/kexec-purgatory.c