[PATCH 4/6] kconfig: small code refactoring in kconfig Makefile

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, H. Peter Anvin <hpa@...>, LKML <linux-kernel@...>, linux-kbuild <linux-kbuild@...>
Date: Thursday, October 25, 2007 - 4:05 pm

From 7cadfc607d91f536996a46c186711c82378e75ec Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Thu, 25 Oct 2007 20:42:18 +0200
Subject: [PATCH] kconfig: small code refactoring in kconfig Makefile

Do not hardcode the arch/$(ARCH)/Kconfig name all over

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/kconfig/Makefile |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index fbf39cc..3c9db07 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -4,23 +4,25 @@
 
 PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
 
+Kconfig := arch/$(ARCH)/Kconfig
+
 xconfig: $(obj)/qconf
-	$< arch/$(ARCH)/Kconfig
+	$< $(Kconfig)
 
 gconfig: $(obj)/gconf
-	$< arch/$(ARCH)/Kconfig
+	$< $(Kconfig)
 
 menuconfig: $(obj)/mconf
-	$< arch/$(ARCH)/Kconfig
+	$< $(Kconfig)
 
 config: $(obj)/conf
-	$< arch/$(ARCH)/Kconfig
+	$< $(Kconfig)
 
 oldconfig: $(obj)/conf
-	$< -o arch/$(ARCH)/Kconfig
+	$< -o $(Kconfig)
 
 silentoldconfig: $(obj)/conf
-	$< -s arch/$(ARCH)/Kconfig
+	$< -s $(Kconfig)
 
 # Create new linux.po file
 # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
@@ -45,27 +47,27 @@ update-po-config: $(obj)/kxgettext
 PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
 
 randconfig: $(obj)/conf
-	$< -r arch/$(ARCH)/Kconfig
+	$< -r $(Kconfig)
 
 allyesconfig: $(obj)/conf
-	$< -y arch/$(ARCH)/Kconfig
+	$< -y $(Kconfig)
 
 allnoconfig: $(obj)/conf
-	$< -n arch/$(ARCH)/Kconfig
+	$< -n $(Kconfig)
 
 allmodconfig: $(obj)/conf
-	$< -m arch/$(ARCH)/Kconfig
+	$< -m $(Kconfig)
 
 defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
-	$< -d arch/$(ARCH)/Kconfig
+	$< -d $(Kconfig)
 else
 	@echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
-	$(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig
+	$(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
 endif
 
 %_defconfig: $(obj)/conf
-	$(Q)$< -D arch/$(SRCARCH)/configs/$@ arch/$(ARCH)/Kconfig
+	$(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig)
 
 # Help text used by make help
 help:
-- 
1.5.3.4.1157.g0e74-dirty

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] kill i386 and x86_64 directories, Sam Ravnborg, (Thu Oct 25, 3:56 pm)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Thomas Gleixner, (Thu Oct 25, 4:17 pm)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Sam Ravnborg, (Fri Oct 26, 2:23 am)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Arjan van de Ven, (Fri Oct 26, 10:39 am)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Alan Cox, (Fri Oct 26, 8:01 am)
[GIT PULL] kill i386 and x86_64 directories, Sam Ravnborg, (Thu Oct 25, 5:12 pm)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Sam Ravnborg, (Thu Oct 25, 4:14 pm)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Kay Sievers, (Thu Oct 25, 4:19 pm)
Re: [PATCH 0/6] kill i386 and x86_64 directories, Sam Ravnborg, (Thu Oct 25, 4:36 pm)
[PATCH 4/6] kconfig: small code refactoring in kconfig Makef..., Sam Ravnborg, (Thu Oct 25, 4:05 pm)