From: Nick Ing-Simmons Date: Sat, 23 Dec 2000 16:06:00 +0000 (+0000) Subject: Encode's Makefile.PL fix not good for dmake $(MAKEFILE) is set to -f Makefile X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d7e77d666ed754d5cd34909a5f2a7dd48814e28;p=p5sagit%2Fp5-mst-13.2.git Encode's Makefile.PL fix not good for dmake $(MAKEFILE) is set to -f Makefile and fails to make '-f'. (Also handle case where xxxx.c files have not been deleted.) p4raw-id: //depot/perlio@8232 --- diff --git a/ext/Encode/Makefile.PL b/ext/Encode/Makefile.PL index b9f1a40..754a326 100644 --- a/ext/Encode/Makefile.PL +++ b/ext/Encode/Makefile.PL @@ -34,7 +34,20 @@ package MY; sub post_initialize { my ($self) = @_; - push(@{$self->{'O_FILES'}},map("$_\$(OBJ_EXT)",keys %tables)); + my %o; + # Find existing O_FILES + foreach my $f (@{$self->{'O_FILES'}}) + { + $o{$f} = 1; + } + my $x = $self->{'OBJ_EXT'}; + # Add the table O_FILES + foreach my $e (keys %tables) + { + $o{$e.$x} = 1; + } + # Reset the variable + $self->{'O_FILES'} = [sort keys %o]; my @files; foreach my $table (keys %tables) { @@ -61,7 +74,7 @@ sub postamble $str .= "\n\n"; foreach my $table (keys %tables) { - $str .= "$table.c : compile \$(MAKEFILE)"; + $str .= "$table.c : compile Makefile.PL"; foreach my $file (@{$tables{$table}}) { $str .= ' '.$self->catfile($dir,$file);