[Buildroot] [PATCH 1/9 v2] core: add the possibility to provide help for custom rules

Yann E. MORIN yann.morin.1998 at free.fr
Sat Mar 19 18:56:59 UTC 2016


Thomas, All,

On 2016-03-19 19:05 +0100, Thomas Petazzoni spake thusly:
> On Fri, 11 Mar 2016 18:41:09 +0100, Yann E. MORIN wrote:
> 
> > diff --git a/Makefile b/Makefile
> > index 98c8dc7..7bb5f6d 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -966,6 +966,7 @@ endif
> >  	@echo '  source-check           - check selected packages for valid download URLs'
> >  	@echo '  external-deps          - list external packages used'
> >  	@echo '  legal-info             - generate info about license compliance'
> > +	@echo '  help-custom            - print help about custom actions (if any)'
> >  	@echo
> >  	@echo '  make V=0|1             - 0 => quiet build (default), 1 => verbose build'
> >  	@echo '  make O=dir             - Locate all output files in "dir", including .config'
> > @@ -974,6 +975,12 @@ endif
> >  	@echo 'it on-line at http://buildroot.org/docs.html'
> >  	@echo
> >  
> > +# This rule does nothing, it is expected to be overloaded by
> > +# a br2-external tree or a local.mk . However, it must exist,
> > +# as we reference it in the main help, above. Making the rule
> > +# .PHONY does not work.
> > +help-custom:
> > +
> 
> There is a pretty important problem with this implementation (which
> gets even worse when PATCH 2 is applied), but I am not sure why it
> happens: the custom help is not taken into account if you don't have a
> configuration file defined. This is weird, because BR2_EXTERNAL_FILE
> gets included outside of the BR2_HAVE_DOT_CONFIG condition. But still:
> 
> thomas at skate:~/projets/buildroot (master)$ cat /tmp/external/external.mk 
> help-custom:
> 	@echo TEST
> thomas at skate:~/projets/buildroot (master)$ make BR2_EXTERNAL=/tmp/external help-custom
> make[1]: Nothing to be done for 'help-custom'.
> 
> And then, if I create a .config file:
> 
> thomas at skate:~/projets/buildroot (master)$ make defconfig
> [...]
> thomas at skate:~/projets/buildroot (master)$ make BR2_EXTERNAL=/tmp/external help-custom
> TEST
> 
> This is not expected, since the help text is supposed to be available
> even when no configuration has been defined.

Indeed, that's bad.

However, the proposal by Jérôme has exactly the same problem.

I'll look at it. Thanks! :-)

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