build: added autoproto stub
[nivanova/samba-autobuild/.git] / buildtools / mktowscript / mktowscript.pl
index d3dd67f4a54f53f0ea7a7906bd3710dd05019362..2ebf2d92c2a1c9d1fa48b88a184f6ca70438e35b 100755 (executable)
@@ -150,6 +150,9 @@ sub read_config_mk($)
                        next;
                }
 
+               if ($line =~ /\$\(eval.\$\(call.proto_header_template.*,(.*),.*/) {
+                       $result->{$section}->{AUTOPROTO} = $1;
+               }
                if ($line =~ /^\$\(eval/) {
                        # skip eval lines for now
                        next;
@@ -259,6 +262,11 @@ foreach my $s (sort {$result->{$a}->{SECNUMBER} <=> $result->{$b}->{SECNUMBER}}
                            $trailer .= sprintf(",\n\toutput_type='%s'", strlist($sec->{$k}));
                            next;
                    }
+                   if ($k eq "AUTOPROTO") {
+                           my $list = trim(find_files(strlist($sec->{$k})));
+                           $trailer .= sprintf(",\n\tautoproto='%s'", $list);
+                           next;
+                   }
                    if ($k eq "$s" . "_OBJ_FILES") {
                            my $list = trim(strlist($sec->{$k}));
                            $list =~ s/\.o/.c/g;