root/lang/objective-cplusplus/i3/trunk/unix/scripts/gnustep-config-filter.pl @ 39088

Revision 39088, 481 bytes (checked in by saturday06, 2 years ago)

asiodjfaklsdf

Line 
1# -*- coding: utf-8-unix -*-
2
3use strict;
4use warnings;
5
6my $debug = 0;
7if ($ARGV[0] =~ '--debug') {
8    shift;
9    $debug = 1;
10}
11
12open(INPUT, join(' ', @ARGV) . '|');
13while (<INPUT>) {
14    next if (/\]: /);
15    while (s/(\s|^)(-O\d?|-g\d?|-s)(\s|$)/ /) {} # debug/optimization options
16    while (s/(\s|^)-M(MD|P)(\s|$)/ /) {} # preprocessor options
17    if (!$debug) {
18        while (s/(\s|^)-D\s*(DEBUG|GSWARN|GSDIAGNOSE)(\s|$)/ /) {} # debug macros
19    }
20    print;
21    last;
22}
23
Note: See TracBrowser for help on using the browser.