[U-Boot] [PATCH] Makefile: use find to simplify clobber and avoid some bash problem

Mike Frysinger vapier at gentoo.org
Wed Nov 12 19:14:19 CET 2008


On Wed, Nov 12, 2008 at 1:06 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> -       @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

your changelog makes no sense.  the problem is that brace expansion is
not in POSIX and so it'll fail on systems that do not use bash by
default (like Ubuntu).  please put a real explanation into your
changelog.

you should use `find ... -print0 | xargs -0 ...` or `find ... -exec
... {} +`.  using `find ... -print | xargs ...` is broken.
-mike


More information about the U-Boot mailing list