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 :-)


In reply to Re^2: Makefile.PL: Howto make OS dependent modules by vicdan
in thread Makefile.PL: Howto make OS dependent modules by vicdan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.