Karim Belabas on Sat, 24 Jan 2015 18:39:29 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Install Perl scripts with #!/usr/bin/env perl |
* Bill Allombert [2015-01-24 18:14]: > On Sat, Jan 24, 2015 at 12:59:25PM +0100, Karim Belabas wrote: > > * Bill Allombert [2015-01-24 12:29]: > > > On Sat, Jan 24, 2015 at 10:49:43AM +0100, Karim Belabas wrote: > > > > C) For install, we can either > > > > > > > > * provide > > > > > > > > Configure --installed-perl=<run-time perl binary> > > > > > > > > with Configure's current $perl as a default [ build-machine = target is > > > > a sensible default ]. Of course, "/usr/bin/env perl" is (now) a valid value; > > > > > > This is a very awkward name for a Configure option. > > > Either we should use > > > --with-perl=<run-time perl binary> > > > > I don't feel strongly about it :-) To avoid the confusion with the > > build-time binary ... > > > > --with-runtime-perl ? > > > > > or an environment variable > > > PERL=<run-time perl binary> > > > > Don't understand that one. Who must set the variable ? > > > > If the packager, then it's awkward (obscure + must change the variable > > each time a new target is built, effectively the same as Configure --with-perl) > > It is no more awkward than for CC, CFLAGS and LDFLAGS > you just do > env PERL="/usr/bin/env perl" ./Configure ... That's what I meant by "effectively the same as Configure --with-perl". You'd have env PERL="whatever" Configure instead of Configure --with-runtime-perl="whatever" Awkward in the sense that CC & friends are completely standardized and many tools abide by their values. I actually have some of these set on broken systems (e.g. some OS/X versions, Solaris a long time ago) to avoid broken default tools or pass necessary flags. I then see 'env CC=...' as a way of temporarily overriding something that's already sitting in my environment, or injecting it with expected effect. Here we'd use the non-standard $PERL variable with a non-obvious meaning (location of a runtime binary *not* to be used at build time), what I meant by "obscure". And temporarily inject it, just as a "convenient" way of giving extra arguments to Configure. It feels more natural (less awkward) to have a bona-fide argument instead of messing with env. Though I agree it's effectively the same, let's *not* provide both. Unless somebody points me to other packages using $PERL for this very purpose, that is. :-) Cheers, K.B. -- Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 Universite de Bordeaux Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP] `