This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / privlib.U
1 ?RCS: $Id: privlib.U 1 2006-08-24 12:32:52Z rmanfredi $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4 ?RCS: 
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
10 ?RCS:
11 ?RCS: $Log: privlib.U,v $
12 ?RCS: Revision 3.0.1.4  1995/09/25  09:17:09  ram
13 ?RCS: patch59: unit is now forced to the top of Configure, if possible
14 ?RCS:
15 ?RCS: Revision 3.0.1.3  1995/01/30  14:44:23  ram
16 ?RCS: patch49: can now handle installation prefix changes (from WED)
17 ?RCS:
18 ?RCS: Revision 3.0.1.2  1994/08/29  16:31:52  ram
19 ?RCS: patch32: now uses installation prefix
20 ?RCS:
21 ?RCS: Revision 3.0.1.1  1993/09/13  16:12:34  ram
22 ?RCS: patch10: added support for /local/lib (WED)
23 ?RCS: patch10: prompt phrasing made more explicit (WED)
24 ?RCS:
25 ?RCS: Revision 3.0  1993/08/18  12:09:35  ram
26 ?RCS: Baseline for dist 3.0 netwide release.
27 ?RCS:
28 ?MAKE:privlib privlibexp installprivlib: afs package cat Getfile \
29         Oldconfig Prefixit test
30 ?MAKE:  -pick add $@ %<
31 ?Y:TOP
32 ?S:privlib:
33 ?S:     This variable contains the eventual value of the PRIVLIB symbol,
34 ?S:     which is the name of the private library for this package.  It may
35 ?S:     have a ~ on the front. It is up to the makefile to eventually create
36 ?S:     this directory while performing installation (with ~ substitution).
37 ?S:.
38 ?S:privlibexp:
39 ?S:     This variable is the ~name expanded version of privlib, so that you
40 ?S:     may use it directly in Makefiles or shell scripts.
41 ?S:.
42 ?S:installprivlib:
43 ?S:     This variable is really the same as privlibexp but may differ on
44 ?S:     those systems using AFS. For extra portability, only this variable
45 ?S:     should be used in makefiles.
46 ?S:.
47 ?C:PRIVLIB:
48 ?C:     This symbol contains the name of the private library for this package.
49 ?C:     The library is private in the sense that it needn't be in anyone's
50 ?C:     execution path, but it should be accessible by the world.  The program
51 ?C:     should be prepared to do ~ expansion.
52 ?C:.
53 ?C:PRIVLIB_EXP:
54 ?C:     This symbol contains the ~name expanded version of PRIVLIB, to be used
55 ?C:     in programs that are not prepared to deal with ~ expansion at run-time.
56 ?C:.
57 ?H:#define PRIVLIB "$privlib"           /**/
58 ?H:#define PRIVLIB_EXP "$privlibexp"            /**/
59 ?H:.
60 : determine where private executables go
61 set dflt privlib lib/$package
62 eval $prefixit
63 $cat <<EOM
64
65 There are some auxiliary files for $package that need to be put into a
66 private library directory that is accessible by everyone.
67
68 EOM
69 fn=d~+
70 rp='Pathname where the private library files will reside?'
71 . ./getfile
72 if $test "X$privlibexp" != "X$ansexp"; then
73         installprivlib=''
74 fi
75 privlib="$ans"
76 privlibexp="$ansexp"
77 if $afs; then
78         $cat <<EOM
79
80 Since you are running AFS, I need to distinguish the directory in which
81 private files reside from the directory in which they are installed (and from
82 which they are presumably copied to the former directory by occult means).
83
84 EOM
85         case "$installprivlib" in
86         '') dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;;
87         *) dflt="$installprivlib";;
88         esac
89         fn=de~
90         rp='Where will private files be installed?'
91         . ./getfile
92         installprivlib="$ans"
93 else
94         installprivlib="$privlibexp"
95 fi
96