* [PATCH] kbuild: move .SECONDARY special target to Kbuild.include
@ 2018-12-01 0:27 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-12-01 0:27 UTC (permalink / raw)
To: linux-kbuild
Cc: Jason A . Donenfeld, Masahiro Yamada, David S. Miller,
linux-kernel, Michal Marek, linux-crypto, Will Deacon,
Herbert Xu, Catalin Marinas, Russell King, linux-arm-kernel
In commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and
remove .PRECIOUS markers"), I missed one important feature of the
.SECONDARY target:
.SECONDARY with no prerequisites causes all targets to be treated
as secondary.
Kbuild's policy is, "Do not delete any intermediate files."
So, just move it to scripts/Kbuild.include, with no prerequisites.
Note:
If an intermediate file is generated by $(call if_changed,...), you
still need to add it to "targets" so its .*.cmd file is included.
The arm/arm64 crypto files are generated by $(call cmd,shipped),
so they do not need to be added to "targets", but need to be added
to "clean-files" so "make clean" can properly clean them away.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/crypto/Makefile | 2 +-
arch/arm64/crypto/Makefile | 2 +-
scripts/Kbuild.include | 3 +++
scripts/Makefile.build | 4 ----
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/crypto/Makefile b/arch/arm/crypto/Makefile
index bd5bcee..89f88ab 100644
--- a/arch/arm/crypto/Makefile
+++ b/arch/arm/crypto/Makefile
@@ -65,4 +65,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
$(call cmd,perl)
endif
-targets += sha256-core.S sha512-core.S
+clean-files += sha256-core.S sha512-core.S
diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
index f476fed..860d931 100644
--- a/arch/arm64/crypto/Makefile
+++ b/arch/arm64/crypto/Makefile
@@ -75,4 +75,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl
$(call cmd,perlasm)
endif
-targets += sha256-core.S sha512-core.S
+clean-files += sha256-core.S sha512-core.S
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index bb01555..0454916 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -393,3 +393,6 @@ endef
# delete partially updated (i.e. corrupted) files on error
.DELETE_ON_ERROR:
+
+# do not delete intermediate files automatically
+.SECONDARY:
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index a8e7ba9..604096a 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -546,8 +546,4 @@ $(shell mkdir -p $(obj-dirs))
endif
endif
-# Some files contained in $(targets) are intermediate artifacts.
-# We never want them to be removed automatically.
-.SECONDARY: $(targets)
-
.PHONY: $(PHONY)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] kbuild: move .SECONDARY special target to Kbuild.include
@ 2018-12-01 0:27 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-12-01 0:27 UTC (permalink / raw)
To: linux-kbuild
Cc: Jason A . Donenfeld, Michal Marek, Herbert Xu, Catalin Marinas,
Will Deacon, linux-kernel, Russell King, Masahiro Yamada,
linux-crypto, David S. Miller, linux-arm-kernel
In commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and
remove .PRECIOUS markers"), I missed one important feature of the
.SECONDARY target:
.SECONDARY with no prerequisites causes all targets to be treated
as secondary.
Kbuild's policy is, "Do not delete any intermediate files."
So, just move it to scripts/Kbuild.include, with no prerequisites.
Note:
If an intermediate file is generated by $(call if_changed,...), you
still need to add it to "targets" so its .*.cmd file is included.
The arm/arm64 crypto files are generated by $(call cmd,shipped),
so they do not need to be added to "targets", but need to be added
to "clean-files" so "make clean" can properly clean them away.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/crypto/Makefile | 2 +-
arch/arm64/crypto/Makefile | 2 +-
scripts/Kbuild.include | 3 +++
scripts/Makefile.build | 4 ----
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/crypto/Makefile b/arch/arm/crypto/Makefile
index bd5bcee..89f88ab 100644
--- a/arch/arm/crypto/Makefile
+++ b/arch/arm/crypto/Makefile
@@ -65,4 +65,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
$(call cmd,perl)
endif
-targets += sha256-core.S sha512-core.S
+clean-files += sha256-core.S sha512-core.S
diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
index f476fed..860d931 100644
--- a/arch/arm64/crypto/Makefile
+++ b/arch/arm64/crypto/Makefile
@@ -75,4 +75,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl
$(call cmd,perlasm)
endif
-targets += sha256-core.S sha512-core.S
+clean-files += sha256-core.S sha512-core.S
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index bb01555..0454916 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -393,3 +393,6 @@ endef
# delete partially updated (i.e. corrupted) files on error
.DELETE_ON_ERROR:
+
+# do not delete intermediate files automatically
+.SECONDARY:
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index a8e7ba9..604096a 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -546,8 +546,4 @@ $(shell mkdir -p $(obj-dirs))
endif
endif
-# Some files contained in $(targets) are intermediate artifacts.
-# We never want them to be removed automatically.
-.SECONDARY: $(targets)
-
.PHONY: $(PHONY)
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: move .SECONDARY special target to Kbuild.include
2018-12-01 0:27 ` Masahiro Yamada
@ 2018-12-08 6:54 ` Masahiro Yamada
-1 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-12-08 6:54 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Jason, David S. Miller, Linux Kernel Mailing List, Michal Marek,
linux-crypto, Will Deacon, Herbert Xu, Catalin Marinas,
Russell King, linux-arm-kernel
On Sat, Dec 1, 2018 at 9:29 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> In commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and
> remove .PRECIOUS markers"), I missed one important feature of the
> .SECONDARY target:
>
> .SECONDARY with no prerequisites causes all targets to be treated
> as secondary.
>
> Kbuild's policy is, "Do not delete any intermediate files."
> So, just move it to scripts/Kbuild.include, with no prerequisites.
>
> Note:
> If an intermediate file is generated by $(call if_changed,...), you
> still need to add it to "targets" so its .*.cmd file is included.
>
> The arm/arm64 crypto files are generated by $(call cmd,shipped),
> so they do not need to be added to "targets", but need to be added
> to "clean-files" so "make clean" can properly clean them away.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Applied to linux-kbuild.
> arch/arm/crypto/Makefile | 2 +-
> arch/arm64/crypto/Makefile | 2 +-
> scripts/Kbuild.include | 3 +++
> scripts/Makefile.build | 4 ----
> 4 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/crypto/Makefile b/arch/arm/crypto/Makefile
> index bd5bcee..89f88ab 100644
> --- a/arch/arm/crypto/Makefile
> +++ b/arch/arm/crypto/Makefile
> @@ -65,4 +65,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
> $(call cmd,perl)
> endif
>
> -targets += sha256-core.S sha512-core.S
> +clean-files += sha256-core.S sha512-core.S
> diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
> index f476fed..860d931 100644
> --- a/arch/arm64/crypto/Makefile
> +++ b/arch/arm64/crypto/Makefile
> @@ -75,4 +75,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl
> $(call cmd,perlasm)
> endif
>
> -targets += sha256-core.S sha512-core.S
> +clean-files += sha256-core.S sha512-core.S
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index bb01555..0454916 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -393,3 +393,6 @@ endef
>
> # delete partially updated (i.e. corrupted) files on error
> .DELETE_ON_ERROR:
> +
> +# do not delete intermediate files automatically
> +.SECONDARY:
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index a8e7ba9..604096a 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -546,8 +546,4 @@ $(shell mkdir -p $(obj-dirs))
> endif
> endif
>
> -# Some files contained in $(targets) are intermediate artifacts.
> -# We never want them to be removed automatically.
> -.SECONDARY: $(targets)
> -
> .PHONY: $(PHONY)
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: move .SECONDARY special target to Kbuild.include
@ 2018-12-08 6:54 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-12-08 6:54 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Jason, Michal Marek, Herbert Xu, Catalin Marinas, Will Deacon,
Linux Kernel Mailing List, Russell King, linux-crypto,
David S. Miller, linux-arm-kernel
On Sat, Dec 1, 2018 at 9:29 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> In commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and
> remove .PRECIOUS markers"), I missed one important feature of the
> .SECONDARY target:
>
> .SECONDARY with no prerequisites causes all targets to be treated
> as secondary.
>
> Kbuild's policy is, "Do not delete any intermediate files."
> So, just move it to scripts/Kbuild.include, with no prerequisites.
>
> Note:
> If an intermediate file is generated by $(call if_changed,...), you
> still need to add it to "targets" so its .*.cmd file is included.
>
> The arm/arm64 crypto files are generated by $(call cmd,shipped),
> so they do not need to be added to "targets", but need to be added
> to "clean-files" so "make clean" can properly clean them away.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Applied to linux-kbuild.
> arch/arm/crypto/Makefile | 2 +-
> arch/arm64/crypto/Makefile | 2 +-
> scripts/Kbuild.include | 3 +++
> scripts/Makefile.build | 4 ----
> 4 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/crypto/Makefile b/arch/arm/crypto/Makefile
> index bd5bcee..89f88ab 100644
> --- a/arch/arm/crypto/Makefile
> +++ b/arch/arm/crypto/Makefile
> @@ -65,4 +65,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
> $(call cmd,perl)
> endif
>
> -targets += sha256-core.S sha512-core.S
> +clean-files += sha256-core.S sha512-core.S
> diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
> index f476fed..860d931 100644
> --- a/arch/arm64/crypto/Makefile
> +++ b/arch/arm64/crypto/Makefile
> @@ -75,4 +75,4 @@ $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl
> $(call cmd,perlasm)
> endif
>
> -targets += sha256-core.S sha512-core.S
> +clean-files += sha256-core.S sha512-core.S
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index bb01555..0454916 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -393,3 +393,6 @@ endef
>
> # delete partially updated (i.e. corrupted) files on error
> .DELETE_ON_ERROR:
> +
> +# do not delete intermediate files automatically
> +.SECONDARY:
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index a8e7ba9..604096a 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -546,8 +546,4 @@ $(shell mkdir -p $(obj-dirs))
> endif
> endif
>
> -# Some files contained in $(targets) are intermediate artifacts.
> -# We never want them to be removed automatically.
> -.SECONDARY: $(targets)
> -
> .PHONY: $(PHONY)
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-08 6:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01 0:27 [PATCH] kbuild: move .SECONDARY special target to Kbuild.include Masahiro Yamada
2018-12-01 0:27 ` Masahiro Yamada
2018-12-08 6:54 ` Masahiro Yamada
2018-12-08 6:54 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.