From: Peter Tyser Date: Wed, 12 Nov 2008 12:19:27 -0600 Subject: [U-Boot] [PATCH] Makefile: use find to simplify clobber and avoid some bash problem In-Reply-To: <1226513192-14724-1-git-send-email-plagnioj@jcrosoft.com> References: <1226511288.18428.1020.camel@localhost.localdomain> <1226513192-14724-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <1226513967.18428.1041.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 2008-11-12 at 19:06 +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > please try this on ubuntu > > Best Regards, > J. > Makefile | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 884b634..212451f 100644 > --- a/Makefile > +++ b/Makefile > @@ -3280,9 +3280,8 @@ clobber: clean > @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ > $(obj)cscope.* $(obj)*.*~ > @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL) > - @rm -f $(obj)tools/{crc32.c,env_embedded.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes} > - @rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c,zlib.h} > - @rm -f $(obj)tools/{fdt_wip.c,libfdt_internal.h} > + @find $(obj)tools -name "*" -type l -print | xargs rm -f > + @rm -f $(obj)tools/inca-swap-bytes > @rm -f $(obj)cpu/mpc824x/bedbug_603e.c > @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm > @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f That should work, I had tried the same thing with 'find ./ -lname "*"'. I hesitated to use that in case someone had a symlink in their tools directory that they didn't want cleaned up by make clobber. I'm not sure why someone would have those symlinks hanging around, but who am I to judge what other people do:) Thanks, Peter