mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/1] barebox_default_env: fix out of tree build
@ 2010-07-21 15:05 Jean-Christophe PLAGNIOL-VILLARD
  2010-07-23  6:21 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-07-21 15:05 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 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 <basedir> <dir>...
+# usage: genenv <basedir> <objdir> <dir>...
 # where <basedir> is the base directory for relative pathes in <dir>
+# where <objdir> 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

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

* Re: [PATCH 1/1] barebox_default_env: fix out of tree build
  2010-07-21 15:05 [PATCH 1/1] barebox_default_env: fix out of tree build Jean-Christophe PLAGNIOL-VILLARD
@ 2010-07-23  6:21 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2010-07-23  6:21 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

Hi Jean Christophe,

Applied to -next.

Thanks
 Sascha

On Wed, Jul 21, 2010 at 05:05:22PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  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 <basedir> <dir>...
> +# usage: genenv <basedir> <objdir> <dir>...
>  # where <basedir> is the base directory for relative pathes in <dir>
> +# where <objdir> 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
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2010-07-23  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-21 15:05 [PATCH 1/1] barebox_default_env: fix out of tree build Jean-Christophe PLAGNIOL-VILLARD
2010-07-23  6:21 ` Sascha Hauer

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