Re: [PATCH review] Build: make PERL_PATH = /usr/bin/env perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Witten <mfwitten@xxxxxxx> writes:

> [problem with different versions of perl]

There's also the case where perl simply isn't available in /usr/bin,
but is somewhere else.

> It would seem to me that something like '/usr/bin/env perl' is slightly
> more vanilla in the sense that it can handle more cases.
>
> Perhaps the Makefile can be smarter about guessing the right path?

Perhaps something like this?

diff --git a/Makefile b/Makefile
index 865e2bf..5828745 100644
--- a/Makefile
+++ b/Makefile
@@ -323,7 +323,7 @@ ifndef SHELL_PATH
 	SHELL_PATH = /bin/sh
 endif
 ifndef PERL_PATH
-	PERL_PATH = /usr/bin/perl
+	PERL_PATH = $(shell which perl)
 endif
 
 export PERL_PATH

(untested)

This would generate the same files in the common case, but detect
another installation at compile time.

Note that this is indeed different from the original proposal in the
case of a multi-user system: here, the perl installation is chosen
once and for all by the guy who installs git, but can't be overridden
later (e.g by a user having his own custom perl installation in his
$HOME). I don't know which is better.


-- 
Matthieu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux