Skip to contentSkip to conversation

Makefile: add update-defconfig target

PATCH New Vivien Didelot 4 participants 4 messages Jan 26, 2019 – Feb 4, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: add update-defconfig target

For symmetry with the Kconfig-based packages offering comprehensive targets like linux-update-defconfig, barebox-update-defconfig and so on, add a new top level update-defconfig target to run savedefconfig.

---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Makefile +5 -2
index dd8cc7a9ae..3a2f74be69 100644
@@ -151,7 +151,7 @@ nobuild_targets := source %-source \
 	clean distclean help show-targets graph-depends \
 	%-graph-depends %-show-depends %-show-version \
 	graph-build graph-size list-defconfigs \
-	savedefconfig printvars
+	savedefconfig update-defconfig printvars
 ifeq ($(MAKECMDGOALS),)
 BR_BUILDING = y
 else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
@@ -959,13 +959,15 @@ define percent_defconfig
 endef
 $(eval $(foreach d,$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)),$(call percent_defconfig,$(d))$(sep)))
 
+update-defconfig: savedefconfig
+
 savedefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
 	@$(COMMON_CONFIG_ENV) $< \
 		--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
 		$(CONFIG_CONFIG_IN)
 	@$(SED) '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
 
-.PHONY: defconfig savedefconfig
+.PHONY: defconfig savedefconfig update-defconfig
 
 ################################################################################
 #
@@ -1047,6 +1049,7 @@ help:
 	@echo '  defconfig              - New config with default answer to all options;'
 	@echo '                             BR2_DEFCONFIG, if set on the command line, is used as input'
 	@echo '  savedefconfig          - Save current config to BR2_DEFCONFIG (minimal config)'
+	@echo '  update-defconfig       - Same as savedefconfig'
 	@echo '  allyesconfig           - New config where all options are accepted with yes'
 	@echo '  allnoconfig            - New config where all options are answered with no'
 	@echo '  alldefconfig           - New config where all options are set to default'
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 Makefile: add update-defconfig target

El s?b., 26 ene. 2019 a las 1:34, Vivien Didelot
(<[email protected]>) escribi?:

Quoted 10 lines

For symmetry with the Kconfig-based packages offering comprehensive targets like linux-update-defconfig, barebox-update-defconfig and so on, add a new top level update-defconfig target to run savedefconfig.

---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

FWIW, I like this. People who are not very familiar with kconfig-based systems are easily confused about this.

/Thomas

#2 lore raw

PATCH 1/1 Makefile: add update-defconfig target

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

El s?b., 26 ene. 2019 a las 1:34, Vivien Didelot
(<[email protected]>) escribi?:

Quoted 5 lines

For symmetry with the Kconfig-based packages offering comprehensive targets like linux-update-defconfig, barebox-update-defconfig and so on, add a new top level update-defconfig target to run savedefconfig.

Quoted 8 lines
Quoted 5 lines

---
Makefile | 7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)

FWIW, I like this. People who are not very familiar with kconfig-based systems are easily confused about this.

I don't feel strongly about it. It doesn't really hurt, so if it is useful to people...

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 Makefile: add update-defconfig target

In reply to Vivien Didelot

Hi Thomas, Vivien,

Looks good and makes sense

Quoted 5 lines · Vivien Didelot

For symmetry with the Kconfig-based packages offering comprehensive targets like linux-update-defconfig, barebox-update-defconfig and so on, add a new top level update-defconfig target to run savedefconfig.

Quoted 47 lines
---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Makefile +4 -2
index dd8cc7a9ae..3a2f74be69 100644
@@ -151,7 +151,7 @@ nobuild_targets := source %-source \
 	clean distclean help show-targets graph-depends \
 	%-graph-depends %-show-depends %-show-version \
 	graph-build graph-size list-defconfigs \
-	savedefconfig printvars
+	savedefconfig update-defconfig printvars
 ifeq ($(MAKECMDGOALS),)
 BR_BUILDING = y
 else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
@@ -959,13 +959,15 @@ define percent_defconfig
 endef
 $(eval $(foreach d,$(call reverse,$(TOPDIR)
 $(BR2_EXTERNAL_DIRS)),$(call percent_defconfig,$(d))$(sep)))
 
+update-defconfig: savedefconfig
+
 savedefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
 	@$(COMMON_CONFIG_ENV) $< \
 		--savedefconfig=$(if
 $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
 		$(CONFIG_CONFIG_IN)
 	@$(SED) '/BR2_DEFCONFIG=/d' $(if
 $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
 
-.PHONY: defconfig savedefconfig
+.PHONY: defconfig savedefconfig update-defconfig

####################################################################
############
#

Makefile +0 -0
@@ -1047,6 +1049,7 @@ help:
 	@echo '  defconfig              - New config with default

answer to all options;'
@echo ' BR2_DEFCONFIG, if set on
the command line, is used as input'
@echo ' savedefconfig - Save current config to
BR2_DEFCONFIG (minimal config)'

Makefile +1 -0
+	@echo '  update-defconfig       - Same as savedefconfig'
 	@echo '  allyesconfig           - New config where all
Quoted 5 lines

options are accepted with yes'
@echo ' allnoconfig - New config where all
options are answered with no'
@echo ' alldefconfig - New config where all
options are set to default'

Have a nice Monday,

Titouan