r18296: this isn't needed anymore
[ira/wip.git] / source / script / cflags.pl
1 #!/usr/bin/env perl
2
3 # This is a hack to allow per target cflags. It isn't very elegant, but it
4 # is the most portable idea we have come up with yet
5 # tridge@samba.org, July 2005
6 # jelmer@samba.org, March 2006
7 use strict;
8
9 my $target = shift;
10
11 sub check_flags($)
12 {
13         my ($name)=@_;
14         open (IN, "extra_cflags.txt");
15         while (<IN> =~ /^([^:]+): (.*)$/) {
16                 next unless (grep(/^$target$/, (split / /, $1)));
17                 $_ = $2;
18                 s/^CFLAGS\+=//;
19                 print "$_ ";
20         }
21         close(IN);
22         print "\n";
23 }
24
25 check_flags($target);
26
27 exit 0;