Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: perlpath.U,v 3.0.1.2 1995/09/25 09:17:04 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
0df14132 | 4 | ?RCS: |
959f3c4c JH |
5 | ?RCS: This file is included with or a derivative work of a file included |
6 | ?RCS: with the metaconfig program of Raphael Manfredi's "dist" distribution. | |
7 | ?RCS: In accordance with clause 7 of dist's modified Artistic License: | |
0df14132 | 8 | ?RCS: |
959f3c4c JH |
9 | ?RCS: You may distribute under the terms of either the GNU General Public |
10 | ?RCS: License or the Artistic License, as specified in the README file. | |
11 | ?RCS: | |
12 | ?RCS: $Log: perlpath.U,v $ | |
13 | ?RCS: | |
14 | ?RCS: Special perl5 unit -- we haven't installed perl yet. | |
15 | ?RCS: | |
16 | ?RCS: Revision 3.0.1.2 1995/09/25 09:17:04 ram | |
17 | ?RCS: patch59: unit is now forced to the top of Configure, if possible | |
18 | ?RCS: | |
19 | ?RCS: Revision 3.0.1.1 1995/01/11 15:33:53 ram | |
20 | ?RCS: patch45: can now use Loc variables since path stripping is deferred | |
21 | ?RCS: | |
22 | ?RCS: Revision 3.0 1993/08/18 12:09:32 ram | |
23 | ?RCS: Baseline for dist 3.0 netwide release. | |
24 | ?RCS: | |
25 | ?X: | |
26 | ?X: The purpose of this unit is to locate perl good enough to construct a #! | |
27 | ?X: | |
0df14132 MB |
28 | ?MAKE:perlpath: cat Getfile Loc Myread Oldconfig initialinstalllocation \ |
29 | startperl version versiononly | |
959f3c4c JH |
30 | ?MAKE: -pick add $@ %< |
31 | ?Y:TOP | |
32 | ?S:perlpath: | |
33 | ?S: This variable contains the eventual value of the PERLPATH symbol, | |
34 | ?S: which contains the name of the perl interpreter to be used in | |
ae08adbb JH |
35 | ?S: shell scripts and in the "eval 'exec'" idiom. This variable is |
36 | ?S: not necessarily the pathname of the file containing the perl | |
37 | ?S: interpreter; you must append the executable extension (_exe) if | |
38 | ?S: it is not already present. Note that Perl code that runs during | |
39 | ?S: the Perl build process cannot reference this variable, as Perl | |
40 | ?S: may not have been installed, or even if installed, may be a | |
41 | ?S: different version of Perl. | |
959f3c4c JH |
42 | ?S:. |
43 | ?C:PERLPATH: | |
44 | ?C: This symbol contains the name of the perl interpreter to be | |
45 | ?C: used in shell scripts and in the "eval 'exec'" idiom. | |
46 | ?C:. | |
47 | ?H:#define PERLPATH "$perlpath" /**/ | |
48 | ?H:. | |
49 | : figure best path for perl in scripts | |
50 | case "$perlpath" in | |
51 | '') | |
b5e5ab83 | 52 | case "$versiononly" in |
0df14132 MB |
53 | "$define") perlpath="$initialinstalllocation/perl$version";; |
54 | *) perlpath="$initialinstalllocation/perl";; | |
b5e5ab83 | 55 | esac |
959f3c4c JH |
56 | case "$startperl" in |
57 | *!*) ;; | |
58 | *) | |
59 | $cat <<EOH | |
60 | ||
61 | I will use the "eval 'exec'" idiom to start Perl on your system. | |
62 | I can use the full path of your Perl binary for this purpose, but | |
63 | doing so may cause problems if you want to share those scripts and | |
0df14132 | 64 | Perl is not always in a standard place ($initialinstalllocation/perl). |
959f3c4c JH |
65 | |
66 | EOH | |
0df14132 | 67 | dflt="$initialinstalllocation/perl" |
959f3c4c JH |
68 | rp="What path shall I use in \"eval 'exec'\"?" |
69 | . ./myread | |
70 | perlpath="$ans" | |
71 | ;; | |
72 | esac | |
73 | ;; | |
74 | esac | |
75 | case "$startperl" in | |
76 | *!*) ;; | |
77 | *) echo "I'll use $perlpath in \"eval 'exec'\"" ;; | |
78 | esac | |
79 |