From patchwork Mon Apr 27 23:46:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Olivari X-Patchwork-Id: 465297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3C6B414007F for ; Tue, 28 Apr 2015 09:47:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=qca.qualcomm.com header.i=@qca.qualcomm.com header.b=fUFZl4Ro; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 306CE286F45; Tue, 28 Apr 2015 01:46:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 3C782280192 for ; Tue, 28 Apr 2015 01:46:04 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from sabertooth01.qualcomm.com (sabertooth01.qualcomm.com [65.197.215.72]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 28 Apr 2015 01:46:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1430178428; x=1461714428; h=from:to:cc:subject:date:message-id:mime-version; bh=/tsMlNimi0ar3CNiuxqAiiEZNTPV+GX4pe+F/sQJAQs=; b=fUFZl4RoghG7CRMeNn6cPbU42n6/HnQmCjSqw/gJ1RoiinombZN6Jnmt B9UHYil1hZW4hNqCvhyloqEF5L7GAib31sHt8KLHcNNOTb+dP+eGIe9aq xwPGF9j8gsv3PxMGtC3Eklkvi9dBzBS21Lc2D/mR0mihP8KkoIqEHyHe/ Y=; X-IronPort-AV: E=McAfee;i="5700,7163,7784"; a="87897684" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by sabertooth01.qualcomm.com with ESMTP; 27 Apr 2015 16:47:05 -0700 X-IronPort-AV: E=Sophos;i="5.11,660,1422950400"; d="scan'208";a="32370048" Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Apr 2015 16:47:05 -0700 Received: from mathieu-linux.qualcomm.com (10.80.80.8) by NASANEXM01G.na.qualcomm.com (10.85.0.33) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 27 Apr 2015 16:47:03 -0700 From: Mathieu Olivari To: Date: Mon, 27 Apr 2015 16:46:49 -0700 Message-ID: <1430178409-19140-1-git-send-email-mathieu@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm01a.na.qualcomm.com (10.85.0.81) To NASANEXM01G.na.qualcomm.com (10.85.0.33) Subject: [OpenWrt-Devel] [PATCH] build: don't call prereq for any package/symlinks rules X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Most of the time, we want to make sure OpenWrt has been configured and setup before start running make. However, in case of package/symlinks, forcing prereq as a dependency creates multiple issues: *when executed on a clean workspace, it will prompt for user input and open a menuconfig window before executing the feeds command *the only way around that is to provide a .config. However, the "prereq" target would then run a "make defconfig", which will remove all the packages in the .config but from external feeds, as feeds have not been installed yet. The only way to currently work around this, is to generate a fake config by running "make defconfig", then "make package/symlinks", copy the real config (which at this point disregards the previously generated config), and run make defconfig again. Something like this: make defconfig make package/symlinks cp real.config .config make defconfig This change is removing the need for the first defconfig, making the process more logical for OpenWrt users using the package/symlinks target. Signed-off-by: Mathieu Olivari --- include/toplevel.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/toplevel.mk b/include/toplevel.mk index d8651d9..b3b344d 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -178,6 +178,7 @@ ifeq ($(SDK),1) else %:: +ifeq ($(filter package/symlinks%,$(MAKECMDGOALS)),) @+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq @( \ cp .config tmp/.config; \ @@ -186,6 +187,7 @@ else printf "$(_R)WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \ fi \ ) +endif @+$(ULIMIT_FIX) $(SUBMAKE) -r $@ $(if $(WARN_PARALLEL_ERROR), || { \ printf "$(_R)Build failed - please re-run with -j1 to see the real error message$(_N)\n" >&2; \ false; \