Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] svn commit: trunk/buildroot
@ 2008-06-23 13:47 jacmet at uclibc.org
  2008-06-23 13:58 ` [Buildroot] Out of tree builds (was Re: svn commit: trunk/buildroot) Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: jacmet at uclibc.org @ 2008-06-23 13:47 UTC (permalink / raw)
  To: buildroot

Author: jacmet
Date: 2008-06-23 06:47:37 -0700 (Mon, 23 Jun 2008)
New Revision: 22481

Log:
Makefile: don't include .config from TOPDIR

If we ever want to support building out of tree, having the .config in the
tree is probably not what we want.


Modified:
   trunk/buildroot/Makefile


Changeset:
Modified: trunk/buildroot/Makefile
===================================================================
--- trunk/buildroot/Makefile	2008-06-23 13:40:34 UTC (rev 22480)
+++ trunk/buildroot/Makefile	2008-06-23 13:47:37 UTC (rev 22481)
@@ -44,7 +44,7 @@
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
 ifeq ($(BOARD),)
 # if "make BOARD=xyz" command
--include $(TOPDIR).config
+-include .config
 else
 # if "make" command
 -include $(BR2_LOCAL)/$(BOARD)/$(BOARD).config

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

* [Buildroot] Out of tree builds (was Re: svn commit: trunk/buildroot)
  2008-06-23 13:47 [Buildroot] svn commit: trunk/buildroot jacmet at uclibc.org
@ 2008-06-23 13:58 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2008-06-23 13:58 UTC (permalink / raw)
  To: buildroot

>>>>> "jacmet" == jacmet  <jacmet@uclibc.org> writes:

Hi,

 jacmet> Author: jacmet
 jacmet> Date: 2008-06-23 06:47:37 -0700 (Mon, 23 Jun 2008)
 jacmet> New Revision: 22481

 jacmet> Log:
 jacmet> Makefile: don't include .config from TOPDIR

 jacmet> If we ever want to support building out of tree, having the
 jacmet> .config in the tree is probably not what we want.

Do we want to support out of tree builds? The toplevel Makefile has
had a TOPDIR variable since forever, but it'll take a bit of work to
get it running.

The basics are easy to do, E.G.:

diff --git a/Makefile b/Makefile
index 73d9208..b81d330 100644
--- a/Makefile
+++ b/Makefile
@@ -21,10 +21,17 @@
 # Just run 'make menuconfig', configure stuff, then run 'make'.
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
-TOPDIR=./
-CONFIG_CONFIG_IN=Config.in
-CONFIG_DEFCONFIG=.defconfig
+
+# buildroot sources are in same directory as Makefile
+TOPDIR:=$(dir $(firstword $(MAKEFILE_LIST)))
+
+# for kbuild
+srctree:=$(TOPDIR)
+export srctree
+
+CONFIG_CONFIG_IN=$(TOPDIR)/Config.in
+CONFIG_DEFCONFIG=$(TOPDIR)/.defconfig
-CONFIG=package/config
+CONFIG=$(TOPDIR)/package/config
 DATE:=$(shell date +%Y%m%d)
 
 noconfig_targets:=menuconfig config oldconfig randconfig \

But the big issue is everywhere we expect to be in the source
directory, so we'll need to prepend $(TOPDIR)/ to every include line
(make -I doesn't work for wildcards), patch-kernel.sh calls and so on.

With all that in place it should be possible to do:

% mkdir build && cd build
% make -f /path/to/buildroot/Makefile  menuconfig
% make -f /path/to/buildroot/Makefile

What do you say?

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2008-06-23 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23 13:47 [Buildroot] svn commit: trunk/buildroot jacmet at uclibc.org
2008-06-23 13:58 ` [Buildroot] Out of tree builds (was Re: svn commit: trunk/buildroot) Peter Korsgaard

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