[U-Boot] "make clean" not traversing into board-specific directories?

James Chargin jimccrown at gmail.com
Sat May 14 00:41:51 CEST 2016


Hi,

On 05/13/2016 01:50 PM, Fabio Estevam wrote:
> Hi Jörg,
>
> On Fri, May 13, 2016 at 1:57 PM,
> <Joerg.Scheuermann at continental-corporation.com> wrote:
>> Hello,
>>
>> I am using u-boot 2015.04 and have a mechanism implemented in the
>> board-specific Makefile for our board,
>> which uses xsltproc to generate header-files from xml input files - this
>> part is working by now.
>>
>> what is still not working is the removal of those generated files upon
>> calling "make clean",
>> and after some initial inspection I found out, that the board-specific
>> directories are completely ignored when calling "make clean"!
>>
>> - why is that the case, can't those directories not also be visited when
>> cleaning things up?
>
> It works fine for me.
>
> I built mx7dsabresd_defconfig with mainline U-boot and after that I see:
>
> ls board/freescale/mx7dsabresd/
> built-in.o    imximage.cfg.cfgtmp  MAINTAINERS  mx7dsabresd.c
> mx7dsabresd.o
> imximage.cfg  Kconfig              Makefile     mx7dsabresd.su
>
> Then after a 'make clean'
>
> ls board/freescale/mx7dsabresd/
> imximage.cfg  Kconfig  MAINTAINERS  Makefile  mx7dsabresd.c
>
> ,which worked as expected.

In March of 2015, I was told that the board directories are not visited 
for "make clean". Quoting Mr. Masahiro Yamada

 >
 > CLEAN_FILES is only available at the top-level Makefile.
 >
 > Add
 > CLEAN_FILES += board/my_board/test.img
 > to the top-level Makefile, and it should work.
 >
 >
 >> clean-files += test.img
 >> clean-files := test.img
 >
 > These are correct in sub-directory Makefiles in general,
 > but unfortunately, "make clean" does not descend into board/ directory
 > for some reason.
 >
 > So, they do not work in board/*/Makefile
 >

This was quite a while ago, so changes may have been made for more 
recent releases. But at one time (v2014.07), "make clean" did not visit 
board directories.

Regards,

-- 
Jim Chargin
AJA Video Systems                       jimc at aja.com
(530) 271-3334                          http://www.aja.com


More information about the U-Boot mailing list