summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/config_mk.pm3
-rw-r--r--source4/build/smb_build/input.pm13
-rw-r--r--source4/build/smb_build/makefile.pm8
3 files changed, 23 insertions, 1 deletions
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index d298fe68ee..2df5df94f2 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -24,7 +24,8 @@ my %attribute_types = (
"MINOR_VERSION" => "string",
"RELEASE_VERSION" => "string",
"ENABLE" => "bool",
- "TARGET_CFLAGS" => "list"
+ "TARGET_CFLAGS" => "list",
+ "CMD" => "string"
);
###########################################################
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index e8d98d060b..aeab3cb8a6 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -116,6 +116,18 @@ sub check_library($$)
$lib->{OUTPUT_TYPE} = "SHARED_LIBRARY";
}
+sub check_target($$)
+{
+ my $INPUT = shift;
+ my $bin = shift;
+
+ if (!defined($bin->{CMD})) {
+ print "CMD not defined for target!\n";
+ }
+
+ $bin->{OUTPUT_TYPE} = "CUSTOM";
+}
+
sub check_binary($$)
{
my $INPUT = shift;
@@ -173,6 +185,7 @@ sub check($)
check_module($INPUT, $part) if ($part->{TYPE} eq "MODULE");
check_library($INPUT, $part) if ($part->{TYPE} eq "LIBRARY");
check_binary($INPUT, $part) if ($part->{TYPE} eq "BINARY");
+ check_target($INPUT, $part) if ($part->{TYPE} eq "TARGET");
#FIXME: REQUIRED_LIBRARIES needs to go
if (defined($part->{REQUIRED_LIBRARIES})) {
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index c1f952f508..ca0f7e6bd0 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -472,6 +472,12 @@ __EOD__
return $output;
}
+sub _prepare_custom_rule($)
+{
+ my $ctx = shift;
+ return "$ctx->{NAME}:\n\t$ctx->{CMD}\n";
+}
+
sub _prepare_proto_rules()
{
my $output = "";
@@ -702,10 +708,12 @@ sub _prepare_rule_lists($)
foreach my $key (values %{$depend}) {
next if not defined $key->{OUTPUT_TYPE};
+
($output .= _prepare_objlist_rule($key)) if $key->{OUTPUT_TYPE} eq "OBJLIST";
($output .= _prepare_static_library_rule($key)) if $key->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
($output .= _prepare_shared_library_rule($key)) if $key->{OUTPUT_TYPE} eq "SHARED_LIBRARY";
($output .= _prepare_binary_rule($key)) if $key->{OUTPUT_TYPE} eq "BINARY";
+ ($output .= _prepare_custom_rule($key) ) if $key->{TYPE} eq "TARGET";
}
my $idl_ctx;