Skip to content

Commit

Permalink
kbuild: clean .tmp_* pattern by make clean
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Sedat Dilek <[email protected]> # LLVM-14 (x86-64)
  • Loading branch information
masahir0y committed Jun 4, 2022
1 parent a78b6af commit b0d6207
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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' \
Expand Down
3 changes: 0 additions & 3 deletions scripts/link-vmlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/objdiff
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
# $ ./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)

Expand All @@ -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>"
Expand Down

0 comments on commit b0d6207

Please sign in to comment.