annotate gen.pl @ 387:4663ced4968f libtommath-dropbear

propagate from branch 'au.asn.ucc.matt.ltm.orig' (head 1c2b7d389d0682caf980235dad97493e3206389c) to branch 'au.asn.ucc.matt.ltm.dropbear' (head 40ab3795de3a6157f34e52ed3f0be3eebe9a2eaa)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 03:13:04 +0000
parents 91fbc376f010
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
282
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #!/usr/bin/perl -w
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 #
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 # Generates a "single file" you can use to quickly
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 # add the whole source without any makefile troubles
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 #
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 use strict;
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8 open( OUT, ">mpi.c" ) or die "Couldn't open mpi.c for writing: $!";
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 foreach my $filename (glob "bn*.c") {
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 open( SRC, "<$filename" ) or die "Couldn't open $filename for reading: $!";
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11 print OUT "/* Start: $filename */\n";
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 print OUT while <SRC>;
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 print OUT "\n/* End: $filename */\n\n";
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 close SRC or die "Error closing $filename after reading: $!";
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 }
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 print OUT "\n/* EOF */\n";
91fbc376f010 Import of libtommath 0.35
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 close OUT or die "Error closing mpi.c after writing: $!";