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

integrating make and git

From
ERE R <pc88mxer@gmail.com>
Date
Apr 15, 2009, 15:19 UTC
Message-ID
<3a69fa7c0904150819x7598dea5ic43bf0991c35ae45@mail.gmail.com>

I have an idea about integrating make with git, and I'm wondering if it is a reasonable thing to do.

First of all, I am under the impression that git can quickly compute a hash of a directory and its contents. Is that correct?

If so, suppose you using git to manage revision control of a project which has some components like 'lib1', 'lib2', etc. Typically you would perform something like: make clean; make all and 'make all' would perform 'make lib1' and 'make lib2'. When checking out a different revision of the project you would have to perform another 'make clean' before 'make all' since you aren't sure of what's changed and the timestamps of the derived files will be more recent than the timestamps of the source files.

Now suppose that making 'lib1' only depends on the source code in a certain directory. The idea is to associate the hash of the source directory for lib1 with its the derived files. Make can check this to determine if the component really needs to be rebuilt. Then as you move around in the repository you can avoid rebuilding components that haven't changed.

Good, bad, ugly?
Next: Matthieu Moy
Message 1 of 14 in “integrating make and git”
  1. E RApr 15, 2009
  2. Matthieu MoyApr 15, 2009
  3. Daniel BarkalowApr 15, 2009
  4. E RApr 15, 2009
  5. Robin RosenbergApr 15, 2009
  6. Jeff KingApr 16, 2009
  7. Matthieu MoyApr 16, 2009
  8. Nguyen Thai Ngoc DuyApr 16, 2009
  9. Daniel BarkalowApr 15, 2009
  10. John BitoApr 15, 2009
  11. Ben JacksonApr 16, 2009
  12. David KågedalApr 16, 2009
  13. Dmitry PotapovApr 17, 2009
  14. Ealdwulf WuffingaApr 18, 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.