diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-13 09:44:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:23:00 -0500 |
commit | dd0816dcc8482829009928e5d0dc95ec0621e833 (patch) | |
tree | 4b407628214d96d9c6f29e518519a261ac54ffd3 /source4/script | |
parent | bca5b59fdf1512f3acc73cacf11d1d0ba1e34f53 (diff) | |
download | samba-dd0816dcc8482829009928e5d0dc95ec0621e833.tar.gz samba-dd0816dcc8482829009928e5d0dc95ec0621e833.tar.bz2 samba-dd0816dcc8482829009928e5d0dc95ec0621e833.zip |
r8416: added the extra_cflags.txt system from smb-build
this removes the need for recursive make for heimdal, which is a big
win. It should also make it easier/cleaner to build ldb/tdb/appweb etc
in both in-tree and out-of-tree forms by allowing us to specify
different CFLAGS (and thus different include paths) per directory or
file
(This used to be commit b2f9b8aa32426198aa21a703ab4f1d59fb77e512)
Diffstat (limited to 'source4/script')
-rwxr-xr-x | source4/script/cflags.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/source4/script/cflags.sh b/source4/script/cflags.sh new file mode 100755 index 0000000000..b2ee8b3761 --- /dev/null +++ b/source4/script/cflags.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# 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 + +TARGET=$1 + +check_flags() +{ + NAME=$1 + ( + while read tag flags; do + if [ "$tag" = "$NAME" ]; then + echo "$flags" + exit 0; + fi + done + ) < extra_cflags.txt +} + + +NAME=$TARGET +while [ "$NAME" != "." ]; do + check_flags "$NAME" + NAME=`dirname $NAME` +done +exit 0; |