git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>, git@vger.kernel.org
Subject: Re: [RFC PATCH] Move SHA-1 implementation selection into a header file
Date: Sun, 12 Mar 2017 10:54:16 -0700	[thread overview]
Message-ID: <xmqqfuiiv0s7.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170312130149.czir5hcbosqlmkhb@sigill.intra.peff.net> (Jeff King's message of "Sun, 12 Mar 2017 09:01:49 -0400")

Jeff King <peff@peff.net> writes:

> diff --git a/Makefile b/Makefile
> index 9f0eae428..0d65d50e9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -690,6 +690,7 @@ XDIFF_LIB = xdiff/lib.a
>  VCSSVN_LIB = vcs-svn/lib.a
>  
>  GENERATED_H += common-cmds.h
> +GENERATED_H += hash.h
> ...
> -BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \
> -	$(COMPAT_CFLAGS)
> +BASIC_CFLAGS += $(COMPAT_CFLAGS)
>   ...
> +hash.h:
> +	$(QUIET_GEN)echo '#include $(SHA1_HEADER)' >$@+ && \
> +	{ cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; }
> +

That looks sensible.  We do not have to adjust the code to update
GIT-BUILD-OPTIONS and friends in this patch because the current way
to force rebuilding when SHA1_HEADER changes is by letting
GIT-CFLAGS file notice the change, and the new "hash.h" itself will
let the $(MAKE) notice if a different hash implementation is chosen
for the build.



  parent reply	other threads:[~2017-03-12 17:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-11 22:28 [RFC PATCH] Move SHA-1 implementation selection into a header file brian m. carlson
2017-03-12 13:01 ` Jeff King
2017-03-12 16:51   ` brian m. carlson
2017-03-12 20:12     ` Jeff King
2017-03-12 17:54   ` Junio C Hamano [this message]
2017-03-14 18:41 ` Jonathan Nieder
2017-03-14 20:14   ` Jeff King
2017-03-14 20:44     ` Junio C Hamano
2017-03-14 21:26       ` Jeff King
2017-03-14 21:50       ` Jonathan Nieder
2017-03-14 23:42       ` Ramsay Jones
2017-03-14 23:46         ` brian m. carlson
2017-03-15  0:15           ` Ramsay Jones
2017-03-15 15:57             ` Junio C Hamano
2017-03-15 19:48               ` Ramsay Jones
2017-03-14 21:56     ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfuiiv0s7.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).