r3465: fix SMB_SUBSYSTEM_NOPROTO()
authorStefan Metzmacher <metze@samba.org>
Tue, 2 Nov 2004 07:15:37 +0000 (07:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:17 +0000 (13:05 -0500)
metze
(This used to be commit e12595a750ea3f5ccc1ca8e628b707c0753394d7)

source4/build/smb_build/makefile.pl
source4/build/smb_build/output.pl
source4/build/smb_build/public.m4

index e0cb3d0d860a108a9d64c20d8f60e5f8183a30d1..a3187daaa735db8d2856b764a957858a5f65d55b 100644 (file)
@@ -540,26 +540,13 @@ binary_$ctx->{BINARY}: basics bin/$ctx->{BINARY}
 # $proto_ctx->{OBJ_LIST} -     the list of objectfiles which sould be scanned by make proto
 #
 # $output -            the resulting output buffer
-sub _prepare_proto_obj_list($$)
+sub _prepare_proto_obj_list($)
 {
        my $ctx = shift;
-       my $noproto = shift;
        my $tmplist;
        my $output;
-       my %proto_obj;
-       use Data::Dumper;
 
-       foreach my $str (@{$ctx->{OBJ_LIST}}) {
-               $proto_obj{$str} = 1;
-       }
-       foreach my $str (keys %{$noproto}) {
-               if ($noproto->{$str}) {
-                       delete $proto_obj{"\$(SUBSYSTEM_$str\_OBJS)"};
-               }
-       }
-
-       my @proto_list = (keys %proto_obj);
-       $tmplist = array2oneperline(\@proto_list);
+       $tmplist = array2oneperline($ctx->{OBJ_LIST});
 
        $output = "
 ###################################
@@ -669,7 +656,7 @@ sub _prepare_obj_lists($)
                $output .= _prepare_binary_obj_list(\%{$CTX->{OUTPUT}{BINARIES}{$key}});
        }
 
-       $output .= _prepare_proto_obj_list(\%{$CTX->{OUTPUT}{PROTO}}, \%{$CTX->{INPUT}{SUBSYSTEMS}{NOPROTO}});
+       $output .= _prepare_proto_obj_list(\%{$CTX->{OUTPUT}{PROTO}});
 
        return $output;
 }
index 0d5390e64e4a6522586317d1e94d65e9c97517a2..800f743efeb7c2092a850e60580d6f49e1b6003f 100644 (file)
@@ -40,7 +40,9 @@ sub _generate_subsystems($)
                my $NAME = $CTX->{INPUT}{SUBSYSTEMS}{$key}{NAME};
                my @OBJ_LIST = @{$CTX->{DEPEND}{SUBSYSTEMS}{$key}{OBJ_LIST}};
 
-               push(@{$CTX->{OUTPUT}{PROTO}{OBJ_LIST}},"\$(SUBSYSTEM_$key\_OBJS)");
+               if ($CTX->{INPUT}{SUBSYSTEMS}{$key}{NOPROTO} ne "YES") {
+                       push(@{$CTX->{OUTPUT}{PROTO}{OBJ_LIST}},"\$(SUBSYSTEM_$key\_OBJS)");
+               }
 
                #
                # set the lists
index e3bbcf1eba40d6d3304d699f8f7dcd2be535e96c..f45cf87cbba10c8bf5ede76e769e699151f6cd1f 100644 (file)
@@ -276,7 +276,7 @@ dnl         1:name
 dnl            )
 AC_DEFUN([SMB_SUBSYSTEM_NOPROTO],
 [
-       [SMB_SUBSYSTEM_NOPROTO_][$1]="1"
+       [SMB_SUBSYSTEM_NOPROTO_][$1]="YES"
 ])
 
 dnl SMB_SUBSYSTEM(
@@ -293,6 +293,10 @@ AC_DEFUN([SMB_SUBSYSTEM],
                [SMB_SUBSYSTEM_ENABLE_][$1]="YES";
        fi
 
+       if test -z "$[SMB_SUBSYSTEM_NOPROTO_][$1]"; then
+               [SMB_SUBSYSTEM_NOPROTO_][$1]="NO";
+       fi
+
 SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 ###################################
 # Start Subsystem $1
@@ -303,7 +307,7 @@ SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 @{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_SUBSYSTEMS}} = str2array(\"$5\");
 #
 \$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ENABLE} = \"$[SMB_SUBSYSTEM_ENABLE_][$1]\";
-\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{NOPROTO}{$1} = \"$[SMB_SUBSYSTEM_NOPROTO_][$1]\";
+\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{NOPROTO} = \"$[SMB_SUBSYSTEM_NOPROTO_][$1]\";
 # End Subsystem $1
 ###################################
 "
@@ -320,6 +324,10 @@ AC_DEFUN([SMB_SUBSYSTEM_MK],
                [SMB_SUBSYSTEM_ENABLE_][$1]="YES";
        fi
 
+       if test -z "$[SMB_SUBSYSTEM_NOPROTO_][$1]"; then
+               [SMB_SUBSYSTEM_NOPROTO_][$1]="NO";
+       fi
+
 SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 ###################################
 # Start Subsystem $1
@@ -330,7 +338,7 @@ SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 @{\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{REQUIRED_SUBSYSTEMS}} = subsystem_get_array(\"$2\", \"$1\", \"REQUIRED_SUBSYSTEMS\");
 #
 \$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{ENABLE} = \"$[SMB_SUBSYSTEM_ENABLE_][$1]\";
-\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{NOPROTO}{$1} = \"$[SMB_SUBSYSTEM_NOPROTO_][$1]\";
+\$SMB_BUILD_CTX->{INPUT}{SUBSYSTEMS}{$1}{NOPROTO} = \"$[SMB_SUBSYSTEM_NOPROTO_][$1]\";
 # End Subsystem $1
 ###################################
 "