7 print "Relative path: $svnRelPath\n" ;
\r
9 if ( $svnRelPath =~ /trunk/ ) {
\r
13 $upToRoot = '..\\..' ;
\r
15 # my $upToRoot = $svnRelPath ;
\r
16 # $upToRoot =~ s/([^\/]+)/../g ;
\r
17 # $upToRoot = "../$upToRoot" ;
\r
18 print "upToRoot: $upToRoot\n" ;
\r
21 print "Version $version\n" ;
\r
23 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
\r
26 my $distrPath = "cds-distrib/cds-$version" ;
\r
27 my $relDistrPath = "$upToRoot/$distrPath" ;
\r
29 print "export SVN...\n" ;
\r
32 my $nTabsFound = 0 ;
\r
34 print "make copyright...\n" ;
\r
36 patchFile("$relDistrPath/build/Makefile", 'VERSION=\d+\.\d+\.\d+', "VERSION=$version" ) ;
\r
37 patchFile("$relDistrPath/doxygen/cds.doxy", 'PROJECT_NUMBER\s*=\s*\d+\.\d+\.\d+', "PROJECT_NUMBER = $version" ) ;
\r
38 patchFile("$relDistrPath/projects/Win/vc2008/cds.2008.vcproj", 'CDS_USE_VLD', 'xCDS_USE_VLD' ) ;
\r
39 patchFile("$relDistrPath/projects/Win/vc2008/unit.2008.vcproj", 'CDS_USE_VLD', 'xCDS_USE_VLD' ) ;
\r
40 patchFile("$relDistrPath/projects/android/jni/Android.mk", 'CDS_LIBRARY_VERSION\s*:=\s*\d+\.\d+\.\d+',
\r
41 "CDS_LIBRARY_VERSION := $version" );
\r
43 print "Tabs found: $nTabsFound\n" ;
\r
45 print "make docs...\n" ;
\r
46 `cd $relDistrPath && make_docs.bat` ;
\r
47 `rm -f $relDistrPath/make_distrib.pl` ;
\r
48 `rm -fr $relDistrPath/scripts` ;
\r
49 `rm -f $relDistrPath/doxygen/doxygen.log` ;
\r
51 print "make zip...\n" ;
\r
52 `rm -f $relDistrPath/../cds-$version.zip` ;
\r
53 `cd $relDistrPath/.. && 7za a cds-$version.zip cds-$version` ;
\r
61 open( my $fh, 'cds/version.h' ) or die "ERROR: Cannot find cds/version.h file";
\r
65 if ( /CDS_VERSION_STRING.+(\d+\.\d+\.\d+)/ ) {
\r
71 die "ERROR: cannot find version in cds/version.h" unless $version ;
\r
76 my $svn = `svn info` ;
\r
77 ($svnRelPath) = $svn =~ /Working\sCopy\sRoot\sPath:\s+(.+)/ ;
\r
79 # my ($curDir) = $svn =~ /URL:\s+(.+)/ ;
\r
80 # my ($rootDir) = $svn =~ /Repository\s+Root:\s+(.+)/ ;
\r
81 # $rootDir =~ s/\+/\\\+/g ;
\r
83 # ($svnRelPath) = $curDir =~ /$rootDir\/(.+)/ ;
\r
88 `cd $upToRoot && rm -fr $distrPath && svn export $svnRelPath $distrPath` ;
\r
91 sub makeCopyright()
\r
93 processDir( "$relDistrPath/cds" ) ;
\r
94 processDir( "$relDistrPath/src" ) ;
\r
95 processDir( "$relDistrPath/tests/test-hdr" ) ;
\r
96 processDir( "$relDistrPath/tests/unit" ) ;
\r
97 processDir( "$relDistrPath/tests/cppunit" ) ;
\r
100 sub processDir( $ )
\r
102 my $dirName = shift ;
\r
104 opendir(my $dh, $dirName) || die "can't opendir $dirName: $!";
\r
105 my @files = grep { /^[^\.]/ } readdir($dh);
\r
108 foreach my $file ( @files ) {
\r
109 if ( -d "$dirName/$file" ) {
\r
110 processDir("$dirName/$file") ;
\r
112 elsif ( $file =~ /\.(h|cpp)$/ ) {
\r
113 processFile( "$dirName/$file" ) ;
\r
118 sub processFile( $ )
\r
123 if ( open( my $fh, $file )) {
\r
127 if ( /^\/\/\$\$CDS-header\$\$/ ) {
\r
130 This file is a part of libcds - Concurrent Data Structures library
\r
131 See http://libcds.sourceforge.net/
\r
133 (C) Copyright Maxim Khiszinsky (libcds.sf\@gmail.com) 2006-$year
\r
134 Distributed under the BSD license (see accompanying file license.txt)
\r
139 elsif ( /^\/\/\$\$CDS-\/\*\$\$/ ) {
\r
142 elsif ( /^\/\/\$\$CDS-\*\/\$\$/ ) {
\r
146 $nTabsFound += $_ =~ s/\t/ /g;
\r
155 if ( open( my $fh, ">$file" )) {
\r
168 if ( open( my $fh, $file )) {
\r
172 $str .= $_ while <$fh> ;
\r
175 $str =~ s/$seek/$repl/g ;
\r
177 if ( open( my $fh, ">$file" )) {
\r