view libtommath/gen.pl @ 1205:978887222d29

Added OpenSSH-like -o command line option to dbclient. Like in OpenSSH, whitespaces are ignored, key and value may be separated by one '=' character. For now only yes/no flag parsing is implemented.
author Konstantin Tokarev <ktokarev@smartlabs.tv>
date Mon, 30 Nov 2015 20:36:15 +0300
parents eed26cff980b
children 60fc6476e044
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: $!";