This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Metaconfig and Porting patches from Andy; start using the new
[metaconfig.git] / U / installdirs / vendorlib.U
CommitLineData
959f3c4c
JH
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 \
edd6115f 18 installstyle installprefix version
959f3c4c
JH
19?MAKE: -pick add $@ %<
20?Y:TOP
21?S:vendorlib:
22?S: This variable contains the eventual value of the VENDORLIB symbol,
860c366a
JH
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.
959f3c4c
JH
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.
860c366a
JH
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.
959f3c4c
JH
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
61case "$vendorprefix" in
62'') d_vendorlib="$undef"
63 vendorlib=''
64 vendorlibexp=''
65 ;;
66*) d_vendorlib="$define"
67 : determine where vendor-supplied modules go.
edd6115f 68 : Usual default is /usr/local/lib/perl5/vendor_perl/$version
959f3c4c
JH
69?X: remove any trailing -3.0 or other version identification
70 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
71 case "$installstyle" in
edd6115f
JH
72 *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
73 *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
959f3c4c
JH
74 esac
75 fn=d~+
76 rp='Pathname for the vendor-supplied library files?'
77 . ./getfile
78 vendorlib="$ans"
79 vendorlibexp="$ansexp"
80 : Change installation prefix, if necessary.
81 if $test X"$prefix" != X"$installprefix"; then
57a656d5 82 installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
959f3c4c
JH
83 else
84 installvendorlib="$vendorlibexp"
85 fi
86 ;;
87esac
88