mirror of https://github.com/CGAL/cgal
151 lines
4.8 KiB
Perl
Executable File
151 lines
4.8 KiB
Perl
Executable File
#!/usr/local/bin/perl -w
|
|
|
|
# This script applies the new_headers script to all packages.
|
|
#
|
|
# - It must be run from inside a "All" working copy.
|
|
# - The "new_headers" 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 is selected (don't know why)
|
|
|
|
# Currently still not passing "grep 'CGAL Consortium'" :
|
|
# grep 'CGAL Consortium' */include/CGAL/*.[hC] */include/CGAL/*/*.[hC] */include/CGAL/*/*/*.[hC] */src/*.[hC] */src/*/*.[hC] | cut -d'/' -f1 | sort | uniq
|
|
#
|
|
# The following are probably not part of CGAL 3.0, so don't bother.
|
|
# - Segment_Voronoi_diagram_2 -> asked Menelaos
|
|
# - Coin -> asked Andreas et Mariette
|
|
# - GeoWin -> asked Mariette and Matthias
|
|
|
|
use strict;
|
|
use Cwd;
|
|
#use File::Copy;
|
|
#use File::Basename;
|
|
#use File::Find;
|
|
#use Getopt::Std;
|
|
|
|
my %packages=(
|
|
"Alpha_shapes_2" => "INRIA",
|
|
"Alpha_shapes_3" => "INRIA",
|
|
"Apollonius_graph_2" => "INRIA",
|
|
"Arrangement" => "TAU",
|
|
"Benchmark" => "TAU",
|
|
"Cartesian_kernel" => "",
|
|
"Circulator" => "",
|
|
"Configuration" => "",
|
|
"Convex_hull_2" => "MPI",
|
|
"Convex_hull_3" => "MPI",
|
|
"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" => "",
|
|
"Largest_empty_rect_2" => "TAU",
|
|
"Map_overlay_2" => "TAU",
|
|
"Matrix_search" => "ETHZ",
|
|
"Min_annulus_d" => "ETHZ",
|
|
"Min_circle_2" => "FUB",
|
|
"Min_ellipse_2" => "FUB",
|
|
"Min_quadrilateral_2" => "ETHZ",
|
|
"Min_sphere_d" => "ETHZ",
|
|
"Min_sphere_d_new" => "ETHZ",
|
|
"Min_sphere_of_spheres_d" => "ETHZ",
|
|
"Modifier" => "",
|
|
"Nef_2" => "MPI",
|
|
"Number_types" => "",
|
|
"Partition_2" => "MPI",
|
|
"Planar_map" => "TAU",
|
|
"Point_set_2" => "HW",
|
|
"Polygon" => "",
|
|
"Polyhedron" => "ETHZ",
|
|
"Polyhedron_IO" => "ETHZ",
|
|
"Polytope_distance_d" => "ETHZ",
|
|
"Qt_widget" => "",
|
|
"Random_numbers" => "",
|
|
"Robustness" => "MPI",
|
|
"STL_Extension" => "",
|
|
"Scripts" => "",
|
|
"SearchStructures" => "ETHZ",
|
|
"Spatial_searching" => "UU",
|
|
"Stream_support" => "",
|
|
"Sweep_line_2" => "TAU",
|
|
"Timer" => "",
|
|
"Trapezoidal_decomposition" => "TAU",
|
|
"Triangulation_2" => "INRIA",
|
|
"Triangulation_3" => "INRIA",
|
|
"Union_find" => "",
|
|
"Width_3" => "ETHZ",
|
|
"_QP_solver" => "ETHZ",
|
|
"cgal_window" => "HW",
|
|
"iostream" => "",
|
|
"kdtree" => "TAU",
|
|
"window" => "",
|
|
"wininst" => "",
|
|
|
|
# Plus the following :
|
|
"Optimisation_basic" => "",
|
|
"ExternalMemoryStructures" => "ETHZ",
|
|
"Snap_rounding_2" => "TAU",
|
|
"PS_Stream" => "", # Should this be LGPL + INRIA only ?
|
|
"Viewer_3" => "", # idem
|
|
"Nef_3" => "MPI",
|
|
"Nef_S2" => "MPI"
|
|
|
|
);
|
|
|
|
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]";
|
|
|
|
my @files = glob($regexp);
|
|
# print "acting on : @files\n";
|
|
|
|
my @args=("new_headers", @license_opts, @files);
|
|
system(@args) == 0
|
|
or die "system @args failed: $?";
|
|
|
|
# Then cgal_submit the package.
|
|
}
|
|
}
|
|
|
|
main;
|
|
|