Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: sitelib.U,v 1.1 1999/07/08 18:32:57 doughera Exp doughera $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1996-1998, Andy Dougherty | |
4 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
5 | ?RCS: | |
6 | ?RCS: You may redistribute only under the terms of the Artistic Licence, | |
7 | ?RCS: as specified in the README file that comes with the distribution. | |
8 | ?RCS: You may reuse parts of this distribution only within the terms of | |
9 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
10 | ?RCS: of the source tree for dist 3.0. | |
11 | ?RCS: | |
12 | ?RCS: $Log: sitelib.U,v $ | |
13 | ?RCS: Revision 1.1 1999/07/08 18:32:57 doughera | |
14 | ?RCS: Initial revision | |
15 | ?RCS: | |
16 | ?RCS: Revision 3.0.1.1 1997/02/28 16:21:35 ram | |
17 | ?RCS: patch61: created | |
18 | ?RCS: | |
f5609386 | 19 | ?MAKE:sitelib sitelibexp installsitelib sitelib_stem: cat Getfile \ |
d72254c8 MB |
20 | Oldconfig Prefixit package installprefix installprefixexp \ |
21 | prefix prefixexp version test sed installstyle siteprefix | |
959f3c4c JH |
22 | ?MAKE: -pick add $@ %< |
23 | ?Y:TOP | |
24 | ?S:sitelib: | |
25 | ?S: This variable contains the eventual value of the SITELIB symbol, | |
26 | ?S: which is the name of the private library for this package. It may | |
27 | ?S: have a ~ on the front. It is up to the makefile to eventually create | |
28 | ?S: this directory while performing installation (with ~ substitution). | |
860c366a JH |
29 | ?S: The standard distribution will put nothing in this directory. |
30 | ?S: After perl has been installed, users may install their own local | |
31 | ?S: architecture-independent modules in this directory with | |
32 | ?S: MakeMaker Makefile.PL | |
33 | ?S: or equivalent. See INSTALL for details. | |
959f3c4c JH |
34 | ?S:. |
35 | ?S:sitelibexp: | |
36 | ?S: This variable is the ~name expanded version of sitelib, so that you | |
37 | ?S: may use it directly in Makefiles or shell scripts. | |
38 | ?S:. | |
39 | ?S:installsitelib: | |
40 | ?S: This variable is really the same as sitelibexp but may differ on | |
41 | ?S: those systems using AFS. For extra portability, only this variable | |
42 | ?S: should be used in makefiles. | |
43 | ?S:. | |
f5609386 MS |
44 | ?S:sitelib_stem: |
45 | ?S: This variable is $sitelibexp with any trailing version-specific component | |
46 | ?S: removed. The elements in inc_version_list (inc_version_list.U) can | |
47 | ?S: be tacked onto this variable to generate a list of directories to search. | |
48 | ?S:. | |
959f3c4c JH |
49 | ?C:SITELIB: |
50 | ?C: This symbol contains the name of the private library for this package. | |
51 | ?C: The library is private in the sense that it needn't be in anyone's | |
52 | ?C: execution path, but it should be accessible by the world. The program | |
53 | ?C: should be prepared to do ~ expansion. | |
54 | ?C: The standard distribution will put nothing in this directory. | |
860c366a JH |
55 | ?C: After perl has been installed, users may install their own local |
56 | ?C: architecture-independent modules in this directory with | |
57 | ?C: MakeMaker Makefile.PL | |
58 | ?C: or equivalent. See INSTALL for details. | |
959f3c4c JH |
59 | ?C:. |
60 | ?C:SITELIB_EXP: | |
61 | ?C: This symbol contains the ~name expanded version of SITELIB, to be used | |
62 | ?C: in programs that are not prepared to deal with ~ expansion at run-time. | |
63 | ?C:. | |
f5609386 MS |
64 | ?C:SITELIB_STEM: |
65 | ?C: This define is SITELIB_EXP with any trailing version-specific component | |
66 | ?C: removed. The elements in inc_version_list (inc_version_list.U) can | |
67 | ?C: be tacked onto this variable to generate a list of directories to search. | |
68 | ?C:. | |
959f3c4c JH |
69 | ?H:#define SITELIB "$sitelib" /**/ |
70 | ?H:#define SITELIB_EXP "$sitelibexp" /**/ | |
f5609386 | 71 | ?H:#define SITELIB_STEM "$sitelib_stem" /**/ |
959f3c4c JH |
72 | ?H:. |
73 | ?T:prog | |
74 | : determine where site specific libraries go. | |
edd6115f | 75 | : Usual default is /usr/local/lib/perl5/site_perl/$version |
959f3c4c JH |
76 | : The default "style" setting is made in installstyle.U |
77 | : XXX No longer works with Prefixit stuff. | |
78 | ?X: remove any trailing -3.0 or other version identification | |
79 | prog=`echo $package | $sed 's/-*[0-9.]*$//'` | |
0fdea05a JH |
80 | case "$sitelib" in |
81 | '') case "$installstyle" in | |
82 | *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;; | |
83 | *) dflt=$siteprefix/lib/site_$prog/$version ;; | |
84 | esac | |
85 | ;; | |
86 | *) dflt="$sitelib" | |
87 | ;; | |
959f3c4c JH |
88 | esac |
89 | $cat <<EOM | |
90 | ||
91 | The installation process will create a directory for | |
92 | site-specific extensions and modules. Most users find it convenient | |
93 | to place all site-specific files in this directory rather than in the | |
94 | main distribution directory. | |
95 | ||
96 | EOM | |
97 | fn=d~+ | |
98 | rp='Pathname for the site-specific library files?' | |
99 | . ./getfile | |
100 | sitelib="$ans" | |
101 | sitelibexp="$ansexp" | |
f5609386 | 102 | sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"` |
959f3c4c JH |
103 | : Change installation prefix, if necessary. |
104 | if $test X"$prefix" != X"$installprefix"; then | |
d72254c8 | 105 | installsitelib=`echo $sitelibexp | $sed "s#^$prefixexp#$installprefixexp#"` |
959f3c4c JH |
106 | else |
107 | installsitelib="$sitelibexp" | |
108 | fi | |
109 |