svn commit: smb-build r10 - in trunk: build/smb_build lib script
tridge at samba.org
tridge at samba.org
Wed Jul 13 06:59:52 GMT 2005
Author: tridge
Date: 2005-07-13 06:59:52 +0000 (Wed, 13 Jul 2005)
New Revision: 10
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=smb-build&rev=10
Log:
another attempt at a portable target dependent CFLAGS
this one looks for the most specific .cflags file in the target directory
so for lib/replace/replace.o it look for:
lib/replace/.cflags
lib/.cflags
and if it finds it, then it gets added to the compile command
Added:
trunk/lib/.cflags
trunk/script/cflags.sh
Modified:
trunk/build/smb_build/makefile.pm
Changeset:
Modified: trunk/build/smb_build/makefile.pm
===================================================================
--- trunk/build/smb_build/makefile.pm 2005-07-13 06:42:06 UTC (rev 9)
+++ trunk/build/smb_build/makefile.pm 2005-07-13 06:59:52 UTC (rev 10)
@@ -202,7 +202,7 @@
# $comment
.$src.$dst:
\@echo $message \$\*.$src
- \@\$(CC) \$(TARGET_CFLAGS) \$(\$\@_CFLAGS) \$(CFLAGS) $flags -c \$< -o \$\@
+ \$(CC) \$(TARGET_CFLAGS) \$(shell script/cflags.sh \$\@) \$(CFLAGS) $flags -c \$< -o \$\@
\@BROKEN_CC\@ -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@
__EOD__
Added: trunk/lib/.cflags
===================================================================
--- trunk/lib/.cflags 2005-07-13 06:42:06 UTC (rev 9)
+++ trunk/lib/.cflags 2005-07-13 06:59:52 UTC (rev 10)
@@ -0,0 +1 @@
+-Ifoo
Added: trunk/script/cflags.sh
===================================================================
--- trunk/script/cflags.sh 2005-07-13 06:42:06 UTC (rev 9)
+++ trunk/script/cflags.sh 2005-07-13 06:59:52 UTC (rev 10)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+TARGET=$1
+
+DIR=`dirname $TARGET`
+while [ "$DIR" != "." ]; do
+ if [ -r $DIR/.cflags ]; then
+ cat $DIR/.cflags
+ exit 0
+ fi
+ DIR=`dirname $DIR`
+done
+exit 0;
Property changes on: trunk/script/cflags.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the samba-cvs
mailing list