public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kconfig: Simplify Makefile
@ 2015-04-08 11:42 Michal Marek
  2015-04-08 11:42 ` [PATCH 2/2] kconfig: Do not print status messages in make -s mode Michal Marek
  2015-04-09  1:43 ` [PATCH 1/2] kconfig: Simplify Makefile Masahiro Yamada
  0 siblings, 2 replies; 7+ messages in thread
From: Michal Marek @ 2015-04-08 11:42 UTC (permalink / raw)
  To: linux-kbuild

Use a single rule for targets handled directly by the conf program.

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 scripts/kconfig/Makefile | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index cb2cf54..1f5e453 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -2,7 +2,7 @@
 # Kernel configuration targets
 # These targets are used from top-level makefile
 
-PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
+PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \
 	localmodconfig localyesconfig
 
 ifdef KBUILD_KCONFIG
@@ -29,9 +29,6 @@ config: $(obj)/conf
 nconfig: $(obj)/nconf
 	$< $(Kconfig)
 
-oldconfig: $(obj)/conf
-	$< --$@ $(Kconfig)
-
 silentoldconfig: $(obj)/conf
 	$(Q)mkdir -p include/config include/generated
 	$< --$@ $(Kconfig)
@@ -74,21 +71,20 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
 	    --output $(obj)/linux.pot
 	$(Q)rm -f $(obj)/config.pot
 
-PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
+# These targets map 1:1 to the commandline options of 'conf'
+simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
+	alldefconfig randconfig listnewconfig olddefconfig
+PHONY += $(simple-targets)
 
-allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
+$(simple-targets): $(obj)/conf
 	$< --$@ $(Kconfig)
 
-PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig
-
-listnewconfig olddefconfig: $(obj)/conf
-	$< --$@ $(Kconfig)
+PHONY += oldnoconfig savedefconfig defconfig
 
 # oldnoconfig is an alias of olddefconfig, because people already are dependent
 # on its behavior(sets new symbols to their default value but not 'n') with the
 # counter-intuitive name.
-oldnoconfig: $(obj)/conf
-	$< --olddefconfig $(Kconfig)
+oldnoconfig: olddefconfig
 
 savedefconfig: $(obj)/conf
 	$< --$@=defconfig $(Kconfig)
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-09 15:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 11:42 [PATCH 1/2] kconfig: Simplify Makefile Michal Marek
2015-04-08 11:42 ` [PATCH 2/2] kconfig: Do not print status messages in make -s mode Michal Marek
2015-04-09 12:47   ` Paul Bolle
2015-04-09 12:58     ` Michal Marek
2015-04-09 14:58       ` Paul Bolle
2015-04-09 15:46         ` Michal Marek
2015-04-09  1:43 ` [PATCH 1/2] kconfig: Simplify Makefile Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox