This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Megalopatch for Configure: Andy's new installation schemes;
[metaconfig.git] / U / installdirs / vendorlib.U
1 ?RCS: $Id: vendorlib.U,v 1.1 1999/07/08 18:32:57 doughera Exp doughera $
2 ?RCS:
3 ?RCS: Copyright (c) 1999, Andy Dougherty
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: $Log: vendorlib.U,v $
12 ?RCS: Revision 1.1  1999/07/08 18:32:57  doughera
13 ?RCS: Initial revision
14 ?RCS:
15 ?RCS:
16 ?MAKE:d_vendorlib vendorlib vendorlibexp installvendorlib: Getfile \
17         Oldconfig Prefixit test package vendorprefix prefix sed \
18         installstyle installprefix version
19 ?MAKE:  -pick add $@ %<
20 ?Y:TOP
21 ?S:vendorlib:
22 ?S:     This variable contains the eventual value of the VENDORLIB symbol,
23 ?S:     which is the name of the private library for this package.
24 ?S:     The standard distribution will put nothing in this directory.
25 ?S:     Vendors who distribute perl may wish to place their own
26 ?S:     modules in this directory with
27 ?S:             MakeMaker Makefile.PL INSTALLDIRS=vendor 
28 ?S:     or equivalent.  See INSTALL for details.
29 ?S:.
30 ?S:vendorlibexp:
31 ?S:     This variable is the ~name expanded version of vendorlib, so that you
32 ?S:     may use it directly in Makefiles or shell scripts.
33 ?S:.
34 ?S:installvendorlib:
35 ?S:     This variable is really the same as vendorlibexp 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 ?S:d_vendorlib:
40 ?S:     This variable conditionally defines PERL_VENDORLIB.
41 ?S:.
42 ?C:PERL_VENDORLIB:
43 ?C:     If defined, this symbol contains the name of a private library.
44 ?C:     The library is private in the sense that it needn't be in anyone's
45 ?C:     execution path, but it should be accessible by the world.  The program
46 ?C:     should be prepared to do ~ expansion.
47 ?C:     The standard distribution will put nothing in this directory.
48 ?C:     Vendors who distribute perl may wish to place their own
49 ?C:     modules in this directory with
50 ?C:             MakeMaker Makefile.PL INSTALLDIRS=vendor 
51 ?C:     or equivalent.  See INSTALL for details.
52 ?C:.
53 ?C:PERL_VENDORLIB_EXP:
54 ?C:     This symbol contains the ~name expanded version of VENDORLIB, to be used
55 ?C:     in programs that are not prepared to deal with ~ expansion at run-time.
56 ?C:.
57 ?H:#$d_vendorlib PERL_VENDORLIB "$vendorlib"            /**/
58 ?H:#$d_vendorlib PERL_VENDORLIB_EXP "$vendorlibexp"             /**/
59 ?H:.
60 ?T:prog
61 case "$vendorprefix" in
62 '')     d_vendorlib="$undef"
63         vendorlib=''
64         vendorlibexp=''
65         ;;
66 *)      d_vendorlib="$define"
67         : determine where vendor-supplied modules go.
68         : Usual default is /usr/local/lib/perl5/vendor_perl/$version
69         case "$vendorlib" in
70         '')
71 ?X:             remove any trailing -3.0 or other version identification
72                 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
73                 case "$installstyle" in
74                 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
75                 *)           dflt=$vendorprefix/lib/vendor_$prog/$version ;;
76                 esac
77                 ;;
78         *)      dflt="$vendorlib"
79                 ;;
80         esac
81         fn=d~+
82         rp='Pathname for the vendor-supplied library files?'
83         . ./getfile
84         vendorlib="$ans"
85         vendorlibexp="$ansexp"
86         ;;
87 esac
88 : Change installation prefix, if necessary.
89 if $test X"$prefix" != X"$installprefix"; then
90         installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
91 else
92         installvendorlib="$vendorlibexp"
93 fi
94