I've been playing with MakeMaker and it seems to do everything I need except for one thing: at the end of make install,
I need to run a shell command that registers the path of one of the modules installed to the tools my code integrates with:
/usr/local/cpanel/bin/manage_hooks add script /path/to/ftBackup.pl --manual --category=System --event=Backup --stage=post
Where "/path/to/" should be where MakeMaker is intending to install the script listed in its EXE_FILES
parameter.
Is that doable in a straightforward manner? Or have I hit the straightforward limit of MakeMaker?
CodePudding user response:
You can add to the Makefile by defining a postamble method in your Makefile.PL.
sub MY::postamble {
return <<'MAKE_FRAG';
install ::
echo 'postinstall'
MAKE_FRAG
}
https://metacpan.org/pod/ExtUtils::MakeMaker#Overriding-MakeMaker-Methods