Jeroen Demeyer on Tue, 13 Jan 2015 09:39:48 +0100


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

Install Perl scripts with #!/usr/bin/env perl


Hello PARI developers,

when installing Perl scripts, it is better to use
#!/usr/bin/env perl
instead of using the Perl path found at Configure time.

This is especially needed for binary installs, where the system that PARI was compiled on is not the system that PARI is run on. For Perl scripts at build time, this is not an issue.

Attached patch fixes this.

Cheers,
Jeroen.
commit 5e473e03d84d925d32ab6618e11590126b687e70
Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
Date:   Tue Jan 13 09:29:51 2015 +0100

    Install perl scripts with #!/usr/bin/env perl

diff --git a/config/extract_files b/config/extract_files
index e8eae1a..7c76d88 100755
--- a/config/extract_files
+++ b/config/extract_files
@@ -9,8 +9,7 @@ for dir in "$doc_dir" "$misc_dir"; do
     echo "...in $dir"
     flist=`ls $dir/*.in`
     for file in $flist; do
-      sed -e "s%@perl@%$perl%g"\
-          -e "s%@datadir@%$datadir%g"\
+      sed -e "s%@datadir@%$datadir%g"\
           -e "s%@bindir@%$bindir%g"\
           -e "s%@includedir@%$includedir%g"\
           -e "s%@libdir@%$libdir%g"\
diff --git a/doc/gphelp.in b/doc/gphelp.in
index 5291c6f..76db7a1 100755
--- a/doc/gphelp.in
+++ b/doc/gphelp.in
@@ -1,4 +1,4 @@
-#!@perl@
+#!/usr/bin/env perl
 # Copyright (C) 2000  The PARI group.
 #
 # This file is part of the PARI/GP package.
diff --git a/misc/tex2mail.in b/misc/tex2mail.in
index 316f00e..22f5173 100755
--- a/misc/tex2mail.in
+++ b/misc/tex2mail.in
@@ -1,4 +1,4 @@
-#!@perl@
+#!/usr/bin/env perl
 # Original version by Ilya Zakharevich. Minor updates by the PARI group
 # Features:
 #      % at the end of a line followed by \n\n is recognized as end of