1*ebfedea0SLionel Sambuc#!/usr/bin/perl -w 2*ebfedea0SLionel Sambuc# 3*ebfedea0SLionel Sambuc# Generates a "single file" you can use to quickly 4*ebfedea0SLionel Sambuc# add the whole source without any makefile troubles 5*ebfedea0SLionel Sambuc# 6*ebfedea0SLionel Sambucuse strict; 7*ebfedea0SLionel Sambuc 8*ebfedea0SLionel Sambucopen( OUT, ">mpi.c" ) or die "Couldn't open mpi.c for writing: $!"; 9*ebfedea0SLionel Sambucforeach my $filename (glob "bn*.c") { 10*ebfedea0SLionel Sambuc open( SRC, "<$filename" ) or die "Couldn't open $filename for reading: $!"; 11*ebfedea0SLionel Sambuc print OUT "/* Start: $filename */\n"; 12*ebfedea0SLionel Sambuc print OUT while <SRC>; 13*ebfedea0SLionel Sambuc print OUT "\n/* End: $filename */\n\n"; 14*ebfedea0SLionel Sambuc close SRC or die "Error closing $filename after reading: $!"; 15*ebfedea0SLionel Sambuc} 16*ebfedea0SLionel Sambucprint OUT "\n/* EOF */\n"; 17*ebfedea0SLionel Sambucclose OUT or die "Error closing mpi.c after writing: $!";