#!/sw/bin/perl5 -w my ($major,$minor) = (0,0); #my $release_date_option = "-d '2000, January 11'"; my $release_date_option = ""; my $explanation=<<'EOF'; What to do to make a public release Take the latest internal release. Unpack it and go to its main directory. Make sure that the script 'make_public_header' is executable from here. Alter the second line above, such that the major and minor release number are ok. Run this script. This does the following: Remove the test directory. Remove developer_scripts dir Remove doc_tex dir Find all .C and .h files and collect them in a file Run the script 'make_public_header' to update the headers of all files. Edit include/CGAL/config.h #define CGAL_VERSION ... #define CGAL_VERSION_NR ... The rest is done manually still. Add README file. Rename the current directory to CGAL-x.y. Do find CGAL-x.y -exec touch 01221530 {} \; in order to touch all files (Here the date/time Jan 22, 15:30 was used as an example) Make CGAL-x.y.tar.gz with tar and gzip and CGAL-x.y.zip with zip. The documentation goes separately from the rest, except for the installation manual. EOF die if $major >= 1000; die if $major < 1; die if $minor >= 1000; die if $minor < 0; die "Quitting: No include/CGAL directory under current directory\n" if (! -d 'include/CGAL' ); system ("rm -rf test"); system ("rm -rf developer_scripts"); system ("rm -rf doc_tex"); system("find . -name '*.[hC]' -print > filenames"); system("make_public_header -v CGAL-$major.$minor -f filenames $release_date_option"); unlink 'filenames'; my $version_nr = sprintf "1%03d%03d100",$major,$minor; my $config_file = 'include/CGAL/config.h'; die if ! -r $config_file; open TMPFILE, ">tmp_config$$"; open CONFIGFILE, "$config_file"; while () { if (/\s*#define\s+CGAL_VERSION\s/) { print TMPFILE "#define CGAL_VERSION ${major}.${minor}\n"; } elsif (/\s*#define\s+CGAL_VERSION_NR\s/) { print TMPFILE "#define CGAL_VERSION_NR $version_nr\n"; } else { print TMPFILE $_; } } close CONFIGFILE; close TMPFILE; rename "tmp_config$$", "$config_file"; #print $explanation;