view 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
line wrap: on
line source

#!/usr/bin/perl -w
#
# Generates a "single file" you can use to quickly
# add the whole source without any makefile troubles
#
use strict;

open( OUT, ">mpi.c" ) or die "Couldn't open mpi.c for writing: $!";
foreach my $filename (glob "bn*.c") {
   open( SRC, "<$filename" ) or die "Couldn't open $filename for reading: $!";
   print OUT "/* Start: $filename */\n";
   print OUT while <SRC>;
   print OUT "\n/* End: $filename */\n\n";
   close SRC or die "Error closing $filename after reading: $!";
}
print OUT "\n/* EOF */\n";
close OUT or die "Error closing mpi.c after writing: $!";