From 18a1d6862f8f8f52cbd4bd16756ab5ebb81503e7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 19 Jun 2005 23:05:43 +0000 Subject: r7766: Treat NOPROTO as boolean. Don't consider ALL_OBJS as a standard subsystem. (This used to be commit 6b9a12249f152e9c4635d4f6c7f3a1b885c78ec6) --- source4/build/smb_build/config_mk.pm | 2 +- source4/build/smb_build/output.pm | 29 ++++++++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 2df5df94f2..12d62437e3 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -12,7 +12,7 @@ use smb_build::input; use strict; my %attribute_types = ( - "NOPROTO" => "string", + "NOPROTO" => "bool", "REQUIRED_SUBSYSTEMS" => "list", "OUTPUT_TYPE" => "string", "INIT_OBJ_FILES" => "list", diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index f156f7945b..b863d7e8dc 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -66,15 +66,23 @@ sub create_output($) my $depend = shift; my $part; - $depend->{PROTO}{OUTPUT_TYPE} = "OBJLIST"; - $depend->{PROTO}{TYPE} = "PROTO"; - $depend->{PROTO}{NAME} = "PROTO"; - - $depend->{ALL_OBJS}{OUTPUT_TYPE} = "OBJLIST"; - $depend->{ALL_OBJS}{TYPE} = ""; - $depend->{ALL_OBJS}{NAME} = "ALL_OBJS"; + $depend->{PROTO} = { + OUTPUT_TYPE => "OBJLIST", + TYPE => "PROTO", + NAME => "PROTO", + OBJ_LIST => [] + }; + + $depend->{ALL_OBJS} = { + OUTPUT_TYPE => "OBJLIST", + TYPE => "", + NAME => "ALL_OBJS", + OBJ_LIST => [] + }; foreach $part (values %{$depend}) { + next if $part->{NAME} eq "PROTO"; + next if $part->{NAME} eq "ALL_OBJS"; next if not defined($part->{OUTPUT_TYPE}); generate_binary($part) if $part->{OUTPUT_TYPE} eq "BINARY"; @@ -87,8 +95,11 @@ sub create_output($) push(@{$part->{OBJ_LIST}}, @{$part->{ADD_OBJ_FILES}}) if defined($part->{ADD_OBJ_FILES}); push(@{$part->{OBJ_LIST}}, @{$part->{OBJ_FILES}}) if defined($part->{OBJ_FILES}); - push(@{$depend->{ALL_OBJS}{OBJ_LIST}}, @{$part->{OBJ_LIST}}) if (defined(@{$part->{OBJ_LIST}})); - push(@{$depend->{PROTO}{OBJ_LIST}}, @{$part->{OBJ_LIST}}) if ((not defined ($part->{NOPROTO}) or $part->{NOPROTO} eq "NO") and defined(@{$part->{OBJ_LIST}})); + push(@{$depend->{ALL_OBJS}->{OBJ_LIST}}, @{$part->{OBJ_LIST}}) if (defined(@{$part->{OBJ_LIST}})); + + if ((not defined ($part->{NOPROTO})) or ($part->{NOPROTO} eq "NO")) { + push(@{$depend->{PROTO}->{OBJ_LIST}}, @{$part->{OBJ_LIST}}) if (defined(@{$part->{OBJ_LIST}})); + } } foreach $part (values %{$depend}) { -- cgit