[U-Boot] [PATCH 1/2] Add a "tidy" build option
Simon Glass
sjg at chromium.org
Tue Nov 22 03:28:41 CET 2011
Hi Andy,
On Mon, Nov 21, 2011 at 3:40 PM, Andy Fleming <afleming at freescale.com> wrote:
> It is sometimes desireable to clean up the byproducts of the build
> process without removing the executable results. "make clean" is
> close, but leaves the build directory with a large number of
> *.depend* files. This new build option invokes make clean, and then
> removes the depend files.
Rather than adding another target, why not just make the 'clean' target do this?
It would also be useful IMO to put a comment in the Makefile as to
what the targets are for. I think it is something like:
clean - cleans all intermediate files
clobber - as clean, and cleans all output files also
distclean - as clobber, but also removes entire output directory if O= is used
Regards,
Simon
>
> Signed-off-by: Andy Fleming <afleming at freescale.com>
> ---
> Makefile | 13 ++++++++-----
> 1 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index fb658f4..0beb083 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -777,11 +777,14 @@ clean:
> -o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \
> | xargs rm -f
>
> -clobber: clean
> - @find $(OBJTREE) -type f \( -name '*.depend*' \
> - -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
> - -print0 \
> - | xargs -0 rm -f
> +# Removes everything not needed for testing u-boot
> +tidy: clean
> + @find $(OBJTREE) -type f \( -name '*.depend*' \) -print | xargs rm -f
> +
> +clobber: tidy
> + @find $(OBJTREE) -type f \( -name '*.srec' \
> + -o -name '*.bin' -o -name u-boot.img \) \
> + -print0 | xargs -0 rm -f
> @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-y)
> --
> 1.7.3.4
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
More information about the U-Boot
mailing list