diff options
author | lecoanet | 2005-05-25 08:19:52 +0000 |
---|---|---|
committer | lecoanet | 2005-05-25 08:19:52 +0000 |
commit | 3f823b2fb0a17832ade53e017ca7743a4fd85ee2 (patch) | |
tree | e4bca80c31de30edb29f372c9217e6d8a541aefd | |
parent | 57d00cb98f4308e7d5d69cb5127005b655ab2ad5 (diff) | |
download | tkzinc-3f823b2fb0a17832ade53e017ca7743a4fd85ee2.zip tkzinc-3f823b2fb0a17832ade53e017ca7743a4fd85ee2.tar.gz tkzinc-3f823b2fb0a17832ade53e017ca7743a4fd85ee2.tar.bz2 tkzinc-3f823b2fb0a17832ade53e017ca7743a4fd85ee2.tar.xz |
Adapted following change in version number handling of Zinc.pm and MAkefile.PL
-rw-r--r-- | win/package.tcl | 76 |
1 files changed, 46 insertions, 30 deletions
diff --git a/win/package.tcl b/win/package.tcl index 7585c01..cd2cbdb 100644 --- a/win/package.tcl +++ b/win/package.tcl @@ -8,6 +8,36 @@ set todo [lindex $argv 0] set root [file join [file dirname [info script]] ..] +# +# First get the configure variable values. +# +set fid [open [file join $root configure.in]] +while { ! [eof $fid] } { + set line [gets $fid] + if { [regexp {^MAJOR_VERSION=(.*)$} $line dummy major] } { + continue + } + if { [regexp {^MINOR_VERSION=(.*)$} $line dummy minor] } { + continue + } + if { [regexp {^PATCHLEVEL=(.*)$} $line dummy patchlevel] } { + continue + } + if { [regexp {^VERSION=(.*)$} $line dummy version] } { + continue + } + if { [regexp {^PACKAGE=(.*)$} $line dummy package] } { + continue + } + if { [regexp {^Tkzinc_LIB_FILE=(.*)$} $line dummy libFile] } { + continue + } + if { [regexp {^Tkzincstub_LIB_FILE=(.*)$} $line dummy stubLibFile] } { + continue + } +} +close $fid + if { $todo eq "subst" || $todo eq "" } { # # Substitute @variables@ in the .in registred files @@ -23,35 +53,6 @@ if { $todo eq "subst" || $todo eq "" } { { win Tkzinc.wxs } } - # - # First get the variable values. - # - set fid [open [file join $root configure.in]] - while { ! [eof $fid] } { - set line [gets $fid] - if { [regexp {^MAJOR_VERSION=(.*)$} $line dummy major] } { - continue - } - if { [regexp {^MINOR_VERSION=(.*)$} $line dummy minor] } { - continue - } - if { [regexp {^PATCHLEVEL=(.*)$} $line dummy patchlevel] } { - continue - } - if { [regexp {^VERSION=(.*)$} $line dummy version] } { - continue - } - if { [regexp {^PACKAGE=(.*)$} $line dummy package] } { - continue - } - if { [regexp {^Tkzinc_LIB_FILE=(.*)$} $line dummy libFile] } { - continue - } - if { [regexp {^Tkzincstub_LIB_FILE=(.*)$} $line dummy stubLibFile] } { - continue - } - } - close $fid set libFile "${package}${major}${minor}.dll" set stubLibFile "${package}stub${major}${minor}.dll" @@ -138,9 +139,24 @@ if { $todo eq "perl" || $todo eq "" } { } file mkdir $buildDir - foreach f {t Zinc.xs Zinc.pm Makefile.PL demos README Zinc} { + foreach f {t Zinc.xs demos README Zinc} { file copy -force [file join $root Perl $f] $buildDir } + # + # Add the version in Zinc.pm and Makefile.PL + foreach f {Zinc.pm Makefile.PL} { + set fid [open [file join $root Perl $f]] + set fod [open [file join $buildDir $f] w] + + while { ! [eof $fid] } { + set line [gets $fid] + regsub -all SEEexport2cpan $line [format "%d.%d%02d" $major $minor $patchlevel] line + puts $fod $line + } + + close $fid + close $fod + } foreach f [glob -nocomplain [file join $root generic *.c] [file join $root generic *.h] \ [file join $root win *.c] [file join $root debian changelog] \ [file join $root debian copyright]] { |