From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 30.mail-out.ovh.net ([213.186.62.213]) by bombadil.infradead.org with smtp (Exim 4.72 #1 (Red Hat Linux)) id 1Obb1o-00085x-1u for barebox@lists.infradead.org; Wed, 21 Jul 2010 15:16:15 +0000 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 21 Jul 2010 17:05:22 +0200 Message-Id: <1279724722-31325-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/1] barebox_default_env: fix out of tree build To: barebox@lists.infradead.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- common/Makefile | 8 +++++--- scripts/genenv | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/common/Makefile b/common/Makefile index 8b8686d..14f8643 100644 --- a/common/Makefile +++ b/common/Makefile @@ -26,6 +26,8 @@ ENV_FILES := $(shell cd $(srctree); for i in $(CONFIG_DEFAULT_ENVIRONMENT_PATH); endif # ifdef CONFIG_DEFAULT_ENVIRONMENT -include/barebox_default_env.h: $(ENV_FILES) - $(Q)scripts/genenv $(srctree) $(CONFIG_DEFAULT_ENVIRONMENT_PATH) - $(Q)cat barebox_default_env | scripts/bin2c default_environment > $@ +barebox_default_env: $(ENV_FILES) + $(Q)$(srctree)/scripts/genenv $(srctree) $(objtree) $(CONFIG_DEFAULT_ENVIRONMENT_PATH) + +include/barebox_default_env.h: barebox_default_env + $(Q)cat $< | $(objtree)/scripts/bin2c default_environment > $@ diff --git a/scripts/genenv b/scripts/genenv index 6a833b1..de8b4f1 100755 --- a/scripts/genenv +++ b/scripts/genenv @@ -1,17 +1,19 @@ #!/bin/bash # Generate the default environment file from a list of directories -# usage: genenv ... +# usage: genenv ... # where is the base directory for relative pathes in +# where is the base directory for relative pathes for result +objtree=$2 cd $1 || exit 1 -shift +shift 2 tempdir=$(mktemp -d) for i in $*; do cp -r $i/* $tempdir done -scripts/bareboxenv -s $tempdir barebox_default_env +$objtree/scripts/bareboxenv -s $tempdir $objtree/barebox_default_env rm -r $tempdir -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox