svn commit: samba r7310 - in
branches/SAMBA_4_0/source/build/smb_build: .
jelmer at samba.org
jelmer at samba.org
Sun Jun 5 22:30:20 GMT 2005
Author: jelmer
Date: 2005-06-05 22:30:20 +0000 (Sun, 05 Jun 2005)
New Revision: 7310
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7310
Log:
Support TARGET_CFLAGS thru recursive make
Modified:
branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
branches/SAMBA_4_0/source/build/smb_build/makefile.pm
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-06-05 22:13:27 UTC (rev 7309)
+++ branches/SAMBA_4_0/source/build/smb_build/config_mk.pm 2005-06-05 22:30:20 UTC (rev 7310)
@@ -24,7 +24,7 @@
"MINOR_VERSION" => "string",
"RELEASE_VERSION" => "string",
"ENABLE" => "bool",
- "TARGET_CFLAGS" => "string"
+ "TARGET_CFLAGS" => "list"
);
###########################################################
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-06-05 22:13:27 UTC (rev 7309)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-06-05 22:30:20 UTC (rev 7310)
@@ -97,20 +97,6 @@
__EOD__
}
-
-#############################
-# return makefile fragment for
-# target specific rules
-sub add_target_flags($$)
-{
- my $ctx = shift;
- my $name = shift;
-
- return "" unless ($ctx->{TARGET_CFLAGS});
- return "$name: TARGET_CFLAGS = $ctx->{TARGET_CFLAGS}\n";
-}
-
-
sub _prepare_default_rule($)
{
my $ctx = shift;
@@ -367,8 +353,6 @@
__EOD__
-$output .= add_target_flags($ctx, "library_" . $ctx->{NAME});
-
return $output;
}
@@ -376,9 +360,19 @@
{
my $ctx = shift;
my $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
- return "
-$ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST = $tmpdepend\n
-$ctx->{TYPE}_$ctx->{NAME}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJS) \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST)\n";
+ my $output;
+
+ $output = "$ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST = $tmpdepend\n";
+
+ $output .= "$ctx->{TYPE}_$ctx->{NAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST)";
+
+ if (defined ($ctx->{TARGET_CFLAGS})) {
+ $output .= "\n\t@\$(MAKE) \$($ctx->{TYPE}_$ctx->{NAME}_OBJS) TARGET_CFLAGS=\"" . join(' ', @{$ctx->{TARGET_CFLAGS}}) . "\"\n";
+ } else {
+ $output .=" \$($ctx->{TYPE}_$ctx->{NAME}_OBJS)\n";
+ }
+
+ return $output;
}
###########################################################
@@ -428,8 +422,6 @@
__EOD__
-$output .= add_target_flags($ctx, "library_" . $ctx->{NAME});
-
return $output;
}
@@ -477,8 +469,6 @@
__EOD__
-$output .= add_target_flags($ctx, "binary_" . $ctx->{BINARY});
-
return $output;
}
More information about the samba-cvs
mailing list