Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tzu-Jung Lee <roylee17@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] config: support overlay
Date: Sun, 29 Jul 2012 23:59:50 +0800	[thread overview]
Message-ID: <1343577590-14362-2-git-send-email-roylee17@gmail.com> (raw)
In-Reply-To: <1343577590-14362-1-git-send-email-roylee17@gmail.com>

Change-Id: I2c2b03ed1dde44bfb3ae6c1aaa8c548bbb3d1e9d
Signed-off-by: Tzu-Jung Lee <roylee17@gmail.com>
---
 Makefile |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 98e1a51..665251a 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,11 @@ endif
 
 # absolute path
 TOPDIR:=$(shell pwd)
+ifneq ($(OVERLAY_DIR),)
+CONFIG_CONFIG_IN=$(OVERLAY_DIR)/Config.in
+else
 CONFIG_CONFIG_IN=Config.in
+endif
 CONFIG=support/kconfig
 DATE:=$(shell date +%Y%m%d)
 
@@ -60,8 +64,13 @@ empty:=
 space:=$(empty) $(empty)
 
 ifneq ("$(origin O)", "command line")
+ifneq ($(OVERLAY_DIR),)
 O:=output
+CONFIG_DIR:=$(OVERLAY_DIR)
+else
+O:=$(TOPDIR)/../output
 CONFIG_DIR:=$(TOPDIR)
+endif
 NEED_WRAPPER=
 else
 # other packages might also support Linux-style out of tree builds
@@ -576,6 +585,10 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(BR2_DEFCONFIG),=$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)
 
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(OVERLAY_DIR)/configs/%_defconfig outputmakefile
+	@mkdir -p $(BUILD_DIR)/buildroot-config
+	@$(COMMON_CONFIG_ENV) $< --defconfig=$(OVERLAY_DIR)/configs/$@ $(CONFIG_CONFIG_IN)
+
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
-- 
1.7.8.6

  reply	other threads:[~2012-07-29 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29 15:59 [Buildroot] [PATCH 1/2] config: split Config.in two stages Tzu-Jung Lee
2012-07-29 15:59 ` Tzu-Jung Lee [this message]
2012-07-29 16:23   ` [Buildroot] [PATCH 2/2] config: support overlay Tzu-Jung Lee
2012-07-31  6:47     ` Avishay Orpaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343577590-14362-2-git-send-email-roylee17@gmail.com \
    --to=roylee17@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox