Mercurial > dropbear
view libtommath/gen.pl @ 1521:198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
- Rename default_options.h.in -> default_options.h, and
default_options.h -> default_options_guard.h
- Fix newlines in default_options.h
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 19 Feb 2018 22:16:50 +0800 |
parents | 8bba51a55704 |
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; use warnings; open(my $out, '>', 'mpi.c') or die "Couldn't open mpi.c for writing: $!"; foreach my $filename (glob 'bn*.c') { open(my $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: $!"; system('perl -pli -e "s/\s*$//" mpi.c');