integrating make and git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]