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

Re: [PATCH/RFC] "Recursive Make considered harmful"

From
Sam Ravnborg <sam@ravnborg.org>
Date
Jul 29, 2005, 07:31 UTC
Message-ID
<20050729073134.GA6507@mars.ravnborg.org>
In-Reply-To
<20050729065335.GA32263@mythryan2.michonline.com>
Show 5 quoted lines
> > While I do not have strong objections to make the build process
> > go faster, it is somewhat disturbing that the Makefile pieces
> > maintained in subdirectories need to name things they touch
> > using paths that include the subdirectory names.  I do not have
> > a better alternative to suggest, though...

If the goal is to speed up the build process the only sane way is to fix the dependencies. In kbuild fixdep is used to parse the .c file and it locates all references to .h files (recursive) and also detects any usage of CONFIG_ symbols. This part should be relative straightforward to include in git.

Show 11 quoted lines
> I think I'm going to rethink this, a bit more.  I'm unhappy with how I
> had to edit the sub-dir Makefiles to include directory names.  Sam, if
> you happen to be reading this, feel free to help out!
> 
> I'm almost thinking that something like:
> 
> 	PROGS := 
> 	SCRIPTS :=
> 	include x/Makefile.inc
> 	PROGRAMS += $(addprefix x/,$PROGS)
> 	ALL_SCRIPTS += $(addprefix x/,$SCRIPTS)

That is doable for sure. But it hits you hard when you have to create some special rules in a subdirectory - then you need to know in what directory you are placed. You could assing sub := x before including x/Makefile.inc.

On the other hand. The recursive make considered harmful is IMHO a bit overaggregated. See the kernel where it is used extensively. And it works with no hassle. For a small project like git it should be possible to keep the dependencies in proper shape so there is no cross directory boundaries to worry about - or at least only a few.

	Sam
Previous: Ryan AndersonNext: Petr Baudis
Message 14 of 16 in “"Recursive Make considered harmful"”
  1. "Recursive Make considered harmful"Ryan Anderson, Jul 27, 2005
  2. A Large Angry SCMJul 27, 2005
  3. Kirby C. BohlingJul 27, 2005
  4. A Large Angry SCMJul 27, 2005
  5. Junio C HamanoJul 27, 2005
  6. A Large Angry SCMJul 27, 2005
  7. Petr BaudisJul 28, 2005
  8. Matthias UrlichsJul 28, 2005
  9. Junio C HamanoJul 28, 2005
  10. Matthias UrlichsJul 28, 2005
  11. Junio C HamanoJul 28, 2005
  12. A Large Angry SCMJul 28, 2005
  13. Ryan AndersonJul 29, 2005
  14. Sam RavnborgJul 29, 2005
  15. Petr BaudisJul 29, 2005
  16. Timo HirvonenJul 29, 2005

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.