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: package baserev test \
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: This is a number which identifies the lowest version of perl
40 ?S: to have an API (for XS extensions) compatible with the present
41 ?S: version. For example, for 5.005_01, the apiversion should be
42 ?S: 5.005, since 5.005_01 should be binary compatible with 5.005.
43 ?S: This should probably be incremented manually somehow, perhaps
44 ?S: from patchlevel.h. For now, we'll guess maintenance subversions
45 ?S: will retain binary compatibility.
53 echo "Getting the current patchlevel..." >&4
54 if $test -r $rsrc/patchlevel.h;then
55 patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
56 subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
61 $echo $n "(You have $package" $c
64 *) $echo $n " $baserev" $c ;;
66 $echo $n " patchlevel $patchlevel" $c
67 test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
70 if test 0 -eq "$subversion"; then
71 version=`LC_ALL=C; export LC_ALL; \
72 echo $baserev $patchlevel | \
73 $awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`
75 version=`LC_ALL=C; export LC_ALL; \
76 echo $baserev $patchlevel $subversion | \
77 $awk '{ printf "%.5f\n", $1 + $2/1000.0 + $3/100000.0 }'`
79 : Figure out perl API version. Perhaps this should be in patchlevel.h
80 if test "$subversion" -lt 50; then
81 apiversion=`LC_ALL=C; export LC_ALL; \
82 LANGUAGE=C; export LANGUAGE; \
83 echo $baserev $patchlevel | \
84 $awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`