Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: git branches and compilation



On Jun 17, 12:57pm, Mikael Magnusson wrote:
}
} > Having been annoyed a couple of times by things not recompiling when a
} > different branch is checked out (especially the texinfo inputs in Doc/,
} > leading to reams of bad node errors when doing "make info") I dug into
} > this a bit further and found "metastore".
} 
} I don't quite understand the purpose... When you change branches you want
} the source files to have an updated mtime, otherwise they will not be newer
} than the build files of the previously checked out branch and make will not
} rebuild. So what git does is what you usually want for source code -> "the
} files on disk changed so rebuild". How does setting the timestamps older
} help?

This is probably because I'm using build trees that are separated from
the source tree (cf. patch in 31474) so I have several different sets
of build files with different timestamps.  When I change brances, only
the files that are different on the new branch get an updated mtime.  In
some case "different" means "reverted to an older version" which is not
really newly modified.

This causes the relative mtimes of source files to one another to be off,
so in some cases the Makefiles themselves need to be rebuilt but are not.
This also affects doc files that have cross-references and all need to be
rebuilt together, but don't have mutual dependency reflected in Makefile.

It's possible that in the latter case I'm just masking the problem and NOT
recompiling things that need to be.  As I said, I haven't had a chance to
test it very thoroughly.

I could believe that (re)storing timestamps of the object files may cause
a problem, so in fact it's likely essential to the process that I'm using
separate build trees.



Messages sorted by: Reverse Date, Date, Thread, Author