git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] build: don't duplicate substitution of make variables
Date: Tue, 11 Sep 2012 20:26:23 +0200	[thread overview]
Message-ID: <504F824F.3050903@gmail.com> (raw)
In-Reply-To: <7vtxv4h3lh.fsf@alter.siamese.dyndns.org>

On 09/11/2012 07:27 PM, Junio C Hamano wrote:
> Stefano Lattarini <stefano.lattarini@gmail.com> writes:
> 
>> Thanks to our 'GIT_CONF_SUBST' layer in configure.ac, a make variable 'VAR'
>> can be defined to a value 'VAL' at ./configure runtime in our build system
>> simply by using "GIT_CONF_SUBST([VAR], [VAL])" in configure.ac, rather than
>> having both to call "AC_SUBST([VAR], [VAL])" in configure.ac and adding the
>> 'VAR = @VAR@' definition in config.mak.in.  Less duplication, less margin
>> for error, less possibility of confusion.
>>
>> While at it, fix some formatting issues in configure.ac that unnecessarily
>> obscured the code flow.
>>
>> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>> ---
>>  config.mak.in |  49 --------------------
>>  configure.ac  | 144 +++++++++++++++++++++++++++++++---------------------------
>>  2 files changed, 76 insertions(+), 117 deletions(-)
> 
> Whoa ;-).
>
Well, I could have converted one variable at the time, but that seemed
an overkill :-)

>> diff --git a/configure.ac b/configure.ac
>> index 450bbe7..da1f41f 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -267,6 +267,8 @@ AS_HELP_STRING([],           [ARG can be also prefix for libpcre library and hea
>>  	USE_LIBPCRE=YesPlease
>>  	LIBPCREDIR=$withval
>>  	AC_MSG_NOTICE([Setting LIBPCREDIR to $LIBPCREDIR])
>> +        dnl USE_LIBPCRE can still be modified below, so don't substitute
>> +        dnl it yet.
>>  	GIT_CONF_SUBST([LIBPCREDIR])
>>      fi)
>>  #
>> ...
>>  AC_CHECK_FUNC([hstrerror],
>> -	[],
>> +    [],
> 
> Is there some consistent policy regarding SP vs HT in the
> indentation you are using in this patch?
>
Basically I'm trying to follow the style of the surrounding code, while
keeping in mind that in the Git codebase tabs seem to be preferred to spaces.
In this case, the indentation of the following text (that was the "meat" of
the expression) seemed to favour 4 spaces for indentation, so I followed
suit.

> These two hunks suggest
> that you may be favoring spaces, but other places you seem to use
> tabs, so...
>
I can convert the new tabs to spaces if you prefer (that would have been
my preference too, but thought trying to follow the "Git preferences"
was more important).  No big deal either way for me.

Thanks,
  Stefano

  reply	other threads:[~2012-09-11 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 15:45 [PATCH 1/2] build: improve GIT_CONF_SUBST signature Stefano Lattarini
2012-09-11 15:45 ` [PATCH 2/2] build: don't duplicate substitution of make variables Stefano Lattarini
2012-09-11 17:27   ` Junio C Hamano
2012-09-11 18:26     ` Stefano Lattarini [this message]
2012-09-11 19:52       ` Junio C Hamano
2012-09-11 20:17         ` Stefano Lattarini

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

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

  git send-email \
    --in-reply-to=504F824F.3050903@gmail.com \
    --to=stefano.lattarini@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).