[U-Boot] [PATCH] punt unused clean/distclean targets

Mike Frysinger vapier at gentoo.org
Sun Sep 18 10:22:06 CEST 2011


On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > The top level Makefile does not do any recursion into subdirs when
> > cleaning, so these clean/distclean targets in random arch/board dirs
> > never get used.  Punt them all.
> 
> I think this is the wrong approach.  Would it not be better to get rid
> of the 60 lines of clean/clobber target in the top level Makefile,
> including it's brute force methods of "find ... | xargs rm -f" and
> actually remove the files from the Makefiles in the respective
> directories instead?
> 
> This would for example allow that a board maintainer can fix the clean
> / clobber rules for his code without having to edit the top level
> Makefile.

yes & no.  i think we should have 1 clean/distclean target, but also have a 
way for board maintainers to inject their own custom clean files.  preferably 
via a .mk file in their board subdir.  this is moving in the direction of non-
recursive make like the kernel does -- the top level would source all the 
subfiles to figure out the master clean list.

however, the current build system has one advantage which i think we should 
retain in the short term: `make distclean` always cleans out the targets 
regardless of the current config.  for example, if you do `make bf537-stamp` 
followed by `make harmony` followed by `make distclean`, Blackfin-specific 
objects will still get cleaned out.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110918/5e992134/attachment.pgp 


More information about the U-Boot mailing list