svn commit: samba r17754 - in branches/SAMBA_4_0/source/script: .

metze at samba.org metze at samba.org
Wed Aug 23 13:20:17 GMT 2006


Author: metze
Date: 2006-08-23 13:20:16 +0000 (Wed, 23 Aug 2006)
New Revision: 17754

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17754

Log:
remove the --always-create option from mkproto.pl
and make this behavior the default.

as with make 3.81 and autodependencies this way is much
faster as make can use faster codepathes internally.

(without this make needed more and more startup time after using
 autodependencies for a few weeks)

metze
Modified:
   branches/SAMBA_4_0/source/script/mkproto.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/mkproto.pl
===================================================================
--- branches/SAMBA_4_0/source/script/mkproto.pl	2006-08-23 13:14:03 UTC (rev 17753)
+++ branches/SAMBA_4_0/source/script/mkproto.pl	2006-08-23 13:20:16 UTC (rev 17754)
@@ -25,7 +25,6 @@
 my $private_data = \$_private;
 my $builddir = undef;
 my $srcdir = undef;
-my $always_create = $ENV{MK_PROTO_ALWAYS_CREATE};
 
 sub public($)
 {
@@ -50,7 +49,6 @@
 	print "  --private-define=DEF   Same as --define, but just for private header\n";
 	print "  --srcdir=path          Read files relative to this directory\n";
 	print "  --builddir=path        Write file relative to this directory\n";
-	print "  --always-create        Always create new proto headers, even if the content hasn't changed\n";
 	print "  --help                 Print this help message\n\n";
 	exit 0;
 }
@@ -67,7 +65,6 @@
 	'private-define=s' => \$private_define,
 	'srcdir=s' => sub { my ($f,$v) = @_; $srcdir = $v; },
 	'builddir=s' => sub { my ($f,$v) = @_; $builddir = $v; },
-	'always-create' => \$always_create,
 	'help' => \&usage
 ) or exit(1);
 
@@ -241,20 +238,12 @@
 	print STDOUT $$private_data;
 }
 
-my $old_public_data = file_load($public_file);
-my $old_private_data = file_load($private_file);
+mkpath(dirname($public_file), 0, 0755);
+open(PUBLIC, ">$public_file") or die("Can't open `$public_file': $!"); 
+print PUBLIC "$$public_data";
+close(PUBLIC);
 
-if (defined($always_create) or not defined($old_public_data) or ($old_public_data ne $$public_data))
-{
-	mkpath(dirname($public_file), 0, 0755);
-	open(PUBLIC, ">$public_file") or die("Can't open `$public_file': $!"); 
-	print PUBLIC "$$public_data";
-	close(PUBLIC);
-} 
-
-if (($public_file ne $private_file) and (defined($always_create) or 
-	not defined($old_private_data) or ($old_private_data ne $$private_data))) {
-
+if ($public_file ne $private_file) {
 	mkpath(dirname($private_file), 0, 0755);
 	open(PRIVATE, ">$private_file") or die("Can't open `$private_file': $!"); 
 	print PRIVATE "$$private_data";



More information about the samba-cvs mailing list