#!/usr/bin/perl
# change the prefix in the perl makefile
# for some reason, passing it as an argument caused
# the lib/perl5 text to be dropped
$infile = 'Makefile';
$outfile = 'Makefile.new';
$cdir = `pwd`;
chomp $cdir;
open IH,"<$infile" or die "Can't open $infile";
open OH,">$outfile" or die "Can't open $outfile";
while ($line = <IH> ) {
	$line =~ s#\$\(PREFIX\)#$cdir/debian/tmp/usr#;
	print OH $line;
}
close OH;
system "mv Makefile.new Makefile";
