From patchwork Fri May 4 15:40:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 156961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id F3F6CB6FD8 for ; Sat, 5 May 2012 01:41:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 17B0EA033E; Fri, 4 May 2012 15:41:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1-9lcisDROHN; Fri, 4 May 2012 15:41:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9B761A0306; Fri, 4 May 2012 15:41:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D3CC68F753 for ; Fri, 4 May 2012 15:41:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BF1228A50F for ; Fri, 4 May 2012 15:41:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bXXxYDi7Zc0Q for ; Fri, 4 May 2012 15:41:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by whitealder.osuosl.org (Postfix) with ESMTP id 08C5C8A3D0 for ; Fri, 4 May 2012 15:41:03 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id A06C0195; Fri, 4 May 2012 17:41:01 +0200 (CEST) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 04136148 for ; Fri, 4 May 2012 17:40:54 +0200 (CEST) From: Thomas Petazzoni To: buildroot@busybox.net Date: Fri, 4 May 2012 17:40:53 +0200 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH 1/1] linux: improve the 'make linux-*' special commands X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch improves two things: * It makes sure that the linux-menuconfig and al. commands can be executed even if the user hasn't executed 'make' before. Until now, the commands were depending on the .configured stamp, which is not sufficient since the linux package has been converted to the GENTARGETS infrastructure. Instead, depend on the linux-configure phony target. * It makes sure that those commands are not available when the Linux package is not selected, just like we do for Barebox. Signed-off-by: Thomas Petazzoni --- linux/linux.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index 16f9916..34f8623 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -203,17 +203,18 @@ include linux/linux-ext-*.mk $(eval $(call GENTARGETS)) -linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX_DIR)/.stamp_configured +ifeq ($(BR2_LINUX_KERNEL),y) +linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs linux-configure $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \ $(subst linux-,,$(subst linux26-,,$@)) rm -f $(LINUX_DIR)/.stamp_{built,target_installed,images_installed} -linux-savedefconfig linux26-savedefconfig: dirs $(LINUX_DIR)/.stamp_configured +linux-savedefconfig linux26-savedefconfig: dirs linux-configure $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \ $(subst linux-,,$(subst linux26-,,$@)) ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) -linux-update-config linux26-update-config: $(LINUX_DIR)/.config +linux-update-config linux26-update-config: linux-configure $(LINUX_DIR)/.config cp -f $(LINUX_DIR)/.config $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) linux-update-defconfig linux26-update-defconfig: linux-savedefconfig @@ -222,6 +223,7 @@ else linux-update-config linux26-update-config: ; linux-update-defconfig linux26-update-defconfig: ; endif +endif # Support for rebuilding the kernel after the cpio archive has # been generated in $(BINARIES_DIR)/rootfs.cpio.