This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove trailing whitespace on meta-lines in unit files
[metaconfig.git] / dist / U / sitelib.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 1996, Andy Dougherty
4 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS:
6 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; a copy of which may be found at the root
10 ?RCS: of the source tree for dist 4.0.
11 ?RCS:
12 ?RCS: $Log: sitelib.U,v $
13 ?RCS: Revision 3.0.1.1  1997/02/28  16:21:35  ram
14 ?RCS: patch61: created
15 ?RCS:
16 ?MAKE:sitelib sitelibexp installsitelib: afs cat Getfile \
17         Oldconfig Prefixit test privlib package sed
18 ?MAKE:  -pick add $@ %<
19 ?Y:TOP
20 ?S:sitelib:
21 ?S:     This variable contains the eventual value of the SITELIB symbol,
22 ?S:     which is the name of the private library for this package.  It may
23 ?S:     have a ~ on the front. It is up to the makefile to eventually create
24 ?S:     this directory while performing installation (with ~ substitution).
25 ?S:.
26 ?S:sitelibexp:
27 ?S:     This variable is the ~name expanded version of sitelib, so that you
28 ?S:     may use it directly in Makefiles or shell scripts.
29 ?S:.
30 ?S:installsitelib:
31 ?S:     This variable is really the same as sitelibexp but may differ on
32 ?S:     those systems using AFS. For extra portability, only this variable
33 ?S:     should be used in makefiles.
34 ?S:.
35 ?C:SITELIB:
36 ?C:     This symbol contains the name of the private library for this package.
37 ?C:     The library is private in the sense that it needn't be in anyone's
38 ?C:     execution path, but it should be accessible by the world.  The program
39 ?C:     should be prepared to do ~ expansion.
40 ?C:     The standard distribution will put nothing in this directory.
41 ?C:     Individual sites may place their own extensions and modules in
42 ?C:     this directory.
43 ?C:.
44 ?C:SITELIB_EXP:
45 ?C:     This symbol contains the ~name expanded version of SITELIB, to be used
46 ?C:     in programs that are not prepared to deal with ~ expansion at run-time.
47 ?C:.
48 ?H:#define SITELIB "$sitelib"           /**/
49 ?H:#define SITELIB_EXP "$sitelibexp"            /**/
50 ?H:.
51 ?T:prog
52 : determine where site specific libraries go.
53 set sitelib sitelib
54 eval $prefixit
55 case "$sitelib" in
56 '')
57 ?X: remove any trailing -3.0 or other version indentification
58         prog=`echo $package | $sed 's/-*[0-9.]*$//'`
59         dflt="$privlib/site_$prog" ;;
60 *)      dflt="$sitelib" ;;
61 esac
62 $cat <<EOM
63
64 The installation process will also create a directory for
65 site-specific extensions and modules.  Some users find it convenient
66 to place all local files in this directory rather than in the main
67 distribution directory.
68
69 EOM
70 fn=d~+
71 rp='Pathname for the site-specific library files?'
72 . ./getfile
73 if $test "X$sitelibexp" != "X$ansexp"; then
74         installsitelib=''
75 fi
76 sitelib="$ans"
77 sitelibexp="$ansexp"
78 if $afs; then
79         $cat <<EOM
80
81 Since you are running AFS, I need to distinguish the directory in which
82 private files reside from the directory in which they are installed (and from
83 which they are presumably copied to the former directory by occult means).
84
85 EOM
86         case "$installsitelib" in
87         '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
88         *) dflt="$installsitelib";;
89         esac
90         fn=de~
91         rp='Where will private files be installed?'
92         . ./getfile
93         installsitelib="$ans"
94 else
95         installsitelib="$sitelibexp"
96 fi
97