[U-Boot] [PATCH v4 04/10] moveconfig: Add a switch to only cleanup headers

Masahiro Yamada yamada.masahiro at socionext.com
Tue May 19 04:03:11 CEST 2015


Hi Joe,

2015-05-16 6:40 GMT+09:00 Joe Hershberger <joe.hershberger at ni.com>:
> In some case you may want to only cleanup the headers. Make it possible
> without waiting for all boards to compile.
>
> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
>
> ---
>
> Changes in v4: None
> Changes in v3:
> -New for version 3
>
> Changes in v2: None
>
>  tools/moveconfig.py | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/tools/moveconfig.py b/tools/moveconfig.py
> index 3f31e81..b6db058 100755
> --- a/tools/moveconfig.py
> +++ b/tools/moveconfig.py
> @@ -146,6 +146,9 @@ Available options
>     Exit immediately if Make exits with a non-zero status while processing
>     a defconfig file.
>
> + -H, --headers-only
> +   Only cleanup the headers; skip the defconfig processing
> +
>   -j, --jobs
>     Specify the number of threads to run simultaneously.  If not specified,
>     the number of threads is the same as the number of CPU cores.
> @@ -770,8 +773,6 @@ def move_config(config_attrs, options):
>
>      slots.show_failed_boards()
>
> -    cleanup_headers(config_attrs, options.dry_run)
> -
>  def bad_recipe(filename, linenum, msg):
>      """Print error message with the file name and the line number and exit."""
>      sys.exit("%s: line %d: error : " % (filename, linenum) + msg)
> @@ -859,6 +860,9 @@ def main():
>      parser.add_option('-e', '--exit-on-error', action='store_true',
>                        default=False,
>                        help='exit immediately on any error')
> +    parser.add_option('-H', '--headers-only', dest='cleanup_headers_only',
> +                      action='store_true', default=False,
> +                      help='only cleanup the headers')
>      parser.add_option('-j', '--jobs', type='int', default=cpu_count,
>                        help='the number of jobs to run simultaneously')
>      parser.usage += ' recipe_file\n\n' + \
> @@ -879,7 +883,10 @@ def main():
>
>      update_cross_compile()
>
> -    move_config(config_attrs, options)
> +    if not options.cleanup_headers_only:
> +        move_config(config_attrs, options)
> +
> +    cleanup_headers(config_attrs, options.dry_run)
>
>  if __name__ == '__main__':
>      main()


Could you also move the check_top_directory() call
to main() function, above the move_config call.

We should make sure we are at the top directory
also for cleaning headers.



-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list