Web lists-archives.com

Re: [RFC PATCH] Move SHA-1 implementation selection into a header file

Jeff King wrote:
> On Tue, Mar 14, 2017 at 11:41:26AM -0700, Jonathan Nieder wrote:
>> brian m. carlson wrote:

>>> --- a/cache.h
>>> +++ b/cache.h
>>> @@ -10,8 +10,8 @@
>>>  #include "trace.h"
>>>  #include "string-list.h"
>>>  #include "pack-revindex.h"
>>> +#include "hash.h"
>>> -#include SHA1_HEADER
>> For what it's worth, the bazel build tool doesn't like this
>> '#include SHA1_HEADER' either.  Your fix looks like a straightforward
>> fix and we never encouraged directly customizing SHA1_HEADER.
> Hmm. I don't know how you're using bazel with git, but if it is doing
> something like generating header dependencies, would that mean that it
> potentially picks up the wrong dependency with brian's patch?

I believe it picks up all options as dependencies, which is good
enough for me.

I have a custom BUILD file to build git with bazel.  I like the
reliable dependencies it generates (unless you do heavy contortions,
files aren't available to the build commands unless the dependency is
declared) and fast, parallel build with simple progress output.  But
keeping it up to date with every patch that changes the Makefile is
not something I would wish on the git project.

One of these days I'd like to try making a tool to automatically
generate the BUILD file, like contrib/buildsystems generates a
Visual C project.