Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: vendorscript.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: vendorscript.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_vendorscript vendorscript vendorscriptexp installvendorscript: cat Getfile \ | |
17 | Oldconfig Prefixit test vendorprefix prefix sed installprefix | |
18 | ?MAKE: -pick add $@ %< | |
19 | ?Y:TOP | |
20 | ?S:vendorscript: | |
21 | ?S: This variable contains the eventual value of the VENDORSCRIPT symbol, | |
22 | ?S: which is the name of the private directory for exuctables for this package. | |
23 | ?S: It may have a ~ on the front. It is up to the makefile to eventually create | |
24 | ?S: this directory while performing installation (with ~ substitution). | |
25 | ?S: Vendors who distribute perl binaries may place their own | |
26 | ?S: extensions and modules in this directory. | |
27 | ?S:. | |
28 | ?S:vendorscriptexp: | |
29 | ?S: This variable is the ~name expanded version of vendorscript, so that you | |
30 | ?S: may use it directly in Makefiles or shell scripts. | |
31 | ?S:. | |
32 | ?S:installvendorscript: | |
33 | ?S: This variable is really the same as vendorscriptexp but may differ on | |
34 | ?S: those systems using AFS. For extra portability, only this variable | |
35 | ?S: should be used in makefiles. | |
36 | ?S:. | |
37 | ?S:d_vendorscript: | |
38 | ?S: This variable conditionally defines PERL_VENDORSCRIPT. | |
39 | ?S:. | |
40 | ?C:PERL_VENDORSCRIPT: | |
41 | ?C: If defined, this symbol contains the name of a private directory | |
42 | ?C: holding scripts. | |
43 | ?C: The directory is private in the sense that it needn't be in anyone's | |
44 | ?C: execution path, but it should be accessible by the world. The program | |
45 | ?C: should be prepared to do ~ expansion. | |
46 | ?C: The standard distribution will put nothing in this directory. | |
47 | ?C: Vendors who distribute perl binaries may place their own | |
48 | ?C: extensions and modules in this directory. | |
49 | ?C:. | |
50 | ?C:PERL_VENDORSCRIPT_EXP: | |
51 | ?C: This symbol contains the ~name expanded version of VENDORSCRIPT, to be used | |
52 | ?C: in programs that are not prepared to deal with ~ expansion at run-time. | |
53 | ?C:. | |
54 | ?H:#$d_vendorscript PERL_VENDORSCRIPT "$vendorscript" /**/ | |
55 | ?H:#$d_vendorscript PERL_VENDORSCRIPT_EXP "$vendorscriptexp" /**/ | |
56 | ?H:. | |
57 | case "$vendorprefix" in | |
58 | '') d_vendorscript="$undef" | |
59 | vendorscript='' | |
60 | vendorscriptexp='' | |
61 | ;; | |
62 | *) d_vendorscript="$define" | |
63 | : determine where vendor-supplied scripts go. | |
64 | dflt=$vendorprefix/script | |
65 | $cat <<EOM | |
66 | ||
67 | The installation process will create a directory for | |
68 | vendor-supplied scripts. | |
69 | ||
70 | EOM | |
71 | fn=d~+ | |
72 | rp='Pathname for the vendor-supplied scripts directory?' | |
73 | . ./getfile | |
74 | vendorscript="$ans" | |
75 | vendorscriptexp="$ansexp" | |
76 | : Change installation prefix, if necessary. | |
77 | if $test X"$prefix" != X"$installprefix"; then | |
78 | installvendorscript=`echo $vendorscriptexp | $sed 's#^$prefix#$installprefix#'` | |
79 | else | |
80 | installvendorscript="$vendorscriptexp" | |
81 | fi | |
82 | ;; | |
83 | esac | |
84 |