svn commit: samba r8416 - in branches/SAMBA_4_0/source: .
build/smb_build heimdal_build script
tridge at samba.org
tridge at samba.org
Wed Jul 13 09:44:55 GMT 2005
Author: tridge
Date: 2005-07-13 09:44:55 +0000 (Wed, 13 Jul 2005)
New Revision: 8416
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8416
Log:
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
Added:
branches/SAMBA_4_0/source/extra_cflags.txt
branches/SAMBA_4_0/source/script/cflags.sh
Modified:
branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
branches/SAMBA_4_0/source/build/smb_build/makefile.pm
branches/SAMBA_4_0/source/heimdal_build/config.mk
Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/config_mk.pm 2005-07-13 06:08:35 UTC (rev 8415)
+++ branches/SAMBA_4_0/source/build/smb_build/config_mk.pm 2005-07-13 09:44:55 UTC (rev 8416)
@@ -24,7 +24,6 @@
"MINOR_VERSION" => "string",
"RELEASE_VERSION" => "string",
"ENABLE" => "bool",
- "TARGET_CFLAGS" => "list",
"CMD" => "string",
"MANPAGE" => "string"
);
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-07-13 06:08:35 UTC (rev 8415)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-07-13 09:44:55 UTC (rev 8416)
@@ -234,7 +234,7 @@
# $comment
.$src.$dst:
\@echo $message \$\*.$src
- \@\$(CC) \$(TARGET_CFLAGS) \$(CFLAGS) $flags -c \$< -o \$\@
+ \@\$(CC) `script/cflags.sh \$\@` \$(CFLAGS) $flags -c \$< -o \$\@
\@BROKEN_CC\@ -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@
__EOD__
@@ -402,10 +402,6 @@
$output .= "$ctx->{TARGET}: ";
- if (defined ($ctx->{TARGET_CFLAGS})) {
- $output .= "\n\t@\$(MAKE) TARGET_CFLAGS=\"" . join(' ', @{$ctx->{TARGET_CFLAGS}}) . "\" ";
- }
-
$output .= "\$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJS)\n";
$output .= "\t\@touch $ctx->{TARGET}\n";
Added: branches/SAMBA_4_0/source/extra_cflags.txt
===================================================================
--- branches/SAMBA_4_0/source/extra_cflags.txt 2005-07-13 06:08:35 UTC (rev 8415)
+++ branches/SAMBA_4_0/source/extra_cflags.txt 2005-07-13 09:44:55 UTC (rev 8416)
@@ -0,0 +1 @@
+heimdal -Iheimdal_build -Iheimdal/kdc -Iheimdal/lib/des -Iheimdal/lib/roken -Iheimdal/include
Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===================================================================
--- branches/SAMBA_4_0/source/heimdal_build/config.mk 2005-07-13 06:08:35 UTC (rev 8415)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk 2005-07-13 09:44:55 UTC (rev 8416)
@@ -1,7 +1,6 @@
#######################
# Start SUBSYSTEM HEIMDAL_KDC
[SUBSYSTEM::HEIMDAL_KDC]
-TARGET_CFLAGS = -Iheimdal_build -Iheimdal/kdc -Iheimdal/lib/des -Iheimdal/lib/roken -Iheimdal/include
ADD_OBJ_FILES = \
heimdal/kdc/default_config.o \
heimdal/kdc/kerberos5.o \
@@ -19,7 +18,6 @@
#######################
# Start SUBSYSTEM HEIMDAL_HDB
[SUBSYSTEM::HEIMDAL_HDB]
-TARGET_CFLAGS = -Iheimdal_build -Iheimdal/kdc -Iheimdal/lib/des -Iheimdal/lib/roken -Iheimdal/include
ADD_OBJ_FILES = \
heimdal/lib/hdb/db.o \
heimdal/lib/hdb/hdb.o \
@@ -327,7 +325,6 @@
heimdal/lib/roken/setprogname.o \
heimdal/lib/asn1/symbol.o
REQUIRED_SUBSYSTEMS = HEIMDAL_ROKEN
-TARGET_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
NOPROTO = YES
# End SUBSYSTEM ASN1_COMPILER
#######################
@@ -353,7 +350,6 @@
heimdal/lib/roken/strupr.o \
heimdal/lib/roken/print_version.o \
heimdal/lib/roken/setprogname.o
-TARGET_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
NOPROTO = YES
# End SUBSYSTEM COMPILE_ET
#######################
@@ -379,7 +375,6 @@
# Start SUBSYSTEM HEIMDAL
[SUBSYSTEM::HEIMDAL]
NOPROTO = YES
-TARGET_CFLAGS = -Iheimdal_build -Iheimdal/kdc -Iheimdal/lib/des -Iheimdal/lib/roken -Iheimdal/include
REQUIRED_SUBSYSTEMS = \
HEIMDAL_GSSAPI HEIMDAL_KRB5 \
HEIMDAL_ASN1 HEIMDAL_DES HEIMDAL_ROKEN HEIMDAL_COM_ERR HEIMDAL_GLUE
Added: branches/SAMBA_4_0/source/script/cflags.sh
===================================================================
--- branches/SAMBA_4_0/source/script/cflags.sh 2005-07-13 06:08:35 UTC (rev 8415)
+++ branches/SAMBA_4_0/source/script/cflags.sh 2005-07-13 09:44:55 UTC (rev 8416)
@@ -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 at 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;
Property changes on: branches/SAMBA_4_0/source/script/cflags.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the samba-cvs
mailing list