cryptnet: Test CertDllVerifyRevocation.
[wine] / tools / winapi / make_filter
1 #! /usr/bin/perl -w
2 #
3 # Copyright 1999, 2000, 2001 Patrik Stridvall
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9 #
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #
19
20 use strict;
21
22 BEGIN {
23     $0 =~ m%^(.*?/?tools)/winapi/make_filter$%;
24     require "$1/winapi/setup.pm";
25 }
26
27 use config qw(
28     file_absolutize file_normalize
29     $current_dir $wine_dir
30 );
31 use output qw($output);
32 use make_filter_options qw($options);
33
34 use make_parser qw($directory $tool $file $line $message);
35
36 if($options->progress) {
37     $output->enable_progress;
38 } else {
39     $output->disable_progress;
40 }
41
42 ########################################################################
43 # main
44 ########################################################################
45
46 my $command = $options->make . " " . join(" ", $options->arguments);
47 open(IN, "($command) 2>&1 |") || die "Cannot execute command $command: $!";
48
49 while(<IN>) {
50     chomp;
51
52     if(!make_parser::line($_)) {
53         next;
54     }
55
56     if($message) {
57         if($file && $line) {
58             if($directory && $directory ne "." && $file !~ m%^/%) {
59                 $output->write(file_normalize("$directory/$file") . ":$line: $message\n");
60             } else {
61                 $output->write("$file:$line: $message\n");
62             }
63         } elsif($file) {
64             if($directory && $directory ne "." && $file !~ m%^/%) {
65                 $output->write(file_normalize("$directory/$file") . ": $message\n");
66             } else {
67                 $output->write("$file: $message\n");
68             }
69         } else {
70             if($directory && $directory ne ".") {
71                 $output->write("$directory: $tool: $message\n");
72             } elsif($tool) {
73                 $output->write("$tool: $message\n");
74             } else {
75                 $output->write("$message\n");
76             }
77         }
78     } elsif($tool eq "make") {
79         if($directory && $directory ne ".") {
80             $output->progress("$directory: make");
81         }
82     }
83 }
84
85 close(IN);
86
87 $output->hide_progress();