tools/build-watch.pl
changeset 32 280a7444e782
parent 17 56b936d4786f
child 3770 ca450a806cc1
equal deleted inserted replaced
31:90e0c3ea3281 32:280a7444e782
   114 
   114 
   115 #
   115 #
   116 # Main execution begins here
   116 # Main execution begins here
   117 #
   117 #
   118 GetOptions("c|command=s" => \$cmd, "i|input-file=s" => \@file,
   118 GetOptions("c|command=s" => \$cmd, "i|input-file=s" => \@file,
   119 	   "v|verbose" => \$verbose);
   119 	   "p|pkg" => \$pkg_flag, "v|verbose" => \$verbose);
   120 
   120 
   121 if (defined($cmd)) {
   121 if (defined($cmd)) {
   122 	$file = (tempfile(UNLINK => 1))[1];
   122 	$file = (tempfile(UNLINK => 1))[1];
   123 
   123 
   124 	if (!defined($ENV{'WS_TOP'})) {
   124 	if (!defined($ENV{'WS_TOP'})) {
   130 }
   130 }
   131 
   131 
   132 ($verbose == 1) && printf("*** Processing results...\n");
   132 ($verbose == 1) && printf("*** Processing results...\n");
   133 my ($tools, $files) = process_dtrace_results($file);
   133 my ($tools, $files) = process_dtrace_results($file);
   134 
   134 
   135 ($verbose == 1) && printf("*** Generating package requirements...\n");
   135 if (defined($pkg_flag)) {
   136 my ($pkgs) = generate_package_requirements($tools, $files);
   136 	($verbose == 1) && printf("*** Generating package requirements...\n");
       
   137 	my ($pkgs) = generate_package_requirements($tools, $files);
       
   138 }
   137 
   139 
   138 if (defined($tools)) {
   140 if (defined($tools)) {
   139 	print "\n";
   141 	print "\n";
   140 	print "REQUIRED_TOOL +=\t$_\n" for (sort keys %$tools);
   142 	print "REQUIRED_TOOL +=\t$_\n" for (sort keys %$tools);
   141 }
   143 }