* [U-Boot] "make clean" not traversing into board-specific directories?
@ 2016-05-13 16:57 Joerg.Scheuermann at continental-corporation.com
2016-05-13 20:50 ` Fabio Estevam
0 siblings, 1 reply; 6+ messages in thread
From: Joerg.Scheuermann at continental-corporation.com @ 2016-05-13 16:57 UTC (permalink / raw)
To: u-boot
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?
- where and what would I need to change for being able to clean
board-specific things, please?
(e.g. $BOARDDIR is empty for "make clean" - whereas it does contain the
correct value for "make all")
Mit freundlichen Gr??en/Best regards,
J?rg Scheuermann
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] "make clean" not traversing into board-specific directories?
2016-05-13 16:57 [U-Boot] "make clean" not traversing into board-specific directories? Joerg.Scheuermann at continental-corporation.com
@ 2016-05-13 20:50 ` Fabio Estevam
2016-05-13 22:41 ` James Chargin
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2016-05-13 20:50 UTC (permalink / raw)
To: u-boot
Hi J?rg,
On Fri, May 13, 2016 at 1:57 PM,
<Joerg.Scheuermann@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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] "make clean" not traversing into board-specific directories?
2016-05-13 20:50 ` Fabio Estevam
@ 2016-05-13 22:41 ` James Chargin
2016-05-14 9:10 ` Masahiro Yamada
0 siblings, 1 reply; 6+ messages in thread
From: James Chargin @ 2016-05-13 22:41 UTC (permalink / raw)
To: u-boot
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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] "make clean" not traversing into board-specific directories?
2016-05-13 22:41 ` James Chargin
@ 2016-05-14 9:10 ` Masahiro Yamada
2016-05-18 9:06 ` Joerg.Scheuermann at continental-corporation.com
0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2016-05-14 9:10 UTC (permalink / raw)
To: u-boot
2016-05-14 7:41 GMT+09:00 James Chargin <jimccrown@gmail.com>:
> 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@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.
>
Nothing has happened since then.
"make clean" still does not visit board directories.
For Fabio's case, '*.cfgtmp' is deleted by the pattern rule.
clean: $(clean-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '*.ko.*' -o -name '*.su' -o -name '*.cfgtmp' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.symtypes' -o -name 'modules.order' \
-o -name modules.builtin -o -name '.tmp_*.o.*' \
-o -name '*.gcno' \) -type f -print | xargs rm -f
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] "make clean" not traversing into board-specific directories?
2016-05-14 9:10 ` Masahiro Yamada
@ 2016-05-18 9:06 ` Joerg.Scheuermann at continental-corporation.com
2016-05-18 15:08 ` James Chargin
0 siblings, 1 reply; 6+ messages in thread
From: Joerg.Scheuermann at continental-corporation.com @ 2016-05-18 9:06 UTC (permalink / raw)
To: u-boot
> Von: Masahiro Yamada <yamada.masahiro@socionext.com>
> Datum: 14.05.2016 11:11
>
> 2016-05-14 7:41 GMT+09:00 James Chargin <jimccrown@gmail.com>:
> > 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@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.
> >
>
> Nothing has happened since then.
> "make clean" still does not visit board directories.
>
> For Fabio's case, '*.cfgtmp' is deleted by the pattern rule.
>
>
> clean: $(clean-dirs)
> $(call cmd,rmdirs)
> $(call cmd,rmfiles)
> @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .)
$(RCS_FIND_IGNORE) \
> \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
> -o -name '*.ko.*' -o -name '*.su' -o -name '*.cfgtmp' \
> -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
> -o -name '*.symtypes' -o -name 'modules.order' \
> -o -name modules.builtin -o -name '.tmp_*.o.*' \
> -o -name '*.gcno' \) -type f -print | xargs rm -f
>
>
>
>
>
> --
> Best Regards
> Masahiro Yamada
Hi again,
I 'solved' my case now by generating those headers into include/generated
- as there is some existing magic already, that purges this directory upon
"make distclean"
(which actually is all I needed...)
is that ok that way or are there some "rules" to not write board-specific
stuff into this directory perhaps?
(this may not work when building consecutive u-boots for different boards
WITHOUT "make distclean" in between
- but in my understanding this needs to be done in this case anyway,
correct?)
best regards,
J?rg
p.s.
just a thought:
maybe the reason for "make clean" ignoring the board-specific directories
is to make it functional
without the need to have a valid configuration at hand?
(in other words: "make all" requires a "make xyz_config" before - "make
clean/distclean/mrproper" does not)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] "make clean" not traversing into board-specific directories?
2016-05-18 9:06 ` Joerg.Scheuermann at continental-corporation.com
@ 2016-05-18 15:08 ` James Chargin
0 siblings, 0 replies; 6+ messages in thread
From: James Chargin @ 2016-05-18 15:08 UTC (permalink / raw)
To: u-boot
Dear J?rg,
On 05/18/2016 02:06 AM, Joerg.Scheuermann at continental-corporation.com wrote:
>> Von: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Datum: 14.05.2016 11:11
>>
>> 2016-05-14 7:41 GMT+09:00 James Chargin <jimccrown@gmail.com>:
>>> 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@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"!
>>>>>...
> Hi again,
>
> I 'solved' my case now by generating those headers into include/generated
> - as there is some existing magic already, that purges this directory upon
> "make distclean"
> (which actually is all I needed...)
Nice hack, good work.
>
> is that ok that way or are there some "rules" to not write board-specific
> stuff into this directory perhaps?
> (this may not work when building consecutive u-boots for different boards
> WITHOUT "make distclean" in between
> - but in my understanding this needs to be done in this case anyway,
> correct?)
In a U-Boot 2015.07 build I've got, the other files I see in
include/generated seem like they have been derived from the "make
<my-board>_config".
So, your work seems to me to be compatible with the way things work more
recently (I shouldn't be considered an authority on this).
I can't speak to what "rules" might say about it. I can't find any
documented, which seems pretty much like "there are no rules" :)
>
> best regards,
> J?rg
>
>
> p.s.
> just a thought:
> maybe the reason for "make clean" ignoring the board-specific directories
> is to make it functional
> without the need to have a valid configuration at hand?
> (in other words: "make all" requires a "make xyz_config" before - "make
> clean/distclean/mrproper" does not)
This is an excellent observation, thanks.
I'd guess it means that if changes are ever made so "make clean" visits
board directories, those changes will have be tolerant of there being no
configuration established.
Best regards,
Jim
--
Jim Chargin
AJA Video Systems jimc at aja.com
(530) 271-3334 http://www.aja.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-05-18 15:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 16:57 [U-Boot] "make clean" not traversing into board-specific directories? Joerg.Scheuermann at continental-corporation.com
2016-05-13 20:50 ` Fabio Estevam
2016-05-13 22:41 ` James Chargin
2016-05-14 9:10 ` Masahiro Yamada
2016-05-18 9:06 ` Joerg.Scheuermann at continental-corporation.com
2016-05-18 15:08 ` James Chargin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox