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
Llynn.lin@emc.com <lynn.lin@emc.com>
Date
Jul 25, 2010, 12:37 UTC
Message-ID
<7F48A44C0E1FBF48B00D4DA49C85432E54F9A1@CORPUSMX100A.corp.emc.com>
In-Reply-To
<AANLkTinjmUEHxnGI2kRBwN17689MEwRRX_1uOQx-ZaHY@mail.gmail.com>
-----Original Message-----
From: Ævar Arnfjörð Bjarmason [mailto:avarab@gmail.com] 
Sent: 2010年7月25日 20:34
To: Lin, Lynn
Cc: schwab@linux-m68k.org; kpfleming@digium.com; git@vger.kernel.org
Subject: Re: [PATCH] Makefile: don't include git version file on 'make clean'
On Sun, Jul 25, 2010 at 12:29,  <lynn.lin@emc.com> wrote:
> My patch is to don't call GIT-VERSION-FILE target when you run 'make clean'

Yes, but as I demonstrated it gets called anyway. Presumably because of the $(MAKE) -C ... clean rules. But I haven't looked into it.

If we don't specify special goals, when we run any target ,it will call GIT-VERSIONF-FILE target as it include this target 

Example from GNU make manual: http://www.gnu.org/software/autoconf/manual/make/Goals.html

An example of appropriate use is to avoid including .d files during clean rules (see Automatic Prerequisites), so make won't create them only to immediately remove them again:
          sources = foo.c bar.c
     
     ifneq ($(MAKECMDGOALS),clean)
     include $(sources:.c=.d)
     endif

Thanks Lynn

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 16 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.