Re: [PATCH] Makefile: don't include git version file on 'make clean'

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

 



On Sat, Jul 24, 2010 at 03:53,  <Lynn.Lin@xxxxxxx> wrote:
> From: Lynn Lin <Lynn.Lin@xxxxxxx>
>
> ---
>  Makefile         |    4 +++-
>  git-gui/Makefile |    4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index bc3c570..eb28b98 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -238,7 +238,9 @@ all::
>
>  GIT-VERSION-FILE: FORCE
>        @$(SHELL_PATH) ./GIT-VERSION-GEN
> --include GIT-VERSION-FILE
> +ifneq "$(MAKECMDGOALS)" "clean"
> +  -include GIT-VERSION-FILE
> +endif
>
>  uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
>  uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
> diff --git a/git-gui/Makefile b/git-gui/Makefile
> index 197b55e..91e1ea5 100644
> --- a/git-gui/Makefile
> +++ b/git-gui/Makefile
> @@ -9,7 +9,9 @@ all::
>
>  GIT-VERSION-FILE: FORCE
>        @$(SHELL_PATH) ./GIT-VERSION-GEN
> --include GIT-VERSION-FILE
> +ifneq "$(MAKECMDGOALS)" "clean"
> +  -include GIT-VERSION-FILE
> +endif
>
>  uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
>  uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
> --
> 1.7.1

This patch needs a rationale, why was it needed? The "-include"
directive will simply ignore files that don't exist (as opposed to
"include"), so including GIT-VERSION-FILE during "make clean'
shouldn't be an issue.

Was it for you? And if so what version of make, what OS etc.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]