]> git.baikalelectronics.ru Git - kernel.git/commitdiff
kbuild: clean .tmp_* pattern by make clean
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 28 May 2022 15:47:02 +0000 (00:47 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 4 Jun 2022 21:20:57 +0000 (06:20 +0900)
Change the "make clean" rule to remove all the .tmp_* files.

.tmp_objdiff is the only exception, which should be removed by
"make mrproper".

Rename the record directory of objdiff, .tmp_objdiff to .objdiff to
avoid the removal by "make clean".

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
Makefile
scripts/link-vmlinux.sh
scripts/objdiff

index edc3f44cd96c1442d78c1a3b96ffc4a145d2e004..7011d43dff35bd31ea5f63b581c769ebd80b8537 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1490,7 +1490,7 @@ CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_FILES += include/config include/generated          \
-                 arch/$(SRCARCH)/include/generated .tmp_objdiff \
+                 arch/$(SRCARCH)/include/generated .objdiff \
                  debian snap tar-install \
                  .config .config.old .version \
                  Module.symvers \
@@ -1857,7 +1857,7 @@ clean: $(clean-dirs)
                -o -name '*.lex.c' -o -name '*.tab.[ch]' \
                -o -name '*.asn1.[ch]' \
                -o -name '*.symtypes' -o -name 'modules.order' \
-               -o -name '.tmp_*.o.*' \
+               -o -name '.tmp_*' \
                -o -name '*.c.[012]*.*' \
                -o -name '*.ll' \
                -o -name '*.gcno' \
index 1c0af7288b7985c0054853eecbdf2857f5d5a0bb..3f51b08cc203e3a46505f36443a279297473e6d0 100755 (executable)
@@ -303,9 +303,6 @@ sorttable()
 cleanup()
 {
        rm -f .btf.*
-       rm -f .tmp_System.map
-       rm -f .tmp_initcalls.lds
-       rm -f .tmp_vmlinux*
        rm -f System.map
        rm -f vmlinux
        rm -f vmlinux.map
index 72b0b63c3fe13454d820877d09953419973f1db4..0685bc3ce3df2737469c0e4d632c54ad70126b96 100755 (executable)
 # $ ./scripts/objdiff diff COMMIT_A COMMIT_B
 # $
 
-# And to clean up (everything is in .tmp_objdiff/*)
+# And to clean up (everything is in .objdiff/*)
 # $ ./scripts/objdiff clean all
 #
-# Note: 'make mrproper' will also remove .tmp_objdiff
+# Note: 'make mrproper' will also remove .objdiff
 
 SRCTREE=$(cd $(git rev-parse --show-toplevel 2>/dev/null); pwd)
 
@@ -32,7 +32,7 @@ if [ -z "$SRCTREE" ]; then
        exit 1
 fi
 
-TMPD=$SRCTREE/.tmp_objdiff
+TMPD=$SRCTREE/.objdiff
 
 usage() {
        echo >&2 "Usage: $0 <command> <args>"