Avoid list corruption when linking window with HWND_BOTTOM (thanks to
[wine/multimedia.git] / tools / winapi / make_filter
blob4cbd1f39c91725282493e9de75984fc3db690b90
1 #! /usr/bin/perl -w
3 use strict;
5 BEGIN {
6 $0 =~ m%^(.*?/?tools)/winapi/make_filter$%;
7 require "$1/winapi/setup.pm";
10 use config qw(
11 &file_absolutize &file_normalize
12 $current_dir $wine_dir
14 use output qw($output);
15 use make_filter_options qw($options);
17 use make_parser qw($directory $tool $file $line $message);
19 if($options->progress) {
20 $output->enable_progress;
21 } else {
22 $output->disable_progress;
25 ########################################################################
26 # main
27 ########################################################################
29 my $command = $options->make . " " . join(" ", $options->arguments);
30 open(IN, "($command) 2>&1 |");
32 while(<IN>) {
33 chomp;
35 if(!&make_parser::line($_)) {
36 next;
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");
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");
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");
61 } elsif($tool eq "make") {
62 if($directory && $directory ne ".") {
63 $output->progress("$directory: make");
68 close(IN);
70 $output->hide_progress();