+
+sub usage($) {
+ my $ret;
+ print "USAGE: $progname [--root=part/to/cut] [--outdir=where/to/generate/files] infile [infile+]\n\n";
+ print "This program is in charge of extracting the unit tests out of the SimGrid source code.\n";
+ print "See http://simgrid.gforge.inria.fr/doc/latest/inside_tests.html for more details.\n";
+ exit $ret;
+}
+
+my $outdir=undef;
+my $root;
+my $help;
+
+Getopt::Long::config('permute','no_getopt_compat', 'no_auto_abbrev');
+GetOptions(
+ 'help|h' => sub {usage(0)},
+ 'root=s' =>\$root,
+ 'outdir=s' =>\$outdir) or usage(1);
+
+usage(1) if (scalar @ARGV == 0);