Mercurial > dropbear
view tomsfastmath/gen.pl @ 644:ff5cc422ba40 dropbear-tfm tomsfastmath
Somehow Makefile.in went missing
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 23 Nov 2011 18:11:51 +0700 |
parents | a362b62d38b2 |
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 "*fp_*.c") { next if ($filename eq "fp_sqr_comba_generic.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: $!";