#!/usr/local/bin/perl -w # This script applies the new_headers_v2 script to all packages. # # - It must be run from inside a "All" working copy. # - The "new_headers_v2" script must be in $PATH. # - This file must be checkout from CVS with the "-kk" option to prevent # expansion of the flags... (it's not that a big deal anyway) # Strangely, to run the script, I need to copy both in All/, and have "." in my # $PATH, otherwise some old version of new_headers_v2 is selected (don't know # why) use strict; use Cwd; #use File::Copy; #use File::Basename; #use File::Find; #use Getopt::Std; my %packages=( "Cartesian_kernel" => "", "Circulator" => "", "Configuration" => "", "Distance_2" => "", "Distance_3" => "", "Fixed_precision_nt" => "", "Generator" => "", "Geomview" => "", "H2" => "", "H3" => "", "HalfedgeDS" => "", "Hash_map" => "", "Installation" => "", "Intersections_2" => "", "Intersections_3" => "", "Interval_arithmetic" => "", "Inventor" => "", "Kernel_23" => "", "Kernel_d" => "", "LEDA" => "", "Modifier" => "", "Number_types" => "", "Polygon" => "", "Qt_widget" => "", "Random_numbers" => "", "STL_Extension" => "", "Scripts" => "", "Stream_support" => "", "Timer" => "", "Union_find" => "", "iostream" => "", "window" => "", "wininst" => "", # Plus the following : "Optimisation_basic" => "", "PS_Stream" => "", # Should this be LGPL + INRIA only ? "Viewer_3" => "" # idem ); sub main() { my $package; foreach $package (sort (keys %packages)) { if (!-d $package) { warn $package." IS NOT A DIRECTORY\n"; next; } print "Going on with : $package : "; my @license_opts; if ($packages{$package}) { @license_opts=("-q", $packages{$package}); # QPL } print "License opts : @license_opts\n"; my $regexp="$package/include/CGAL/*.[hC]"; $regexp.=" $package/include/CGAL/*/*.[hC]"; $regexp.=" $package/include/CGAL/*/*/*.[hC]"; $regexp.=" $package/include/CGAL/*/*/*/*.[hC]"; $regexp.=" $package/include/CGAL/*/*/*/*/*.[hC]"; $regexp.=" $package/include/CGAL/*/*/*/*/*/*.[hC]"; $regexp.=" $package/src/*.[hC]"; $regexp.=" $package/src/*/*.[hC]"; $regexp.=" $package/src/*/*/*.[hC]"; $regexp.=" $package/src/*/*/*/*.[hC]"; $regexp.=" $package/config/testfiles/*.[hC]"; my @files = glob($regexp); # print "acting on : @files\n"; my @args=("new_headers_v2", @license_opts, @files); system(@args) == 0 or die "system @args failed: $?"; # Then cgal_submit the package. } } main;