instead of hardcoding the
mkdir command, which isn't known on all systems, use the
$(MKPATH) from
ExtUtils::MakeMaker's Makefile, which calls
mkpath. As a side benefit,
mkpath automatically generates necessary parents as well, so you don't need the
--parents argument.
sub MY::postamble {
<<'EOT'
blib/lib/OPTiMaDe/Filter/%.pm: %.yp
$(MKPATH) (@D)
yapp -v -m OPTiMaDe::Filter::Parser -o $@ $<
EOT
}