git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: vfr@lyx.org
Cc: git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH] Add the DEFAULT_HELP_FORMAT option to Makefile
Date: Wed, 06 Jun 2012 12:06:35 -0700	[thread overview]
Message-ID: <7vzk8gl0p0.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1339008702-704-1-git-send-email-vfr@lyx.org> (vfr@lyx.org's message of "Wed, 6 Jun 2012 18:51:42 +0000")

vfr@lyx.org writes:

> From: Vincent van Ravesteijn <vfr@lyx.org>
>
> This patch advertises the DEFAULT_HELP_FORMAT compile option in Makefile. It will also allow to call 'make DEFAULT_HELP_FORMAT=info' to specify a different default.
>
> Proposed-by: Jeff King <peff@peff.net>
> Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
> ---
>  Makefile |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index ffbd7a4..b21afed 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -296,6 +296,10 @@ all::
>  # the diff algorithm.  It gives a nice speedup if your processor has
>  # fast unaligned word loads.  Does NOT work on big-endian systems!
>  # Enabled by default on x86_64.
> +#
> +# Define DEFAULT_HELP_FORMAT to "man", "info", "web" or "html"
> +# (defaults "man") if you want to have a different default when
> +# "git help" is called without a parameter specifying the format.

We probably should just say 'html' without the idiotic 'web'
synonym.

> @@ -1238,6 +1242,7 @@ ifeq ($(uname_S),Windows)
>  	NATIVE_CRLF = YesPlease
>  	NO_INET_PTON = YesPlease
>  	NO_INET_NTOP = YesPlease
> +	DEFAULT_HELP_FORMAT = html
>  
>  	CC = compat/vcbuild/scripts/clink.pl
>  	AR = compat/vcbuild/scripts/lib.pl
> @@ -1917,6 +1922,10 @@ SHELL_PATH_CQ_SQ = $(subst ','\'',$(SHELL_PATH_CQ))
>  BASIC_CFLAGS += -DSHELL_PATH='$(SHELL_PATH_CQ_SQ)'
>  endif
>  
> +ifdef DEFAULT_HELP_FORMAT
> +BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"'
> +endif
> +
>  ALL_CFLAGS += $(BASIC_CFLAGS)
>  ALL_LDFLAGS += $(BASIC_LDFLAGS)

The choice of the variable name, decision to tweak BASIC_CFLAGS and
the placement of the tweak all look good to me.

You would also need actual code to react to -DDEFAULT_HELP_FORMAT in
the same patch.

I think the choices of PAGER and EDITOR share the same problem, but
shouldn't this choice recorded in GIT-BUILD-OPTIONS in some way?

Thanks.

  reply	other threads:[~2012-06-06 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 12:56 [PATCH] Add the possibility to specify a default help format Vincent van Ravesteijn
2012-06-06 13:53 ` Jeff King
2012-06-06 18:51   ` [PATCH] Add the DEFAULT_HELP_FORMAT option to Makefile vfr
2012-06-06 19:06     ` Junio C Hamano [this message]
2012-06-06 20:25       ` Vincent van Ravesteijn
2012-06-06 21:07         ` Junio C Hamano
2012-06-06 20:28 ` [PATCHv2] Add the possibility to specify a default help format Vincent van Ravesteijn
2012-06-06 21:21   ` Junio C Hamano

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=7vzk8gl0p0.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=vfr@lyx.org \
    /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).