This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Populate metaconfig branch.
[metaconfig.git] / U / installdirs / sitelib.U
CommitLineData
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:
19?MAKE:sitelib sitelibexp installsitelib: cat Getfile \
20 Oldconfig Prefixit package installprefix prefix \
21 test sed installstyle siteprefix
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).
29?S:.
30?S:sitelibexp:
31?S: This variable is the ~name expanded version of sitelib, so that you
32?S: may use it directly in Makefiles or shell scripts.
33?S:.
34?S:installsitelib:
35?S: This variable is really the same as sitelibexp but may differ on
36?S: those systems using AFS. For extra portability, only this variable
37?S: should be used in makefiles.
38?S:.
39?C:SITELIB:
40?C: This symbol contains the name of the private library for this package.
41?C: The library is private in the sense that it needn't be in anyone's
42?C: execution path, but it should be accessible by the world. The program
43?C: should be prepared to do ~ expansion.
44?C: The standard distribution will put nothing in this directory.
45?C: Individual sites may place their own extensions and modules in
46?C: this directory.
47?C:.
48?C:SITELIB_EXP:
49?C: This symbol contains the ~name expanded version of SITELIB, to be used
50?C: in programs that are not prepared to deal with ~ expansion at run-time.
51?C:.
52?H:#define SITELIB "$sitelib" /**/
53?H:#define SITELIB_EXP "$sitelibexp" /**/
54?H:.
55?T:prog
56: determine where site specific libraries go.
57: Usual default is /usr/local/lib/perl5/site_perl
58: The default "style" setting is made in installstyle.U
59: XXX No longer works with Prefixit stuff.
60?X: remove any trailing -3.0 or other version identification
61prog=`echo $package | $sed 's/-*[0-9.]*$//'`
62case "$installstyle" in
63*lib/perl5*) dflt=$siteprefix/lib/site_$prog/ ;;
64*) dflt=$siteprefix/lib/site_$prog ;;
65esac
66$cat <<EOM
67
68The installation process will create a directory for
69site-specific extensions and modules. Most users find it convenient
70to place all site-specific files in this directory rather than in the
71main distribution directory.
72
73EOM
74fn=d~+
75rp='Pathname for the site-specific library files?'
76. ./getfile
77sitelib="$ans"
78sitelibexp="$ansexp"
79: Change installation prefix, if necessary.
80if $test X"$prefix" != X"$installprefix"; then
81 installsitelib=`echo $sitelibexp | sed 's#^$prefix#$installprefix#'`
82else
83 installsitelib="$sitelibexp"
84fi
85