develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH Configure] perl -V broken

Thread Previous | Thread Next
From:
Robin Barker
Date:
July 10, 2001 08:37
Subject:
Re: [PATCH Configure] perl -V broken
Message ID:
200107101537.QAA25331@tempest.npl.co.uk
----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 71

I wrote:
> I found that with bleadperl (installed as perl5.7.1)
> 
> 	% perl5.7.1 -V
> 	Summary of my perl5 (revision 5.0 version 7 subversion 17) configuration:
> 
> Whereas 
> 	% ./myconfig
> 	Summary of my perl5 (revision 5.0 version 7 subversion 1 patchlevel 11224) 
>	configuration:

Attached is a more general version of yesterday's patch.

It defines version_patchlevel, which is the string 'version 7 subversion 1'
or 'version 7 subversion 1 patchlevel 11224'; used by Configure and myconfig.

Robin

diff -u -r perl/Configure perl-11238/Configure
--- perl/Configure	Mon Jul  9 15:09:38 2001
+++ perl-11238/Configure
@@ -6088,10 +6088,15 @@
 		perl_patchlevel=`cat $rsrc/.patch`
 	fi
 fi
+version_patchlevel="version $patchlevel subversion $subversion"
 case "$perl_patchlevel" in
 0)  ;;
-'') $echo "(You have $package version $patchlevel subversion $subversion.)" ;;
-*)  $echo "(You have $package version $patchlevel subversion $subversion patchlevel $perl_patchlevel.)" ;;
+*)  case "$perl_patchlevel" in
+    '') ;;
+    *)  version_patchlevel="$version_patchlevel patchlevel $perl_patchlevel" ;;
+    esac
+    $echo "(You have $package $version_patchlevel.)"
+    ;;
 esac
 case "$osname" in
 dos|vms)
@@ -17383,6 +17388,7 @@
 awk '/^#define[ 	]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
 echo "PERL_CONFIG_SH=true" >>config.sh
+echo "version_patchlevel='$version_patchlevel'" >>config.sh
 
 : propagate old symbols
 if $test -f UU/config.sh; then
diff -u -r perl/myconfig.SH perl-11238/myconfig.SH
--- perl/myconfig.SH	Mon Jul  9 15:11:06 2001
+++ perl-11238/myconfig.SH
@@ -12,11 +12,6 @@
 	. $TOP/config.sh
 	;;
 esac
-if $test "$PERL_PATCHLEVEL" -gt 0 ; then
-    patchlevel=" patchlevel $PERL_PATCHLEVEL"
-else
-    patchlevel=""
-fi
 : This forces SH files to create target in same directory as SH file.
 : This is so that make depend always knows where to find SH derivatives.
 case "$0" in
@@ -32,7 +27,7 @@
 
 # Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
 cat <<'!NO!SUBS!'
-Summary of my $package (revision $baserev version $PERL_VERSION subversion $PERL_SUBVERSION$patchlevel) configuration:
+Summary of my $package (revision $baserev $version_patchlevel) configuration:
   Platform:
     osname=$osname, osvers=$osvers, archname=$archname
     uname='$myuname'
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: version_patchlevel.patch
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 53

diff -u -r perl/Configure perl-11238/Configure
--- perl/Configure	Mon Jul  9 15:09:38 2001
+++ perl-11238/Configure
@@ -6088,10 +6088,15 @@
 		perl_patchlevel=`cat $rsrc/.patch`
 	fi
 fi
+version_patchlevel="version $patchlevel subversion $subversion"
 case "$perl_patchlevel" in
 0)  ;;
-'') $echo "(You have $package version $patchlevel subversion $subversion.)" ;;
-*)  $echo "(You have $package version $patchlevel subversion $subversion patchlevel $perl_patchlevel.)" ;;
+*)  case "$perl_patchlevel" in
+    '') ;;
+    *)  version_patchlevel="$version_patchlevel patchlevel $perl_patchlevel" ;;
+    esac
+    $echo "(You have $package $version_patchlevel.)"
+    ;;
 esac
 case "$osname" in
 dos|vms)
@@ -17383,6 +17388,7 @@
 awk '/^#define[ 	]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
 echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
 echo "PERL_CONFIG_SH=true" >>config.sh
+echo "version_patchlevel='$version_patchlevel'" >>config.sh
 
 : propagate old symbols
 if $test -f UU/config.sh; then
diff -u -r perl/myconfig.SH perl-11238/myconfig.SH
--- perl/myconfig.SH	Mon Jul  9 15:11:06 2001
+++ perl-11238/myconfig.SH
@@ -12,11 +12,6 @@
 	. $TOP/config.sh
 	;;
 esac
-if $test "$PERL_PATCHLEVEL" -gt 0 ; then
-    patchlevel=" patchlevel $PERL_PATCHLEVEL"
-else
-    patchlevel=""
-fi
 : This forces SH files to create target in same directory as SH file.
 : This is so that make depend always knows where to find SH derivatives.
 case "$0" in
@@ -32,7 +27,7 @@
 
 # Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
 cat <<'!NO!SUBS!'
-Summary of my $package (revision $baserev version $PERL_VERSION subversion $PERL_SUBVERSION$patchlevel) configuration:
+Summary of my $package (revision $baserev $version_patchlevel) configuration:
   Platform:
     osname=$osname, osvers=$osvers, archname=$archname
     uname='$myuname'

-- 
Robin Barker                        | Email: Robin.Barker@npl.co.uk
CMSC, Building 10,                  | Phone: +44 (0) 20 8943 7090
National Physical Laboratory,       | Fax:   +44 (0) 20 8977 7091
Teddington, Middlesex, UK. TW11 OLW | WWW:   http://www.npl.co.uk

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About