26 February 2004 Radu Ursu

- replaced set_version_in_config with create_version_file
   in create_internal_release script.
  the script creates a new version.h file with every new release
This commit is contained in:
Radu Ursu 2004-02-26 07:18:14 +00:00
parent c170b4890f
commit b56eb12a1d
2 changed files with 28 additions and 17 deletions

View File

@ -1,3 +1,8 @@
26 February 2004 Radu Ursu
- replaced set_version_in_config with create_version_file
in create_internal_release script.
the script creates a new version.h file with every new release
30/01/2004 Sylvain Pion
- Remove cgal_submit

View File

@ -25,7 +25,7 @@ Exactly one of the options -h or -r must be present.
-l lockfile, default is releasedir/release_creation.lock
-p packagesfile, default is releasedir/include_in_release
The version number is stored in include/CGAL/config.h.
The version number is stored in include/CGAL/version.h.
The RELEASEDIR is the place where the new release will be created.
The ALLPACKAGESDIR is the directory that contains the checked out packages
from the CVS. Could be a taged version (<<current_submission>>) or some
@ -197,34 +197,40 @@ sub install_packages() {
unlink 'temppack.tar', 'description.txt', 'long_description.txt', 'changes.txt', 'submission_info', 'long_description.txt.old';
}
#-----------------------------------------------------------------------#
# set the version information in the include/CGAL/config.h include file.#
# set the version information in the include/CGAL/version.h #
#-----------------------------------------------------------------------#
sub set_version_in_config()
sub create_version_file()
{
chdir "$RELEASEDIR/$VERSION/include/CGAL" or die;
open(SOURCE_FILE, '<config.h') or die "Error opening config.h: $!";
open(TEMPFILE, ">tempfile") or die;
#if VERSION starts with CGAL-, we remove "CGAL-" from version
#the $newver variable will store the right version
if ($result = $VERSION =~ /CGAL-(.*)/){
$newver = $1;
$newver = $1;
} else {
$newver = $VERSION;
$newver = $VERSION;
}
while ( <SOURCE_FILE> ) {
s|^\s*\#\s*define\s+CGAL_VERSION\b.*$|#define CGAL_VERSION $newver|;
s|^\s*\#\s*define\s*CGAL_VERSION_NR\b.*$|#define CGAL_VERSION_NR $VERSION_NR|;
print TEMPFILE $_;
}
close SOURCE_FILE || die "Error closing config.h_with_dir: $!";
print TEMPFILE << 'EOF';
// This file is automatically created by create_internal_release.
// Do not edit manually.
#ifndef CGAL_VERSION_H
#define CGAL_VERSION_H
EOF
print TEMPFILE "#define CGAL_VERSION $newver\n";
print TEMPFILE "#define CGAL_VERSION_NR $VERSION_NR\n\n#endif\n";
close TEMPFILE || die "Error closing temporary file: $!\n";
# rename($TEMPFILE, 'config.h' );
system('mv', "tempfile", 'config.h');
# || warn "Could not update file config.h";
system('mv', "tempfile", 'version.h');
chdir '../..' or die;
}
sub make_src_makefiles(){
chdir "$RELEASEDIR/$VERSION" or die;
chdir 'src' or die;
@ -921,7 +927,7 @@ install_packages();
CreateConfigurationTestdir();
CreateDemoTestDirs();
CreateExampleTestDirs();
set_version_in_config();
create_version_file();
make_testscripts();
set_file_headers();
make_src_makefiles();