git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Add the DEFAULT_HELP_FORMAT option to Makefile

From
vfr@lyx.org <vfr@lyx.org>
Date
Jun 6, 2012, 18:51 UTC
Message-ID
<1339008702-704-1-git-send-email-vfr@lyx.org>
In-Reply-To
<20120606135353.GD2597@sigill.intra.peff.net>
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.
 
 GIT-VERSION-FILE: FORCE
 	@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -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)
 
-- 
1.7.9.msysgit.0
Previous: Jeff KingNext: Junio C Hamano
Message 3 of 8 in “Add the possibility to specify a default help format”
  1. Add the possibility to specify a default help formatVincent van Ravesteijn, Jun 6, 2012
  2. Jeff KingJun 6, 2012
  3. Add the DEFAULT_HELP_FORMAT option to Makefilevfr@lyx.org, Jun 6, 2012
  4. Junio C HamanoJun 6, 2012
  5. Vincent van RavesteijnJun 6, 2012
  6. Junio C HamanoJun 6, 2012
  7. [PATCHv2] Add the possibility to specify a default help formatVincent van Ravesteijn, Jun 6, 2012
  8. Junio C HamanoJun 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.