Thank you for you hint with Devel::AssertOS.
I looked into it, but I´m afraid it does not quite serve my purpose.
As I understand it dies when the underlying OS is not the intended one, but I covered that aspect already.
What I need is, that by saying something like:
perl Makefile.PL # Maybe some option here? os=all|Linux|AIX|RHEL|Suse
make # To get everything or things covered with option
# And if option is not possible:
make Linux # To get Base plus all Linux stuff
make RHEL # To get Base plus Linux.pm plus RHEL.pm
make Suse # To get Base plus Linux.pm plus Suse.pm
make AIX # To get Base plus AIX.pm
make test # To test all related tests
make install # To install only selected modules
That way only the selected modules get installed out of my manifest.
As I see it, I must teach somehow Makefile.PL either to select the appropriate things I need when I call it (with options) or to make Makefile.Pl make additional targets (like AIX, Linux ...).
I saw the CONFIGURE attribute in the documentation of ExtUtils::MakeMaker which looked very promising to accomplish this:
CONFIGURE
CODE reference. The subroutine should return a hash
reference. The hash may contain further attributes,
e.g. {LIBS => ...}, that have to be determined by some
evaluation method.
I also found a small article in CPAN how to create own make targets:
sub MY::postamble {
return <<'MAKE_FRAG';
$(MYEXTLIB): sdbm/Makefile
cd sdbm && $(MAKE) all
MAKE_FRAG
}
But all that I find extremely vague and unintuitive...
A good example could help :-)
|