git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
KFKevin P. Fleming <kpfleming@digium.com>
Date
Jul 25, 2010, 08:49 UTC
Message-ID
<4C4BFAA3.3050700@digium.com>
In-Reply-To
<AANLkTilYXdVI_fqG5ZvPEABTXt7fTps3ZbPiiWgVnDxS@mail.gmail.com>
On 07/24/2010 02:36 PM, Ævar Arnfjörð Bjarmason wrote:
Show 45 quoted lines
> On Sat, Jul 24, 2010 at 03:53,  <Lynn.Lin@emc.com> wrote:
>> From: Lynn Lin <Lynn.Lin@emc.com>
>>
>> ---
>>  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.

Just guessing here, but since GIT-VERSION-FILE has a 'FORCE' prerequisite, that means that the operations to generate it will be run even for 'make clean', which is not useful for the cleaning operation. It's probably not harmful either... but maybe the OP has some more significant reason for this patch.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming@digium.com
Check us out at www.digium.com & www.asterisk.org
Previous: Ævar Arnfjörð BjarmasonNext: lynn.lin@emc.com
Message 3 of 19 in “Makefile: don't include git version file on 'make clean'”
  1. Makefile: don't include git version file on 'make clean'lynn.lin@emc.com, Jul 24, 2010
  2. Ævar Arnfjörð BjarmasonJul 24, 2010
  3. Kevin P. FlemingJul 25, 2010
  4. lynn.lin@emc.comJul 25, 2010
  5. Ævar Arnfjörð BjarmasonJul 25, 2010
  6. lynn.lin@emc.comJul 25, 2010
  7. Ævar Arnfjörð BjarmasonJul 25, 2010
  8. lynn.lin@emc.comJul 25, 2010
  9. Ævar Arnfjörð BjarmasonJul 25, 2010
  10. Andreas SchwabJul 25, 2010
  11. Ævar Arnfjörð BjarmasonJul 25, 2010
  12. lynn.lin@emc.comJul 25, 2010
  13. lynn.lin@emc.comJul 25, 2010
  14. lynn.lin@emc.comJul 25, 2010
  15. Ævar Arnfjörð BjarmasonJul 25, 2010
  16. lynn.lin@emc.comJul 25, 2010
  17. Ævar Arnfjörð BjarmasonJul 25, 2010
  18. lynn.lin@emc.comJul 25, 2010
  19. Patch follow-up conventions (Re: [PATCH] Makefile: don't include git version file on 'make clean')Jonathan Nieder, Jul 25, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.