* [PATCH 0/2] configure tweaks for NO_PYTHON @ 2010-02-01 2:15 Ben Walton 2010-02-01 2:15 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Ben Walton 0 siblings, 1 reply; 5+ messages in thread From: Ben Walton @ 2010-02-01 2:15 UTC (permalink / raw) To: git, gitster; +Cc: Ben Walton The following patches enable a user to ./configure git with python disabled. There is nothing using the remote helper libraries yet. I noticed this missing capability after the recent rpm .spec thread. Ben Walton (2): configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM configure: Allow --without-python configure.ac | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM 2010-02-01 2:15 [PATCH 0/2] configure tweaks for NO_PYTHON Ben Walton @ 2010-02-01 2:15 ` Ben Walton 2010-02-01 2:15 ` [PATCH 2/2] configure: Allow --without-python Ben Walton 2010-02-01 21:14 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Junio C Hamano 0 siblings, 2 replies; 5+ messages in thread From: Ben Walton @ 2010-02-01 2:15 UTC (permalink / raw) To: git, gitster; +Cc: Ben Walton Add an optional second argument to both GIT_ARG_SET_PATH and GIT_CONF_APPEND_PATH such that any value of the second argument will enable configure to set NO_$PROGRAM in addition to an empty $PROGRAM_PATH. This is initially useful for allowing configure to disable the use of python, as the remote helper code has nothing leveraging it yet. The Makefile already recognizes NO_PYTHON, but configure provided no way to set it appropriately. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> --- configure.ac | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 229140e..9eaae7d 100644 --- a/configure.ac +++ b/configure.ac @@ -23,21 +23,32 @@ AC_DEFUN([GIT_CONF_APPEND_LINE], # GIT_ARG_SET_PATH(PROGRAM) # ------------------------- # Provide --with-PROGRAM=PATH option to set PATH to PROGRAM +# Optional second argument allows setting NO_PROGRAM=YesPlease if +# --without-PROGRAM version used. AC_DEFUN([GIT_ARG_SET_PATH], [AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1=PATH], [provide PATH to $1])], - [GIT_CONF_APPEND_PATH($1)],[]) + [GIT_CONF_APPEND_PATH($1,$2)],[]) ])# GIT_ARG_SET_PATH # # GIT_CONF_APPEND_PATH(PROGRAM) # ------------------------------ # Parse --with-PROGRAM=PATH option to set PROGRAM_PATH=PATH # Used by GIT_ARG_SET_PATH(PROGRAM) +# Optional second argument allows setting NO_PROGRAM=YesPlease if +# --without-PROGRAM is used. AC_DEFUN([GIT_CONF_APPEND_PATH], [PROGRAM=m4_toupper($1); \ if test "$withval" = "no"; then \ - AC_MSG_ERROR([You cannot use git without $1]); \ + if test -n "$2"; then \ + m4_toupper($1)_PATH=$withval; \ + AC_MSG_NOTICE([Disabling use of ${PROGRAM}]); \ + GIT_CONF_APPEND_LINE(NO_${PROGRAM}=YesPlease); \ + GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=); \ + else \ + AC_MSG_ERROR([You cannot use git without $1]); \ + fi; \ else \ if test "$withval" = "yes"; then \ AC_MSG_WARN([You should provide path for --with-$1=PATH]); \ -- 1.6.5.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] configure: Allow --without-python 2010-02-01 2:15 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Ben Walton @ 2010-02-01 2:15 ` Ben Walton 2010-02-01 21:14 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Junio C Hamano 1 sibling, 0 replies; 5+ messages in thread From: Ben Walton @ 2010-02-01 2:15 UTC (permalink / raw) To: git, gitster; +Cc: Ben Walton This patch allows someone to use configure to build git while at the same time disabling the python remote helper code. It leverages the ability of GIT_ARG_SET_PATH to accept an optional second argument indicating that --without-$PROGRAM is acceptable. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> --- configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 9eaae7d..914ae57 100644 --- a/configure.ac +++ b/configure.ac @@ -288,7 +288,7 @@ GIT_ARG_SET_PATH(shell) GIT_ARG_SET_PATH(perl) # # Define PYTHON_PATH to provide path to Python. -GIT_ARG_SET_PATH(python) +GIT_ARG_SET_PATH(python, allow-without) # # Define ZLIB_PATH to provide path to zlib. GIT_ARG_SET_PATH(zlib) -- 1.6.5.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM 2010-02-01 2:15 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Ben Walton 2010-02-01 2:15 ` [PATCH 2/2] configure: Allow --without-python Ben Walton @ 2010-02-01 21:14 ` Junio C Hamano 2010-02-01 21:23 ` Ben Walton 1 sibling, 1 reply; 5+ messages in thread From: Junio C Hamano @ 2010-02-01 21:14 UTC (permalink / raw) To: Ben Walton; +Cc: git, gitster Ben Walton <bwalton@artsci.utoronto.ca> writes: > Add an optional second argument to both GIT_ARG_SET_PATH and > GIT_CONF_APPEND_PATH such that any value of the second argument will > enable configure to set NO_$PROGRAM in addition to an empty > $PROGRAM_PATH. This is initially useful for allowing configure to > disable the use of python, as the remote helper code has nothing > leveraging it yet. > > The Makefile already recognizes NO_PYTHON, but configure provided no > way to set it appropriately. > > Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> > --- Interesting. I noticed that even without this patch we seem to honor --without-tcltk just fine and wondered why. It turns out that we already do the right thing when TCLTK_PATH is empty to set NO_TCLTK in our Makefile, but we at the same time have a long custom code in configure.ac to support tcltk. Perhaps we can clean-up with-/without-tcltk part in configure.ac using this? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM 2010-02-01 21:14 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Junio C Hamano @ 2010-02-01 21:23 ` Ben Walton 0 siblings, 0 replies; 5+ messages in thread From: Ben Walton @ 2010-02-01 21:23 UTC (permalink / raw) To: Junio C Hamano; +Cc: git [-- Attachment #1: Type: text/plain, Size: 586 bytes --] Excerpts from Junio C Hamano's message of Mon Feb 01 16:14:40 -0500 2010: > Perhaps we can clean-up with-/without-tcltk part in configure.ac using > this? Sure and I'd be happy to do this. I noticed (after I sent the patches) that NO_PYTHON is set in the Makefile automatically if --with-python= is used (leaving PYTHON_PATH set to null). I prefer the nicer --without-python personally. I'll fix up the tcltk option and scan for others that might need similar treatment. Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-01 21:23 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-02-01 2:15 [PATCH 0/2] configure tweaks for NO_PYTHON Ben Walton 2010-02-01 2:15 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Ben Walton 2010-02-01 2:15 ` [PATCH 2/2] configure: Allow --without-python Ben Walton 2010-02-01 21:14 ` [PATCH 1/2] configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM Junio C Hamano 2010-02-01 21:23 ` Ben Walton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox