| 1 | package ake; | ||
| 2 | use Mo; | ||
| 3 | |||
| 4 | sub assert_makefile { | ||
| 5 | if (not -f 'Makefile.PL') { | ||
| 6 | system("$^X -Makefile=PL"); | ||
| 7 | } | ||
| 8 | elsif (not -f 'Makefile') { | ||
| 9 | system("$^X Makefile.PL"); | ||
| 10 | } | ||
| 11 | } | ||
| 12 | |||
| 13 | BEGIN { | ||
| 14 | { | ||
| 15 | no warnings; | ||
| 16 | return unless $^I eq 'nstall'; | ||
| 17 | } | ||
| 18 | assert_makefile(); | ||
| 19 | exec("make install"); | ||
| 20 | } | ||
| 21 | |||
| 22 | sub main::st { | ||
| 23 | assert_makefile(); | ||
| 24 | exec("make test"); | ||
| 25 | } | ||
| 26 | |||
| 27 | 1; |