Debian Codegraph @

regen-configure/U/installdirs/installstyle.U

raw
1 ?RCS: $Id: installstyle.U,v 1.2 1999/07/13 14:56:06 doughera Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1999 Andy Dougherty
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; 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: installstyle.U,v $
12 ?RCS: Revision 1.2 1999/07/13 14:56:06 doughera
13 ?RCS: Fix dependencies. Add more comments.
14 ?RCS:
15 ?RCS: Revision 1.1 1999/07/12 17:30:41 doughera
16 ?RCS: Initial revision
17 ?RCS:
18 ?RCS:
19 ?MAKE:installstyle: prefix Myread
20 ?MAKE: -pick add $@ %<
21 ?X: Myread dependence is for dflt.
22 ?S:installstyle:
23 ?S: This variable describes the "style" of the perl installation.
24 ?S: This is intended to be useful for tools that need to
25 ?S: manipulate entire perl distributions. Perl itself doesn't use
26 ?S: this to find its libraries -- the library directories are
27 ?S: stored directly in Config.pm. Currently, there are only two
28 ?S: styles: "lib" and "lib/perl5". The default library locations
29 ?S: (e.g. privlib, sitelib) are either $prefix/lib or
30 ?S: $prefix/lib/perl5. The former is useful if $prefix is a
31 ?S: directory dedicated to perl (e.g. /opt/perl), while the latter
32 ?S: is useful if $prefix is shared by many packages, e.g. if
33 ?S: $prefix=/usr/local.
34 ?S:
35 ?S: Unfortunately, while this "style" variable is used to set
36 ?S: defaults for all three directory hierarchies (core, vendor, and
37 ?S: site), there is no guarantee that the same style is actually
38 ?S: appropriate for all those directories. For example, $prefix
39 ?S: might be /opt/perl, but $siteprefix might be /usr/local.
40 ?S: (Perhaps, in retrospect, the "lib" style should never have been
41 ?S: supported, but it did seem like a nice idea at the time.)
42 ?S:
43 ?S: The situation is even less clear for tools such as MakeMaker
44 ?S: that can be used to install additional modules into
45 ?S: non-standard places. For example, if a user intends to install
46 ?S: a module into a private directory (perhaps by setting PREFIX on
47 ?S: the Makefile.PL command line), then there is no reason to
48 ?S: assume that the Configure-time $installstyle setting will be
49 ?S: relevant for that PREFIX.
50 ?S:
51 ?S: This may later be extended to include other information, so
52 ?S: be careful with pattern-matching on the results.
53 ?S:
54 ?S: For compatibility with perl5.005 and earlier, the default
55 ?S: setting is based on whether or not $prefix contains the string
56 ?S: "perl".
57 ?S:.
58 : determine installation style
59 : For now, try to deduce it from prefix unless it is already set.
60 : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
61 case "$installstyle" in
62 '') case "$prefix" in
63 *perl*) dflt='lib';;
64 *) dflt='lib/perl5' ;;
65 esac
66 ;;
67 *) dflt="$installstyle" ;;
68 esac
69 : Probably not worth prompting for this since we prompt for all
70 : the directories individually, and the prompt would be too long and
71 : confusing anyway.
72 installstyle=$dflt
73