1 ?RCS: $Id: patchlevel.U,v 3.0.1.1 1997/02/28 16:18:41 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
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:
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.
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
16 ?RCS: Revision 3.0 1993/08/18 12:09:31 ram
17 ?RCS: Baseline for dist 3.0 netwide release.
19 ?MAKE:patchlevel version subversion apiversion: \
20 package baserev test rsrc echo n c awk
21 ?MAKE: -pick add $@ %<
23 ?S: The patchlevel level of this package.
24 ?S: The value of patchlevel comes from the patchlevel.h file.
27 ?S: The subversion level of this package.
28 ?S: The value of subversion comes from the patchlevel.h file.
29 ?S: This is unique to perl.
32 ?S: The full version number of this package. This combines
33 ?S: baserev, patchlevel, and subversion to get the full
34 ?S: version number, including any possible subversions. Care
35 ?S: is taken to use the C locale in order to get something
36 ?S: like 5.004 instead of 5,004. This is unique to perl.
39 ?S: MakeMaker will install add-on modules in a directory with the
40 ?S: PERL_APIVERSION version number. The value is set manually in
41 ?S: patchlevel.h. Normally, for maintenance releases, this is
42 ?S: just something like 5.005 or 5.6 or 5.7. That is, it does not
43 ?S: include the subversion number and does not change across
44 ?S: maintenance releases. This is so that add-on extensions can
45 ?S: be shared across maintenance versions. It is unclear how this
46 ?S: ought to work for developer versions. If a release breaks
47 ?S: binary compatibility, this number should be increased.
55 echo "Getting the current patchlevel..." >&4
56 if $test -r $rsrc/patchlevel.h;then
57 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
58 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
59 apiversion=`awk '/define[ ]+PERL_APIVERSION/ {print $3}' $rsrc/patchlevel.h`
65 $echo $n "(You have $package" $c
68 *) $echo $n " $baserev" $c ;;
70 $echo $n " patchlevel $patchlevel" $c
71 test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
74 if test 0 -eq "$subversion"; then
75 version=`LC_ALL=C; export LC_ALL; \
76 echo $baserev $patchlevel | \
77 $awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`
79 version=`LC_ALL=C; export LC_ALL; \
80 echo $baserev $patchlevel $subversion | \
81 $awk '{ printf "%.5f\n", $1 + $2/1000.0 + $3/100000.0 }'`