[Buildroot] [PATCH 1/4 v2] tools: add a directory to store some useful user-facing tools

Yann E. MORIN yann.morin.1998 at free.fr
Thu Jun 22 19:18:24 UTC 2017


Arnout, All,

On 2017-06-21 23:44 +0200, Arnout Vandecappelle spake thusly:
> On 21-06-17 07:21, Yann E. MORIN wrote:
> > Ricardo, All,
> > 
> > On 2017-06-20 23:06 -0300, Ricardo Martincoski spake thusly:
> >> On Mon, Jun 19, 2017 at 12:42 PM, Yann E. MORIN wrote:
> >>> On 2017-06-18 22:11 -0300, Ricardo Martincoski spake thusly:
> >> [snip]
> >>>> BUT if it is called without a .config file, it hangs forever waiting for input,
> >>>> and the menuconfig is sent to the log file.
> >>>
> >>> Indeed, my use-case is to only use it in an already-configured tree.
> >>>
> >>>> Maybe we can bailout if no .config is present.
> >>>
> >>> Hmmm... It's not trivial do detect, because the .config file is not
> >>> necessarily in the current directory, for example:
> >>>
> >>>     brmake -C /pat/to/buil-dir
> >>>
> >>> and I don't want to write a make option interpeter either...
> >>
> >> Oh, I see now it is not trivial.
> 
>  How about instead make the script do
> 
> make -C ${0%/*}/.. O=${PWD} "${@}"

What if one calls it with:  brmake -C /path/to/my/O-dir

But as much as we try to 'fix' it, we always uncover corner cases,
becausze the above would consider ${PWD} to be the output dir if
/path/to/my/O-dir is not already configured... :-/

Corner cases after corner cases, I think I'd just try to catch the
obvious and trivial, and leave out the weird cases.

So, either there is a .config in the CWD, or we abort. Deal? ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list