1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/script/cflags.sh
Andrew Tridgell dd0816dcc8 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 b2f9b8aa32)
2007-10-10 13:23:00 -05:00

29 lines
459 B
Bash
Executable File

#!/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;