From patchwork Sun Jul 7 18:43:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 257372 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 2309E2C009C for ; Mon, 8 Jul 2013 04:45:17 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B9CB9A0143; Sun, 7 Jul 2013 18:45:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m57okV4jcWjN; Sun, 7 Jul 2013 18:45:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5EC01A0132; Sun, 7 Jul 2013 18:45:09 +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 BCEDB8F753 for ; Sun, 7 Jul 2013 18:45:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A211D8AA65 for ; Sun, 7 Jul 2013 18:45:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vBC3lFC8rM6q for ; Sun, 7 Jul 2013 18:45:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9C5018ABBB for ; Sun, 7 Jul 2013 18:45:05 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id z11so3076168wgg.34 for ; Sun, 07 Jul 2013 11:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Si0I52R09ujOuqQwAaxQ0GWM1Sv7ynfRm1H9Q7baq3A=; b=K7lK0EgLcCHUiXKB9OA+1R8B+MA3nhZiX2bIYa5RAdtIH0SbEo1eREg0XUUk+AwE+e BzxXtZqN9SQqFM6pV2uz8l2SJ8evisrAJqEwL/HwQlhGamvnRmOviCaJJZv8r9YW+rAD Wepxt0y57AbXgldhI22mVJY6ju3BvrWX3M1PcNfN6YAGtM6DZRH5n68twQt0xcMu5guB NFn/QdfbzreaGWWgxlUS/uyPSzd12kz2DTFyMcGOs9Ru1RVozbG5Sd2pqzL5DL4UuqeK AQdt+K2FzEoUpbdVAOirAF87wxoNuhRmAf9ZWceAIdMp/CGkoksIf77GOrVyD9s1Decm 1Cjw== X-Received: by 10.194.22.167 with SMTP id e7mr10711833wjf.68.1373222703619; Sun, 07 Jul 2013 11:45:03 -0700 (PDT) Received: from laptop.aldebaran.lan (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id fd3sm50883292wic.10.2013.07.07.11.45.02 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 11:45:03 -0700 (PDT) From: Samuel Martin To: buildroot@busybox.net Date: Sun, 7 Jul 2013 20:43:43 +0200 Message-Id: <1373222625-9013-1-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.8.3.2 Subject: [Buildroot] [PATCH 1/3] infra: make possible to run 'make *-menuconfig' from a clean output dir 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 Fixes #5678 This patch allows to run: $ make clean menuconfig $ make {barebox,busybox,ctng,linux,uclibc}-menuconfig with ccache enabled or not. This patch introduce a new make variable BASE_PKGS for packages like host-ccache that need to be handled beforehand. These packages are added to the dependency list of any packages, except for those from the BASE_PKGS list. This also implies that if there are some dependency relationships between two packages from the BASE_PKGS list, then these dependencies should be manually handled. Signed-off-by: Samuel Martin --- Makefile | 6 ++++-- package/pkg-generic.mk | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 955e684..015fbdf 100644 --- a/Makefile +++ b/Makefile @@ -220,7 +220,7 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) ################################################################################ ifeq ($(BR2_CCACHE),y) -BASE_TARGETS += host-ccache +BASE_PKGS += host-ccache endif ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) @@ -361,7 +361,7 @@ include fs/common.mk TARGETS+=target-post-image TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) -TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) +TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS) $(BASE_PKGS)) TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS)) @@ -397,6 +397,8 @@ $(BASE_TARGETS): dirs $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake $(BUILD_DIR)/buildroot-config/auto.conf: $(BUILDROOT_CONFIG) $(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig +BASE_TARGETS += $(BASE_PKGS) + prepare: $(BUILD_DIR)/buildroot-config/auto.conf toolchain: prepare dirs dependencies $(BASE_TARGETS) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 668f011..282ce99 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -303,6 +303,9 @@ $(2)_REDISTRIBUTE ?= YES $(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +ifeq ($(filter $(1),$(BASE_PKGS)),) +$(2)_DEPENDENCIES += $(BASE_PKGS) +endif $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO