Message ID | 20220528154704.2576290-2-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] kbuild: remove redundant cleanups in scripts/link-vmlinux.sh | expand |
On Sat, May 28, 2022 at 9:43 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > 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> When does someone see .objdiff file(s)? Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64) ( Never seen here. ) -Sedat- > --- > > Makefile | 4 ++-- > scripts/link-vmlinux.sh | 3 --- > scripts/objdiff | 2 +- > 3 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/Makefile b/Makefile > index edc3f44cd96c..7011d43dff35 100644 > --- 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' \ > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index 844fc0125d72..b593cb1a8137 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -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 > diff --git a/scripts/objdiff b/scripts/objdiff > index 72b0b63c3fe1..68b8d74e5c6f 100755 > --- a/scripts/objdiff > +++ b/scripts/objdiff > @@ -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>" > -- > 2.32.0 >
On Sun, May 29, 2022 at 11:41 PM Sedat Dilek <sedat.dilek@gmail.com> wrote: > > On Sat, May 28, 2022 at 9:43 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > > > 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> > > When does someone see .objdiff file(s)? It is created when you run scripts/objdiff > > Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64) > ( Never seen here. ) > > -Sedat- > > > --- > > > > Makefile | 4 ++-- > > scripts/link-vmlinux.sh | 3 --- > > scripts/objdiff | 2 +- > > 3 files changed, 3 insertions(+), 6 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index edc3f44cd96c..7011d43dff35 100644 > > --- 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' \ > > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > > index 844fc0125d72..b593cb1a8137 100755 > > --- a/scripts/link-vmlinux.sh > > +++ b/scripts/link-vmlinux.sh > > @@ -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 > > diff --git a/scripts/objdiff b/scripts/objdiff > > index 72b0b63c3fe1..68b8d74e5c6f 100755 > > --- a/scripts/objdiff > > +++ b/scripts/objdiff > > @@ -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>" > > -- > > 2.32.0 > >
On Sun, May 29, 2022 at 7:33 PM Masahiro Yamada <masahiroy@kernel.org> wrote: ... > > When does someone see .objdiff file(s)? > > It is created when you run scripts/objdiff > Never used this - thanks for the info. -sed@-
On Sun 29 May 2022 00:47:02 +0900, Masahiro Yamada wrote: > 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> > --- > > Makefile | 4 ++-- > scripts/link-vmlinux.sh | 3 --- > scripts/objdiff | 2 +- > 3 files changed, 3 insertions(+), 6 deletions(-) > ... > diff --git a/scripts/objdiff b/scripts/objdiff > index 72b0b63c3fe1..68b8d74e5c6f 100755 > --- a/scripts/objdiff > +++ b/scripts/objdiff > @@ -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>" scripts/objdiff still has two occurrences of .tmp_objdiff (in the comment block at the top).
On Thu, Jun 2, 2022 at 4:50 AM Nicolas Schier <nicolas@fjasle.eu> wrote: > > On Sun 29 May 2022 00:47:02 +0900, Masahiro Yamada wrote: > > 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> > > --- > > > > Makefile | 4 ++-- > > scripts/link-vmlinux.sh | 3 --- > > scripts/objdiff | 2 +- > > 3 files changed, 3 insertions(+), 6 deletions(-) > > > ... > > diff --git a/scripts/objdiff b/scripts/objdiff > > index 72b0b63c3fe1..68b8d74e5c6f 100755 > > --- a/scripts/objdiff > > +++ b/scripts/objdiff > > @@ -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>" > > scripts/objdiff still has two occurrences of .tmp_objdiff (in the > comment block at the top). Ah, thank you for catching it. I sent a fixup.
diff --git a/Makefile b/Makefile index edc3f44cd96c..7011d43dff35 100644 --- 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' \ diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 844fc0125d72..b593cb1a8137 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -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 diff --git a/scripts/objdiff b/scripts/objdiff index 72b0b63c3fe1..68b8d74e5c6f 100755 --- a/scripts/objdiff +++ b/scripts/objdiff @@ -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>"
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> --- Makefile | 4 ++-- scripts/link-vmlinux.sh | 3 --- scripts/objdiff | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-)