summaryrefslogtreecommitdiff
path: root/source4/script/cflags.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-06 15:34:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:18 -0500
commitf6457b3d5408d5afe9a4de96d7623f1aa9ec39c4 (patch)
treedaa5b29b3c2eececc2cfd83e79fce2640b81d3b4 /source4/script/cflags.pl
parent354a61fc915da99a16732337b62920909a591b58 (diff)
downloadsamba-f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4.tar.gz
samba-f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4.tar.bz2
samba-f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4.zip
r13867: Wrap the cflags.sh hack in the build system. You can now simply
set subsystem-specific compiler flags in the .mk files. (This used to be commit d512b147e8dda39016faf74a50a9d85bfc23a2eb)
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;