Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: patchlevel.U,v 3.0.1.1 1997/02/28 16:18:41 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
edd6115f | 4 | ?RCS: |
959f3c4c JH |
5 | ?RCS: This file is included with or a derivative work of a file included |
6 | ?RCS: with the metaconfig program of Raphael Manfredi's "dist" distribution. | |
7 | ?RCS: In accordance with clause 7 of dist's modified Artistic License: | |
8 | ?RCS: | |
9 | ?RCS: You may distribute under the terms of either the GNU General Public | |
10 | ?RCS: License or the Artistic License, as specified in the README file. | |
11 | ?RCS: | |
12 | ?RCS: $Log: patchlevel.U,v $ | |
13 | ?RCS: Revision 3.0.1.1 1997/02/28 16:18:41 ram | |
14 | ?RCS: patch61: added support for src.U | |
15 | ?RCS: | |
16 | ?RCS: Revision 3.0 1993/08/18 12:09:31 ram | |
17 | ?RCS: Baseline for dist 3.0 netwide release. | |
18 | ?RCS: | |
0fdea05a JH |
19 | ?MAKE:patchlevel revision version subversion \ |
20 | api_revision api_version api_subversion api_versionstring: \ | |
21 | package test rsrc echo n c awk osname | |
959f3c4c | 22 | ?MAKE: -pick add $@ %< |
0fdea05a JH |
23 | ?S:revision: |
24 | ?S: The value of revision comes from the patchlevel.h file. | |
25 | ?S: In a version number such as 5.6.1, this is the "5". | |
26 | ?S: In patchlevel.h, this is referred to as "PERL_REVISION". | |
27 | ?S:. | |
959f3c4c JH |
28 | ?S:patchlevel: |
29 | ?S: The patchlevel level of this package. | |
30 | ?S: The value of patchlevel comes from the patchlevel.h file. | |
edd6115f | 31 | ?S: In a version number such as 5.6.1, this is the "6". |
0fdea05a | 32 | ?S: In patchlevel.h, this is referred to as "PERL_VERSION". |
959f3c4c JH |
33 | ?S:. |
34 | ?S:subversion: | |
35 | ?S: The subversion level of this package. | |
36 | ?S: The value of subversion comes from the patchlevel.h file. | |
edd6115f | 37 | ?S: In a version number such as 5.6.1, this is the "1". |
0fdea05a | 38 | ?S: In patchlevel.h, this is referred to as "PERL_SUBVERSION". |
959f3c4c JH |
39 | ?S: This is unique to perl. |
40 | ?S:. | |
41 | ?S:version: | |
edd6115f | 42 | ?S: The full version number of this package, such as 5.6.1 (or 5_6_1). |
0fdea05a | 43 | ?S: This combines revision, patchlevel, and subversion to get the |
edd6115f JH |
44 | ?S: full version number, including any possible subversions. |
45 | ?S: This is suitable for use as a directory name, and hence is | |
46 | ?S: filesystem dependent. | |
47 | ?S:. | |
48 | ?S:api_revision: | |
49 | ?S: The three variables, api_revision, api_version, and | |
50 | ?S: api_subversion, specify the version of the oldest perl binary | |
51 | ?S: compatible with the present perl. In a full version string | |
52 | ?S: such as '5.6.1', api_revision is the '5'. | |
53 | ?S: Prior to 5.5.640, the format was a floating point number, | |
54 | ?S: like 5.00563. | |
55 | ?S: | |
56 | ?S: perl.c:incpush() and lib/lib.pm will automatically search in | |
57 | ?S: $sitelib/.. for older directories back to the limit specified | |
58 | ?S: by these api_ variables. This is only useful if you have a | |
59 | ?S: perl library directory tree structured like the default one. | |
60 | ?S: See INSTALL for how this works. The versioned site_perl | |
61 | ?S: directory was introduced in 5.005, so that is the lowest | |
62 | ?S: possible value. The version list appropriate for the current | |
63 | ?S: system is determined in inc_version_list.U. | |
64 | ?S: | |
65 | ?S: XXX To do: Since compatibility can depend on compile time | |
66 | ?S: options (such as bincompat, longlong, etc.) it should | |
67 | ?S: (perhaps) be set by Configure, but currently it isn't. | |
68 | ?S: Currently, we read a hard-wired value from patchlevel.h. | |
69 | ?S: Perhaps what we ought to do is take the hard-wired value from | |
70 | ?S: patchlevel.h but then modify it if the current Configure | |
71 | ?S: options warrant. patchlevel.h then would use an #ifdef guard. | |
72 | ?S:. | |
73 | ?S:api_version: | |
74 | ?S: The three variables, api_revision, api_version, and | |
75 | ?S: api_subversion, specify the version of the oldest perl binary | |
76 | ?S: compatible with the present perl. In a full version string | |
77 | ?S: such as '5.6.1', api_version is the '6'. See api_revision for | |
78 | ?S: full details. As a special case, 5.5.0 is rendered in the | |
79 | ?S: old-style as 5.005. (In the 5.005_0x maintenance series, | |
80 | ?S: this was the only versioned directory in $sitelib.) | |
81 | ?S:. | |
82 | ?S:api_subversion: | |
83 | ?S: The three variables, api_revision, api_version, and | |
84 | ?S: api_subversion, specify the version of the oldest perl binary | |
85 | ?S: compatible with the present perl. In a full version string | |
86 | ?S: such as '5.6.1', api_subversion is the '1'. See api_revision for | |
87 | ?S: full details. | |
959f3c4c | 88 | ?S:. |
edd6115f JH |
89 | ?S:api_versionstring: |
90 | ?S: This variable combines api_revision, api_version, and | |
91 | ?S: api_subversion in a format such as 5.6.1 (or 5_6_1) suitable | |
92 | ?S: for use as a directory name. This is filesystem dependent. | |
959f3c4c | 93 | ?S:. |
edd6115f | 94 | |
959f3c4c JH |
95 | ?LINT:extern LC_ALL |
96 | ?LINT:change LC_ALL | |
97 | ?LINT:extern LANGUAGE | |
98 | ?LINT:change LANGUAGE | |
99 | : get the patchlevel | |
100 | echo " " | |
101 | echo "Getting the current patchlevel..." >&4 | |
102 | if $test -r $rsrc/patchlevel.h;then | |
0fdea05a | 103 | revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` |
959f3c4c JH |
104 | patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` |
105 | subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` | |
edd6115f JH |
106 | api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` |
107 | api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` | |
108 | api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` | |
959f3c4c | 109 | else |
0fdea05a | 110 | revision=0 |
959f3c4c JH |
111 | patchlevel=0 |
112 | subversion=0 | |
edd6115f JH |
113 | api_revision=0 |
114 | api_version=0 | |
115 | api_subversion=0 | |
959f3c4c | 116 | fi |
0fdea05a | 117 | $echo $n "(You have $package revision $revision" $c |
959f3c4c JH |
118 | $echo $n " patchlevel $patchlevel" $c |
119 | test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c | |
120 | echo ".)" | |
edd6115f | 121 | case "$osname" in |
0e496f3d | 122 | dos|vms) |
edd6115f | 123 | : XXX Should be a Configure test for double-dots in filenames. |
0fdea05a | 124 | version=`echo $revision $patchlevel $subversion | \ |
edd6115f JH |
125 | $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` |
126 | api_versionstring=`echo $api_revision $api_version $api_subversion | \ | |
127 | $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` | |
128 | ;; | |
129 | *) | |
0fdea05a | 130 | version=`echo $revision $patchlevel $subversion | \ |
edd6115f JH |
131 | $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` |
132 | api_versionstring=`echo $api_revision $api_version $api_subversion | \ | |
133 | $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` | |
134 | ;; | |
135 | esac | |
136 | : Special case the 5.005_xx maintenance series, which used 5.005 | |
137 | : without any subversion label as a subdirectory in $sitelib | |
138 | if test "${api_revision}${api_version}${api_subversion}" = "550"; then | |
139 | api_versionstring='5.005' | |
959f3c4c | 140 | fi |
959f3c4c | 141 |