2023-01-13 04:43:22

by Peter Foley

[permalink] [raw]
Subject: [PATCH v2] kconfig: Update all declared targets

Currently qconf-cfg.sh is the only script that touches the "-bin"
target, even though all of the conf_cfg rules declare that they do.
Make the recipe unconditionally touch all declared targets to avoid
incompatibilities with upcoming versions of GNU make:
https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html

e.g.
scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/nconf-bin'.
scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/mconf-bin'.
scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/gconf-bin'.

Signed-off-by: Peter Foley <[email protected]>
---
Changes in v2:
- Update pattern rule to touch -bin instead of each script.
- Add missing gitignore entries.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
scripts/kconfig/.gitignore | 2 +-
scripts/kconfig/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
index c8a3f9cd52f0..f8bdf0cf4662 100644
--- a/scripts/kconfig/.gitignore
+++ b/scripts/kconfig/.gitignore
@@ -3,5 +3,5 @@
/[gmnq]conf
/[gmnq]conf-cflags
/[gmnq]conf-libs
-/qconf-bin
+/[gmnq]conf-bin
/qconf-moc.cc
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 0b1d15efaeb0..af1c96198f49 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -209,7 +209,7 @@ $(obj)/gconf: | $(obj)/gconf-libs
$(obj)/gconf.o: | $(obj)/gconf-cflags

# check if necessary packages are available, and configure build flags
-cmd_conf_cfg = $< $(addprefix $(obj)/$*conf-, cflags libs bin)
+cmd_conf_cfg = $< $(addprefix $(obj)/$*conf-, cflags libs bin); touch $(obj)/$*conf-bin

$(obj)/%conf-cflags $(obj)/%conf-libs $(obj)/%conf-bin: $(src)/%conf-cfg.sh
$(call cmd,conf_cfg)

---
base-commit: e8f60cd7db24f94f2dbed6bec30dd16a68fc0828
change-id: 20230111-kconfig-e59c6154f506

Best regards,
--
Peter Foley <[email protected]>


2023-01-13 08:14:10

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH v2] kconfig: Update all declared targets

On Fri, Jan 13, 2023 at 1:24 PM Peter Foley <[email protected]> wrote:
>
> Currently qconf-cfg.sh is the only script that touches the "-bin"
> target, even though all of the conf_cfg rules declare that they do.
> Make the recipe unconditionally touch all declared targets to avoid
> incompatibilities with upcoming versions of GNU make:
> https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html
>
> e.g.
> scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/nconf-bin'.
> scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/mconf-bin'.
> scripts/kconfig/Makefile:215: warning: pattern recipe did not update peer target 'scripts/kconfig/gconf-bin'.
>
> Signed-off-by: Peter Foley <[email protected]>

Applied to linux-kbuild/fixes.
Thanks!


> ---
> Changes in v2:
> - Update pattern rule to touch -bin instead of each script.
> - Add missing gitignore entries.
> - Link to v1: https://lore.kernel.org/r/[email protected]
> ---
> scripts/kconfig/.gitignore | 2 +-
> scripts/kconfig/Makefile | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
> index c8a3f9cd52f0..f8bdf0cf4662 100644
> --- a/scripts/kconfig/.gitignore
> +++ b/scripts/kconfig/.gitignore
> @@ -3,5 +3,5 @@
> /[gmnq]conf
> /[gmnq]conf-cflags
> /[gmnq]conf-libs
> -/qconf-bin
> +/[gmnq]conf-bin
> /qconf-moc.cc
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 0b1d15efaeb0..af1c96198f49 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -209,7 +209,7 @@ $(obj)/gconf: | $(obj)/gconf-libs
> $(obj)/gconf.o: | $(obj)/gconf-cflags
>
> # check if necessary packages are available, and configure build flags
> -cmd_conf_cfg = $< $(addprefix $(obj)/$*conf-, cflags libs bin)
> +cmd_conf_cfg = $< $(addprefix $(obj)/$*conf-, cflags libs bin); touch $(obj)/$*conf-bin
>
> $(obj)/%conf-cflags $(obj)/%conf-libs $(obj)/%conf-bin: $(src)/%conf-cfg.sh
> $(call cmd,conf_cfg)
>
> ---
> base-commit: e8f60cd7db24f94f2dbed6bec30dd16a68fc0828
> change-id: 20230111-kconfig-e59c6154f506
>
> Best regards,
> --
> Peter Foley <[email protected]>



--
Best Regards
Masahiro Yamada