The example in perlxstut (which I created with a lot of pain) works by
coincidence only:
It has
WriteMakefile(
NAME => 'Mytest2::mylib',
SKIP => [qw(all static static_lib dynamic dynamic_lib)],
clean => {'FILES' => 'libmylib$(LIB_EXT)'},
);
sub MY::top_targets {
'
all :: static
static :: libmylib$(LIB_EXT)
libmylib$(LIB_EXT): $(O_FILES)
$(AR) cr libmylib$(LIB_EXT) $(O_FILES)
$(RANLIB) libmylib$(LIB_EXT)
';
}
and work only because $self->MM::top_targets is not called. The reason is
that 'all' chunk is written anyway not depending on the value of SKIPHASH.
In my eText package I do $self->MM::top_targets inside
MY::top_targets, and this bombs.
Patch follows (only for 'all', I did not check any other target):
(The alternative is to patch perlxstut, but this may break some other
programs, not only mine...)
Enjoy,
p5p-msgid:
199703210413.XAA21601@monk.mps.ohio-state.edu
my(@m);
push @m, '
#all :: config $(INST_PM) subdirs linkext manifypods
+';
+ push @m, '
all :: pure_all manifypods
'.$self->{NOECHO}.'$(NOOP)
-
+'
+ unless $self->{SKIPHASH}{'all'};
+
+ push @m, '
pure_all :: config pm_to_blib subdirs linkext
'.$self->{NOECHO}.'$(NOOP)