summaryrefslogtreecommitdiff
path: root/source4/script/cflags.pl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script/cflags.pl')
-rwxr-xr-xsource4/script/cflags.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/script/cflags.pl b/source4/script/cflags.pl
new file mode 100755
index 0000000000..6dfaa83c0b
--- /dev/null
+++ b/source4/script/cflags.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+# This is a hack to allow per target cflags. It isn't very elegant, but it
+# is the most portable idea we have come up with yet
+# tridge@samba.org, July 2005
+# jelmer@samba.org, March 2006
+use strict;
+use warnings;
+
+my $target = shift;
+
+sub check_flags($)
+{
+ my ($name)=@_;
+ open (IN, "extra_cflags.txt");
+ while (<IN> =~ /^([^:]+): (.*)$/) {
+ next unless ($1 eq $target);
+ print "$2 ";
+ }
+ close(IN);
+ print "\n";
+}
+
+check_flags($target);
+
+exit 0;