Re: [PATCH v2] Tidy up 'clean' make target



On 3 March 2010 00:44, Peter Tyser <ptyser gmail com> wrote:
> Previously 'make clean' would not remove the following files:
> - bin/meld.install
> - meld/paths.py.install
>
> While we're at it, simplify the removal process by using 'find' instead
> of hardcoding paths.
>
> Signed-off-by: Peter Tyser <ptyser gmail com>
> ---
> Changes since v1:
> - Change find rule *pyc/*install to *.pyc/*.install based on Vincent's
>  comments
>
>  GNUmakefile |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/GNUmakefile b/GNUmakefile
> index 90b500b..89a23c1 100644
> --- a/GNUmakefile
> +++ b/GNUmakefile
> @@ -29,7 +29,9 @@ all: $(addsuffix .install,$(SPECIALS)) meld.desktop
>
>  .PHONY:clean
>  clean:
> -       -rm -f meld/*.pyc meld/ui/*.pyc meld/util/*.pyc meld/vc/*.pyc *.install data/meld.desktop *.bak data/ui/*.bak
> +       @find ./ -type f \( -name '*.pyc' -o -name '*.install' \
> +               -o -name '*.bak' \) -print0 | xargs -0 rm -f

There should actually be no need to remove *.bak in clean either, as
we don't create them in the 'build' process. I think the rule is only
there because glade used to create backup files, but it no longer
does.

Also, we shouldn't look in any directories other than bin/ and meld/.
po/ and help/ already have their own (possibly obsolete) clean rules,
and tools/ doesn't need it.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]