Commit | Line | Data |
---|---|---|
90aeb998 C |
1 | # Copyright 2010, INRIA, University of Copenhagen |
2 | # Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix | |
3 | # Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen | |
9f8e26f4 C |
4 | # Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix |
5 | # This file is part of Coccinelle. | |
6 | # | |
7 | # Coccinelle is free software: you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License as published by | |
9 | # the Free Software Foundation, according to version 2 of the License. | |
10 | # | |
11 | # Coccinelle is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with Coccinelle. If not, see <http://www.gnu.org/licenses/>. | |
18 | # | |
19 | # The authors reserve the right to distribute this or future versions of | |
20 | # Coccinelle under other licenses. | |
21 | ||
22 | ||
34e49164 C |
23 | #!/usr/bin/perl |
24 | ||
25 | #usage: | |
26 | ||
27 | if(@ARGV < 1) { die "usage: stat_directories_complete.pl [M|C|B]";} | |
28 | my $kind = "$ARGV[0]"; | |
29 | ||
30 | ||
31 | my $subdirs = `make subdirs`; | |
32 | #my $subdirs = "rule9"; | |
33 | #my $subdirs = "rule1"; | |
34 | chomp $subdirs; | |
35 | @subdirs = split /\s+/, $subdirs; | |
36 | ||
37 | ||
38 | my $i = 0; | |
39 | foreach my $dir (@subdirs) { | |
40 | if(-e "$dir/") { | |
41 | #print "RULE: $dir\n"; | |
42 | ||
43 | my ($s) = | |
44 | `cd $dir; ~/coccinelle/scripts/stat_directory_complete.pl | grep $kind:`; | |
45 | chomp $s; | |
46 | $i++; | |
47 | #print "M$i.$s\n"; | |
48 | $s =~ s/$kind:/$kind$i./; | |
49 | print "$s\n"; | |
50 | } | |
51 | ||
52 | } |