Rafael Garcia-Suarez wrote: > Michael G Schwern wrote: > > === lib/ExtUtils/MM_Any.pm > > ================================================================== > > --- lib/ExtUtils/MM_Any.pm (revision 4360) > > +++ lib/ExtUtils/MM_Any.pm (local) > > @@ -771,6 +771,10 @@ > > my @dirs = qw($(DISTVNAME)); > > my @files = qw($(FIRST_MAKEFILE) $(MAKEFILE_OLD)); > > > > + # Special exception for the perl core where INST_* is not in blib. > > + # This cleans up the files built from the ext/ directory (all XS). > > + push @dirs, qw($(INST_AUTODIR) $(INST_ARCHAUTODIR)) if > > $self->{PERL_CORE}; > > That's not going to work. > > push @dirs, qw($(INST_LIBDIR) $(INST_ARCHLIBDIR)) if $self->{PERL_CORE}; > > would be better, but it will remove too many things though. > What I need is to remove all .pm files installed in lib/ during the > compilation > process, and their parent directories if becomed empty.
OK, here's a patch that works : (against MM's trunk) Index: lib/ExtUtils/MM_Any.pm =================================================================== --- lib/ExtUtils/MM_Any.pm (revision 2359) +++ lib/ExtUtils/MM_Any.pm (working copy) @@ -771,6 +771,9 @@ my @dirs = qw($(DISTVNAME)); my @files = qw($(FIRST_MAKEFILE) $(MAKEFILE_OLD)); + push @dirs, qw($(INST_AUTODIR) $(INST_ARCHAUTODIR)) if $self->{PERL_CORE}; + push @files, values %{$self->{PM}} if $self->{PERL_CORE}; + if( $self->has_link_code ){ push @files, qw($(OBJECT)); }