ExtUtils :: MakeMaker Special Purpose

Is there a way to create a custom Makefile target for ExtUtils :: MakeMaker? Let's say I would like to do some specific things that only a developer is interested in, for example, run swap and regression tests; I can use env variables for this, but it's a little cumbersome to remember such things. Being able to run something like make devtestinstead would be very convenient.

+4
source share
1 answer

Regression testing with ExtUtils :: MakeMaker

By default , makeMaker make files are shipped with a goal testthat runs all the regression tests test.plin the current directory as well as all the files that match glob("t/*.t")at startup make test. Your typical use should be:

perl Makefile.PL
make
make test
make install

You can define your own goals make, there is information about the variables that you can set in the CPAN documentation for the module as manpage.

This is an example from a CPAN article:

sub MY::postamble {
    return <<'MAKE_FRAG';
    $(MYEXTLIB): sdbm/Makefile
    cd sdbm && $(MAKE) all
    MAKE_FRAG
}
+2
source

Source: https://habr.com/ru/post/1526472/


All Articles