* Extra checks for PERL_PATH and SHELL_PATH?
@ 2009-10-20 3:50 Matt Kraai
2009-10-20 6:36 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Matt Kraai @ 2009-10-20 3:50 UTC (permalink / raw)
To: git
Hi,
The top-level Makefile currently contains
> ifndef SHELL_PATH
> SHELL_PATH = /bin/sh
> endif
> ifndef PERL_PATH
> PERL_PATH = /usr/bin/perl
> endif
The checks are only necessary if these variables need to be overridden
by environment variables, not just via the make command line. Is this
the case?
--
Matt Kraai http://ftbfs.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extra checks for PERL_PATH and SHELL_PATH? 2009-10-20 3:50 Extra checks for PERL_PATH and SHELL_PATH? Matt Kraai @ 2009-10-20 6:36 ` Junio C Hamano 2009-10-20 9:06 ` [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally Matt Kraai 0 siblings, 1 reply; 5+ messages in thread From: Junio C Hamano @ 2009-10-20 6:36 UTC (permalink / raw) To: Matt Kraai; +Cc: git Matt Kraai <kraai@ftbfs.org> writes: > The top-level Makefile currently contains > >> ifndef SHELL_PATH >> SHELL_PATH = /bin/sh >> endif >> ifndef PERL_PATH >> PERL_PATH = /usr/bin/perl >> endif > > The checks are only necessary if these variables need to be overridden > by environment variables, not just via the make command line. Is this > the case? It may not have been the original intention, but the above would mean that some people may have learned to run "SHELL_PATH=/bin/ksh make" and changing it would break things for them, no? I do not think changing them is bad per-se, but we would need to add extra warnings in the release note to explain this change, that's all. This would only affect people who build from the source (including distro people) so it is not really a big deal. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally 2009-10-20 6:36 ` Junio C Hamano @ 2009-10-20 9:06 ` Matt Kraai 2009-10-20 16:18 ` Junio C Hamano 0 siblings, 1 reply; 5+ messages in thread From: Matt Kraai @ 2009-10-20 9:06 UTC (permalink / raw) To: git, gitster; +Cc: Matt Kraai Do not check whether PERL_PATH and SHELL_PATH are undefined before setting their default values. This prevents them from being set via environment variables. Signed-off-by: Matt Kraai <kraai@ftbfs.org> --- On Mon, Oct 19, 2009 at 11:36:26PM -0700, Junio C Hamano wrote: > Matt Kraai <kraai@ftbfs.org> writes: > > > The top-level Makefile currently contains > > > >> ifndef SHELL_PATH > >> SHELL_PATH = /bin/sh > >> endif > >> ifndef PERL_PATH > >> PERL_PATH = /usr/bin/perl > >> endif > > > > The checks are only necessary if these variables need to be overridden > > by environment variables, not just via the make command line. Is this > > the case? > > It may not have been the original intention, but the above would mean that > some people may have learned to run "SHELL_PATH=/bin/ksh make" and > changing it would break things for them, no? Yes, that's what I was concerned about. This appears to be possible for PERL_PATH on all platforms and for SHELL_PATH on platforms other than SCO UnixWare, SunOS, and IRIX. > I do not think changing them is bad per-se, but we would need to add extra > warnings in the release note to explain this change, that's all. This > would only affect people who build from the source (including distro > people) so it is not really a big deal. I hope this patch is OK. Documentation/RelNotes-1.6.6.txt | 3 +++ Makefile | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/RelNotes-1.6.6.txt b/Documentation/RelNotes-1.6.6.txt index 5f1fecb..bfda14c 100644 --- a/Documentation/RelNotes-1.6.6.txt +++ b/Documentation/RelNotes-1.6.6.txt @@ -58,3 +58,6 @@ release, unless otherwise noted. whitespace attribute). The 'trailing-space' whitespace error class has become a short-hand to cover both of these and there is no behaviour change for existing set-ups. + + * PERL_PATH and SHELL_PATH may not be overridden using environment + variables during the build. diff --git a/Makefile b/Makefile index 42b7d60..5bac305 100644 --- a/Makefile +++ b/Makefile @@ -392,12 +392,8 @@ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) OTHER_PROGRAMS = git$X # Set paths to tools early so that they can be used for version tests. -ifndef SHELL_PATH - SHELL_PATH = /bin/sh -endif -ifndef PERL_PATH - PERL_PATH = /usr/bin/perl -endif +SHELL_PATH = /bin/sh +PERL_PATH = /usr/bin/perl export PERL_PATH -- 1.6.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally 2009-10-20 9:06 ` [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally Matt Kraai @ 2009-10-20 16:18 ` Junio C Hamano 2009-10-20 16:33 ` Matt Kraai 0 siblings, 1 reply; 5+ messages in thread From: Junio C Hamano @ 2009-10-20 16:18 UTC (permalink / raw) To: Matt Kraai; +Cc: git Matt Kraai <kraai@ftbfs.org> writes: > Do not check whether PERL_PATH and SHELL_PATH are undefined before > setting their default values. This prevents them from being set via > environment variables. Is there an upside of "preventing them from getting set", by the way? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally 2009-10-20 16:18 ` Junio C Hamano @ 2009-10-20 16:33 ` Matt Kraai 0 siblings, 0 replies; 5+ messages in thread From: Matt Kraai @ 2009-10-20 16:33 UTC (permalink / raw) To: Junio C Hamano; +Cc: git On Tue, Oct 20, 2009 at 09:18:29AM -0700, Junio C Hamano wrote: > Matt Kraai <kraai@ftbfs.org> writes: > > > Do not check whether PERL_PATH and SHELL_PATH are undefined before > > setting their default values. This prevents them from being set via > > environment variables. > > Is there an upside of "preventing them from getting set", by the way? Not that I know of. I originally thought that the checks were superfluous, but now I just believe they're inconsistent and confusing to people like me who think they understand Makefiles but don't. :) -- Matt Kraai http://ftbfs.org/ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-20 17:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-20 3:50 Extra checks for PERL_PATH and SHELL_PATH? Matt Kraai 2009-10-20 6:36 ` Junio C Hamano 2009-10-20 9:06 ` [PATCH] Makefile: set PERL_PATH and SHELL_PATH unconditionally Matt Kraai 2009-10-20 16:18 ` Junio C Hamano 2009-10-20 16:33 ` Matt Kraai
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).