Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] infra: make possible to run 'make *-menuconfig' from a clean output dir
@ 2013-07-07 18:43 Samuel Martin
  2013-07-07 18:43 ` [Buildroot] [PATCH 2/3] crosstool-ng: remove unneed explicit ccache dependency Samuel Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Samuel Martin @ 2013-07-07 18:43 UTC (permalink / raw)
  To: buildroot

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 <s.martin49@gmail.com>
---
 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
-- 
1.8.3.2

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

end of thread, other threads:[~2013-07-09 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-07 18:43 [Buildroot] [PATCH 1/3] infra: make possible to run 'make *-menuconfig' from a clean output dir Samuel Martin
2013-07-07 18:43 ` [Buildroot] [PATCH 2/3] crosstool-ng: remove unneed explicit ccache dependency Samuel Martin
2013-07-07 18:43 ` [Buildroot] [PATCH 3/3] sstrip: " Samuel Martin
2013-07-07 19:37 ` [Buildroot] [PATCH 1/3] infra: make possible to run 'make *-menuconfig' from a clean output dir Thomas Petazzoni
2013-07-09 21:02   ` Samuel Martin

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