This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
815db3f751480aaa6583d40897ad88f4e618039c
[metaconfig.git] / U / installdirs / localarch.U
1 ?RCS: $Id: localarch.U,v 1.1 1999/07/08 18:32:57 doughera Exp doughera $
2 ?RCS:
3 ?RCS: Copyright (c) 1999, Jarkko Hietaniemi
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 3.0.
10 ?RCS:
11 ?RCS:
12 ?MAKE:localarch localarchexp installlocalarch installlocalarchexp: \
13         afs cat Getfile \
14         Oldconfig Prefixit test archname uselocallib locallib sitearch
15 ?MAKE:  -pick add $@ %<
16 ?Y:TOP
17 ?S:localarch:
18 ?S:     This variable contains the eventual value of the LOCALARCH symbol,
19 ?S:     which is the name of the private library for this package.  It may
20 ?S:     have a ~ on the front. It is up to the makefile to eventually create
21 ?S:     this directory while performing installation (with ~ substitution).
22 ?S:     This differs from $sitearch in that $sitearch is often
23 ?S:     a shared network directory while $localarch is
24 ?S:     at a local disk, because of policy/administrative issues
25 ?S:     like for example caching (performance), licensing, or security.
26 ?S:.
27 ?S:localarchexp:
28 ?S:     This variable is the ~name expanded version of localarch, so that you
29 ?S:     may use it directly in Makefiles or shell scripts.
30 ?S:.
31 ?S:installlocalarch:
32 ?S:     This variable is really the same as localarchexp but may differ on
33 ?S:     those systems using AFS. For extra portability, only this variable
34 ?S:     should be used in makefiles.
35 ?S:.
36 ?S:installlocalarchexp:
37 ?S:     This variable is the ~name expanded version of installlocalarch,
38 ?S:     so that you may use it directly in Makefiles or shell scripts.
39 ?S:.
40 ?C:LOCALARCH:
41 ?C:     This symbol contains the name of the private library for this package.
42 ?C:     The library is private in the sense that it needn't be in anyone's
43 ?C:     execution path, but it should be accessible by the world.  The program
44 ?C:     should be prepared to do ~ expansion.
45 ?C:     The standard distribution will put nothing in this directory.
46 ?C:     Local administration may place extensions and modules in
47 ?C:     this directory.
48 ?C:     This differs from SITEARCH in that SITEARCH is often
49 ?C:     a shared network directory while LOCALARCH is
50 ?C:     at a local disk, because of policy/administrative issues
51 ?C:     like for example caching (performance), licensing, or security.
52 ?C:.
53 ?C:LOCALARCH_EXP:
54 ?C:     This symbol contains the ~name expanded version of LOCALARCH,
55 ?C:     to be used in programs that are not prepared to deal with ~
56 ?C:     expansion at run-time.
57 ?C:.
58 ?H:#define LOCALARCH "$localarch"               /**/
59 ?H:#define LOCALARCH_EXP "$localarchexp"                /**/
60 ?H:.
61 ?T:tdflt
62 ?LINT:extern sitearch
63 : Set the localarch variables
64 case "$uselocallib" in
65 "$define")
66         case "$sitearch" in
67         '')     tdflt="$tdflt/$archname"
68                 set sitearch sitearch none
69                 eval $prefixit
70                 dflt="$tdflt" ;;
71         *)      dflt="$sitearch" ;;
72         esac
73         $cat <<EOM
74
75 The installation process will also create a directory for
76 architecture-dependent extensions and modules to be installed
77 alongside $locallib.
78
79 EOM
80         fn=nd~+
81         rp='Pathname for local architecture-dependent library files?'
82         . ./getfile
83         if $test "X$localarchexp" != "X$ansexp"; then
84                 installlocalarch=''
85         fi
86         localarch="$ans"
87         localarchexp="$ansexp"
88         if $afs; then
89                 $cat <<EOM
90
91 Since you are running AFS, I need to distinguish the directory in
92 which locally installed architecture-dependent library files reside
93 from the directory in which they are installed (and from which they
94 are presumably copied to the former directory by occult means).
95
96 EOM
97                 case "$installlocalarch" in
98                 '') dflt=`echo $localarchexp | sed 's#^/afs/#/afs/.#'`;;
99                 *) dflt="$installlocalarch";;
100                 esac
101                 fn=de~
102                 rp='Where will local architecture-dependent files be installed?'
103                 . ./getfile
104                 installlocalarch="$ans"
105         else
106                 installlocalarch="$localarchexp"
107         fi
108         ;;
109 *)
110         localarch=""
111         localarchexp=""
112         installlocalarch=""
113         installlocalarchexp=""
114         ;;
115 esac
116