Added mappings for a few messages.
[wine] / tools / winapi / make_filter
1 #! /usr/bin/perl -w
2
3 use strict;
4
5 BEGIN {
6     $0 =~ m%^(.*?/?tools)/winapi/make_filter$%;
7     require "$1/winapi/setup.pm";
8 }
9
10 use config qw(
11     &file_absolutize &file_normalize
12     $current_dir $wine_dir
13 );
14 use output qw($output);
15 use make_filter_options qw($options);
16
17 use make_parser qw($directory $tool $file $line $message);
18
19 if($options->progress) {
20     $output->enable_progress;
21 } else {
22     $output->disable_progress;
23 }
24
25 ########################################################################
26 # main
27 ########################################################################
28
29 my $command = $options->make . " " . join(" ", $options->arguments);
30 open(IN, "($command) 2>&1 |");
31
32 while(<IN>) {    
33     chomp;
34
35     if(!&make_parser::line($_)) {
36         next;
37     }
38
39     if($message) {
40         if($file && $line) {
41             if($directory && $directory ne "." && $file !~ m%^/%) {
42                 $output->write(&file_normalize("$directory/$file") . ":$line: $message\n");
43             } else {
44                 $output->write("$file:$line: $message\n");
45             }
46         } elsif($file) {
47             if($directory && $directory ne "." && $file !~ m%^/%) {
48                 $output->write(&file_normalize("$directory/$file") . ": $message\n");
49             } else {
50                 $output->write("$file: $message\n");
51             }
52         } else {
53             if($directory && $directory ne ".") {
54                 $output->write("$directory: $tool: $message\n");
55             } elsif($tool) {
56                 $output->write("$tool: $message\n");
57             } else {
58                 $output->write("$message\n");
59             }
60         }
61     } elsif($tool eq "make") {
62         if($directory && $directory ne ".") {
63             $output->progress("$directory: make");
64         }
65     }
66 }
67
68 close(IN);
69
70 $output->hide_progress();