Kaydet (Commit) 2be0dfdb authored tarafından Andre Fischer's avatar Andre Fischer

Use file to pass list of names instead of flooding the command line.

üst 3ca8c0e0
...@@ -32,25 +32,33 @@ TARGET=signing ...@@ -32,25 +32,33 @@ TARGET=signing
# PFXFILE has to be set elsewhere # PFXFILE has to be set elsewhere
# PFXPASSWORD has to be set elsewhere # PFXPASSWORD has to be set elsewhere
.IF "$(VISTA_SIGNING)"!=""
.IF "$(COM)"=="MSC"
.IF "$(product)"=="full"
EXCLUDELIST=no_signing.txt EXCLUDELIST=no_signing.txt
LOGFILE=$(MISC)$/signing_log.txt LOGFILE=$(MISC)$/signing_log.txt
IMAGENAMES=$(SOLARBINDIR)$/*.dll $(SOLARBINDIR)$/so$/*.dll $(SOLARBINDIR)$/*.exe $(SOLARBINDIR)$/so$/*.exe IMAGENAMES=$(SOLARBINDIR)$/*.dll $(SOLARBINDIR)$/so$/*.dll $(SOLARBINDIR)$/*.exe $(SOLARBINDIR)$/so$/*.exe
TIMESTAMPURL*="http://timestamp.verisign.com/scripts/timstamp.dll" TIMESTAMPURL*="http://timestamp.verisign.com/scripts/timstamp.dll"
signing.done : signing.done : $(MISC)/signing-filelist.txt
.IF "$(VISTA_SIGNING)"!="" $(PERL) signing.pl -e $(EXCLUDELIST) -f $(PFXFILE) -p $(PFXPASSWORD) -t $(TIMESTAMPURL) -i $(MISC)/signing-filelist.txt && $(TOUCH) $(MISC)$/signing.done
.IF "$(COM)"=="MSC"
.IF "$(product)"=="full" # Create a file that contains all dlls that are to be signed.
$(PERL) signing.pl -e $(EXCLUDELIST) -f $(PFXFILE) -p $(PFXPASSWORD) -t $(TIMESTAMPURL) $(IMAGENAMES) && $(TOUCH) $(MISC)$/signing.done $(MISC)/signing-filelist.txt :
-ls -1U $(IMAGENAMES) > $@ 2>/dev/null
.INCLUDE : target.mk
.ELSE # "$(product)"=="full" .ELSE # "$(product)"=="full"
all :
@echo Doing nothing on non product builds ... @echo Doing nothing on non product builds ...
.ENDIF # "$(product)"=="full" .ENDIF # "$(product)"=="full"
.ELSE # "$(GUI)"=="MSC" .ELSE # "$(GUI)"=="MSC"
all :
@echo Nothing to do, signing is Windows \(MSC\) only. @echo Nothing to do, signing is Windows \(MSC\) only.
.ENDIF # "$(GUI)"=="MSC" .ENDIF # "$(GUI)"=="MSC"
.ELSE # "$(VISTA_SIGNING)"!="" .ELSE # "$(VISTA_SIGNING)"!=""
all :
@echo Doing nothing. To switch on signing set VISTA_SIGNING=TRUE ... @echo Doing nothing. To switch on signing set VISTA_SIGNING=TRUE ...
.ENDIF # "$(VISTA_SIGNING)"!="" .ENDIF # "$(VISTA_SIGNING)"!=""
.INCLUDE : target.mk
...@@ -82,9 +82,10 @@ sub parse_options #09.07.2007 08:13 ...@@ -82,9 +82,10 @@ sub parse_options #09.07.2007 08:13
{ {
# e exclude list file # e exclude list file
# v verbose # v verbose
my $filelist_filename = undef;
my $success = GetOptions('h' => \$opt_help, my $success = GetOptions('h' => \$opt_help,
'd=s' => \$opt_dir, 'e=s'=>\$opt_exclude, 'f=s'=>\$opt_pfxfile, 'l=s'=>\$opt_log, 'd=s' => \$opt_dir, 'e=s'=>\$opt_exclude, 'f=s'=>\$opt_pfxfile, 'l=s'=>\$opt_log,
'p=s'=>\$opt_pass,'v'=>\$opt_verbose, 't=s'=>\$opt_timestamp_url); 'p=s'=>\$opt_pass,'v'=>\$opt_verbose, 't=s'=>\$opt_timestamp_url, 'i=s'=>\$filelist_filename);
if ( !$success || $opt_help ) { if ( !$success || $opt_help ) {
usage(); usage();
exit(1); exit(1);
...@@ -94,7 +95,17 @@ sub parse_options #09.07.2007 08:13 ...@@ -94,7 +95,17 @@ sub parse_options #09.07.2007 08:13
usage(); usage();
exit(1); exit(1);
} }
return @ARGV;
# Read the names of files to sign from the given file.
die "no list of files given" unless defined $filelist_filename;
open my $in, $filelist_filename;
my @filelist = ();
while (<$in>)
{
chomp($_);
push @filelist, $_;
}
return @filelist;
} ##parse_options } ##parse_options
############################################################################ ############################################################################
...@@ -251,7 +262,7 @@ sub print_error #09.07.2007 11:21 ...@@ -251,7 +262,7 @@ sub print_error #09.07.2007 11:21
sub usage #09.07.2007 08:39 sub usage #09.07.2007 08:39
############################################################################ ############################################################################
{ {
print "Usage:\t $myname <-e filename> <-f filename> <-p password> <-t timestamp> [-l filename] [-v] <file[list]> \n"; print "Usage:\t $myname <-e filename> <-f filename> <-p password> <-t timestamp> <-i filename> [-l filename] [-v]\n";
print "Options:\n"; print "Options:\n";
print "\t -e filename\t\t\tFile which contains a list of files which don't have to be signed.\n"; print "\t -e filename\t\t\tFile which contains a list of files which don't have to be signed.\n";
print "Mandatory.\n"; print "Mandatory.\n";
...@@ -259,11 +270,8 @@ sub usage #09.07.2007 08:39 ...@@ -259,11 +270,8 @@ sub usage #09.07.2007 08:39
print "Mandatory.\n"; print "Mandatory.\n";
print "\t -p password\t\t\tPassword for \"Personal Information Exchange\" file. Mandatory.\n"; print "\t -p password\t\t\tPassword for \"Personal Information Exchange\" file. Mandatory.\n";
print "\t -t timestamp\t\t\tTimestamp URL e.g. \"http://timestamp.verisign.com/scripts/timstamp.dll\"\n"; print "\t -t timestamp\t\t\tTimestamp URL e.g. \"http://timestamp.verisign.com/scripts/timstamp.dll\"\n";
print "\t -i filename\t\t\tName of the file that contains the names of files to sign.\"\n";
print "\t\t\t\t\tMandatory.\n"; print "\t\t\t\t\tMandatory.\n";
print "\t -l log_filename\t\tFile for logging.\n"; print "\t -l log_filename\t\tFile for logging.\n";
print "\t -v\t\t\t\tVerbose.\n"; print "\t -v\t\t\t\tVerbose.\n";
} ##usage } ##usage
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment