From dd0816dcc8482829009928e5d0dc95ec0621e833 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2005 09:44:55 +0000 Subject: 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) --- source4/script/cflags.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 source4/script/cflags.sh (limited to 'source4/script') 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; -- cgit