* [Buildroot] Overriding DL_DIR in the environment
@ 2007-08-17 17:05 Ulf Samuelsson
2007-08-17 17:59 ` Cristian Ionescu-Idbohrn
2007-08-20 14:34 ` Bernhard Fischer
0 siblings, 2 replies; 6+ messages in thread
From: Ulf Samuelsson @ 2007-08-17 17:05 UTC (permalink / raw)
To: buildroot
I keep a central download location for all tarballs,
and find it a pain to always have to edit the DL_DIR
variable during "make menuconfig".
It would be nice to be able to override the ".config"
value of DL_DIR in the shell environment.
Here is a simple patch which will,
if you define
$ export BUILDROOT_DL_DIR /usr/local/install/downloads
in your ".bashrc", override the DL_DIR in the ".config".
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Index: Makefile
===================================================================
--- Makefile (revision 19542)
+++ Makefile (arbetskopia)
@@ -37,6 +37,9 @@
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
-include $(TOPDIR).config
endif
+ifneq ($(BUILDROOT_DL_DIR),)
+BR2_DL_DIR:=$(BUILDROOT_DL_DIR)
+endif
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
--------------------------------------------------------------------
Comments?
BR
Ulf Samuelsson
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Overriding DL_DIR in the environment
2007-08-17 17:05 [Buildroot] Overriding DL_DIR in the environment Ulf Samuelsson
@ 2007-08-17 17:59 ` Cristian Ionescu-Idbohrn
2007-08-17 19:05 ` Crane, Matthew
2007-08-20 14:34 ` Bernhard Fischer
1 sibling, 1 reply; 6+ messages in thread
From: Cristian Ionescu-Idbohrn @ 2007-08-17 17:59 UTC (permalink / raw)
To: buildroot
On Fri, 17 Aug 2007, Ulf Samuelsson wrote:
> I keep a central download location for all tarballs,
> and find it a pain to always have to edit the DL_DIR
> variable during "make menuconfig".
>
> It would be nice to be able to override the ".config"
> value of DL_DIR in the shell environment.
>
> Here is a simple patch which will,
> if you define
>
> $ export BUILDROOT_DL_DIR /usr/local/install/downloads
>
> in your ".bashrc", override the DL_DIR in the ".config".
Wouldn't a symlink (that's what I use) sort that out?
Cheers,
--
Cristian
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Overriding DL_DIR in the environment
2007-08-17 17:59 ` Cristian Ionescu-Idbohrn
@ 2007-08-17 19:05 ` Crane, Matthew
2007-08-17 20:42 ` Ulf Samuelsson
0 siblings, 1 reply; 6+ messages in thread
From: Crane, Matthew @ 2007-08-17 19:05 UTC (permalink / raw)
To: buildroot
I use a link as well, but should the option be added to the menus so
that it does not need to be specified in the environment?
Matt
-----Original Message-----
From: buildroot-bounces@uclibc.org [mailto:buildroot-bounces at uclibc.org]
On Behalf Of Cristian Ionescu-Idbohrn
Sent: Friday, August 17, 2007 1:59 PM
To: buildroot at uclibc.org
Subject: Re: [Buildroot] Overriding DL_DIR in the environment
On Fri, 17 Aug 2007, Ulf Samuelsson wrote:
> I keep a central download location for all tarballs,
> and find it a pain to always have to edit the DL_DIR
> variable during "make menuconfig".
>
> It would be nice to be able to override the ".config"
> value of DL_DIR in the shell environment.
>
> Here is a simple patch which will,
> if you define
>
> $ export BUILDROOT_DL_DIR /usr/local/install/downloads
>
> in your ".bashrc", override the DL_DIR in the ".config".
Wouldn't a symlink (that's what I use) sort that out?
Cheers,
--
Cristian
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Overriding DL_DIR in the environment
2007-08-17 19:05 ` Crane, Matthew
@ 2007-08-17 20:42 ` Ulf Samuelsson
2007-08-20 14:15 ` Crane, Matthew
0 siblings, 1 reply; 6+ messages in thread
From: Ulf Samuelsson @ 2007-08-17 20:42 UTC (permalink / raw)
To: buildroot
> -----Original Message-----
> From: buildroot-bounces at uclibc.org [mailto:buildroot-bounces at uclibc.org]
> On Behalf Of Cristian Ionescu-Idbohrn
> Sent: Friday, August 17, 2007 1:59 PM
> To: buildroot at uclibc.org
> Subject: Re: [Buildroot] Overriding DL_DIR in the environment
>
> On Fri, 17 Aug 2007, Ulf Samuelsson wrote:
>
>> I keep a central download location for all tarballs,
>> and find it a pain to always have to edit the DL_DIR
>> variable during "make menuconfig".
>>
>> It would be nice to be able to override the ".config"
>> value of DL_DIR in the shell environment.
>>
>> Here is a simple patch which will,
>> if you define
>>
>> $ export BUILDROOT_DL_DIR /usr/local/install/downloads
>>
>> in your ".bashrc", override the DL_DIR in the ".config".
>
> Wouldn't a symlink (that's what I use) sort that out?
>
>
> I use a link as well, but should the option be added to the menus so
> that it does not need to be specified in the environment?
>
> Matt
>
The purpose of this is to reduce typing and also to reduce potential errors.
Replacing "$(BASE_DIR)/dl" with "/usr/local/install/downloads"
will cost me 42 (!) keystrokes *every* time you create a new buildroot tree
"ln -s /usr/local/install/downloads dl"
will cost me 36 keystrokes - *every* time you create a new buildroot tree
It will add another directory to the build, so a little unneccessary clutter in the directory.
Setting the environment will cost me a few keystrokes *ONCE*.
If I fail to remember to do that, I will have to abort the build
because I do not want to waif for downloads of packages I already have on my machine.
------------------
After such a patch, you can still define a common location, either by
* changing DL_DIR from $(BASE_DIR)/dl to your own value in "make menuconfig"
* creating a symlink
In addition you can define your common location by
export BUILDROOT_DL_DIR <common location>
----
So far everyone has explained that a common location can be *achieved*
but that does not mean that it is superior to doing it with the help of the environment.
I am convinced that it is better to do it using the environment.
My question is really is if anyone can show any drawback in having this functionality in buildroot.
(Even if it is there, you don't have to use it)
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Overriding DL_DIR in the environment
2007-08-17 20:42 ` Ulf Samuelsson
@ 2007-08-20 14:15 ` Crane, Matthew
0 siblings, 0 replies; 6+ messages in thread
From: Crane, Matthew @ 2007-08-20 14:15 UTC (permalink / raw)
To: buildroot
<<<<<<
So far everyone has explained that a common location can be *achieved*
but that does not mean that it is superior to doing it with the help of
the environment.
I am convinced that it is better to do it using the environment.
My question is really is if anyone can show any drawback in having this
functionality in buildroot.
(Even if it is there, you don't have to use it)
Best Regards
Ulf Samuelsson
>>>>>>
Hi,
How is the dl dir different from many other settings that could aslo be
left in the environment?
If you have your setting in the environment can it not be picked up as
the default value for that config text entry? I think too that
quantifying the keystrokes is a superficial measure of the utility of
using environment variables, it is complexity that should be reduced and
maintainability that ought to be considered.
Matt
-----Original Message-----
From: Ulf Samuelsson [mailto:ulf at atmel.com]
Sent: Friday, August 17, 2007 4:43 PM
To: Crane, Matthew; buildroot at uclibc.org
Subject: Re: [Buildroot] Overriding DL_DIR in the environment
> -----Original Message-----
> From: buildroot-bounces at uclibc.org
[mailto:buildroot-bounces at uclibc.org]
> On Behalf Of Cristian Ionescu-Idbohrn
> Sent: Friday, August 17, 2007 1:59 PM
> To: buildroot at uclibc.org
> Subject: Re: [Buildroot] Overriding DL_DIR in the environment
>
> On Fri, 17 Aug 2007, Ulf Samuelsson wrote:
>
>> I keep a central download location for all tarballs,
>> and find it a pain to always have to edit the DL_DIR
>> variable during "make menuconfig".
>>
>> It would be nice to be able to override the ".config"
>> value of DL_DIR in the shell environment.
>>
>> Here is a simple patch which will,
>> if you define
>>
>> $ export BUILDROOT_DL_DIR /usr/local/install/downloads
>>
>> in your ".bashrc", override the DL_DIR in the ".config".
>
> Wouldn't a symlink (that's what I use) sort that out?
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Overriding DL_DIR in the environment
2007-08-17 17:05 [Buildroot] Overriding DL_DIR in the environment Ulf Samuelsson
2007-08-17 17:59 ` Cristian Ionescu-Idbohrn
@ 2007-08-20 14:34 ` Bernhard Fischer
1 sibling, 0 replies; 6+ messages in thread
From: Bernhard Fischer @ 2007-08-20 14:34 UTC (permalink / raw)
To: buildroot
On Fri, Aug 17, 2007 at 07:05:34PM +0200, Ulf Samuelsson wrote:
>I keep a central download location for all tarballs,
>and find it a pain to always have to edit the DL_DIR
>variable during "make menuconfig".
>
>It would be nice to be able to override the ".config"
>value of DL_DIR in the shell environment.
>
>Here is a simple patch which will,
>if you define
>
>$ export BUILDROOT_DL_DIR /usr/local/install/downloads
>
>in your ".bashrc", override the DL_DIR in the ".config".
>
>
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>Index: Makefile
>===================================================================
>--- Makefile (revision 19542)
>+++ Makefile (arbetskopia)
>@@ -37,6 +37,9 @@
> ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
> -include $(TOPDIR).config
> endif
>+ifneq ($(BUILDROOT_DL_DIR),)
This is whitespace-damaged (once again..)
If you add this to be noted via dependencies.sh then it's fine for me
provided that you fix that whitespace damage above.
That said, i usually symlink the DL_DIR to my usual repo of tarballs,
fwiw.
>+BR2_DL_DIR:=$(BUILDROOT_DL_DIR)
>+endif
>
> # To put more focus on warnings, be less verbose as default
> # Use 'make V=1' to see the full commands
>--------------------------------------------------------------------
>
>
>
>Comments?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-20 14:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 17:05 [Buildroot] Overriding DL_DIR in the environment Ulf Samuelsson
2007-08-17 17:59 ` Cristian Ionescu-Idbohrn
2007-08-17 19:05 ` Crane, Matthew
2007-08-17 20:42 ` Ulf Samuelsson
2007-08-20 14:15 ` Crane, Matthew
2007-08-20 14:34 ` Bernhard Fischer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox