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

Re: [PATCH/RFC 2/2 v3] Makefile: lazily compute header dependencies

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 28, 2009, 11:49 UTC
Message-ID
<20091128114937.GA10199@progeny.tock>
In-Reply-To
<m2bpint2yk.fsf@igel.home>
Andreas Schwab wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 7 quoted lines
>>  GIT-CFLAGS: .FORCE-GIT-CFLAGS
>> +	mkdir -p deps block-sha1/deps ppc/deps compat/deps \
>> +		compat/regex/deps compat/nedmalloc/deps compat/fnmatch/deps \
>> +		xdiff/deps
> 
> IMHO the list of directories should be factored out in a variable for
> easier maintenance.
Good idea, thanks.

Perhaps the the value for such a variable could be computed at build time. e.g.

depdirs := $(addsuffix /deps,$(sort $(dir $(OBJECTS))))
Show 9 quoted lines
>> @@ -1873,8 +1898,10 @@ distclean: clean
>>  	$(RM) configure
>>  
>>  clean:
>> -	$(RM) *.o block-sha1/*.o arm/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
>> +	$(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
>>  		$(LIB_FILE) $(XDIFF_LIB)
>> +	$(RM) -r deps block-sha1/deps ppc/deps compat/deps \
>> +		compat/*/deps xdiff/deps
Previous: Andreas SchwabNext: Nanako Shiraishi
Message 16 of 28 in “Makefile: determine the list of header files using a glob”
  1. Makefile: determine the list of header files using a globJohannes Sixt, Nov 27, 2009
  2. Mike HommeyNov 27, 2009
  3. Johannes SixtNov 27, 2009
  4. Mike HommeyNov 27, 2009
  5. Junio C HamanoNov 27, 2009
  6. Mike HommeyDec 30, 2009
  7. Junio C HamanoDec 30, 2009
  8. Johannes SchindelinNov 27, 2009
  9. 0/2 Lazily generate header dependenciesJonathan Nieder, Nov 27, 2009
  10. 1/2 Makefile: use target-specific variable to pass flags to ccJonathan Nieder, Nov 27, 2009
  11. 2/2 Makefile: automatically compute header dependenciesJonathan Nieder, Nov 27, 2009
  12. Sverre RabbelierNov 27, 2009
  13. Jonathan NiederNov 28, 2009
  14. 2/2 Makefile: lazily compute header dependenciesJonathan Nieder, Nov 28, 2009
  15. Andreas SchwabNov 28, 2009
  16. Jonathan NiederNov 28, 2009
  17. Nanako ShiraishiJan 1, 2010
  18. Junio C HamanoJan 6, 2010
  19. Johannes SchindelinJan 6, 2010
  20. Jonathan NiederJan 6, 2010
  21. 0/5 Lazily generate header dependenciesJonathan Nieder, Jan 7, 2010
  22. 1/5 Makefile: rearrange dependency rulesJonathan Nieder, Jan 7, 2010
  23. 2/5 Makefile: clear list of default rulesJonathan Nieder, Jan 7, 2010
  24. 3/5 Makefile: add OBJECTS variable listing object filesJonathan Nieder, Jan 7, 2010
  25. 4/5 Makefile: lazily compute header dependenciesJonathan Nieder, Jan 7, 2010
  26. 5/5 Teach Makefile to check header dependenciesJonathan Nieder, Jan 7, 2010
  27. Erik Faye-LundJan 7, 2010
  28. Junio C HamanoNov 27, 2009

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.