Here's how I did a README in GraphQL (https://github.com/graphql-perl/graphql-perl/blob/e1eec750f91420cc8013131db58d373fd944f1ea/Makefile.PL#L73-L84):
sub MY::postamble { return '' if !-e '.git'; my $container = 'graphqlperl/graphql'; my $prereq = "${container}-prereq"; <<EOF; \$(VERSION_FROM) : graphql.pgx \t\$(PERL) -Ilib -MGraphQL::Language::Grammar=compile pure_all :: README.md README.md : \$(VERSION_FROM) \tpod2markdown \$< >\$\@ # then some Docker stuff
This is sort of author-side (doing dev work on the code) but also end-user-ish (it's not for publishing the distro) in PDL (https://github.com/PDLPorters/pdl/blob/0f700ec2306578903bee1bbe19b8bea3dc7d153b/Makefile.PL#L344-L436):
sub coretarget { my ($self) = @_; # remember the fundamental ones end up far to right as much deps o +n them # a "right" is either scalar (named target) or tuple of # [ \@dir, \@targets, \@prereqs ] # @dir is dir parts for use by File::Spec # @targets is make targets within that dir # @prereqs are named targets - undef=[] # all a left's rights are made concurrently, no sequence - list AL +L prereqs my @left2rights = ( [ coregen => [ [ [ qw(Basic) ], [ qw(pm_to_blib) ], ], [ [ qw(Basic Core) ], [ qw(pm_to_blib) ], ], [ [ qw(Basic Gen) ], [ qw(all) ], ], ] ], [ core => [ [ [ qw(Basic SourceFilter) ], [ qw(pm_to_blib) ], ], map [ [ 'Basic', $_ ], [ qw(pm_to_blib dynamic) ], [ 'coregen' ], # the modules in PDL::LiteF, used in t/core.t ], qw(Core Ops Primitive Ufunc Slices Bad Math MatrixO +ps), ] ], [ basic => [ map [ $_, [ qw(pm_to_blib dynamic) ], [ 'core' ], ], @basics, ] ], [ basictest => [ map [ $_, [ 'test' ], [ 'basic' ], ], @basics, ] ], ); join "\n", map flatten_parallel_target($self, $_), @left2rights; } sub format_chunk { my ($self, $left, $deps, $dir, $targets) = @_; my @m = join ' ', $left, ':', @{$deps||[]}; my $fsdir = File::Spec->catdir(@$dir); push @m, "\t" . $self->oneliner( "die \$! unless chdir q($fsdir); exec q(\$(MAKE) @$targets)" ); join '', map "$_\n", @m; } # output: list of make chunks with target, deps, recipes sub flatten_parallel_target { my ($self, $left2rights) = @_; my ($left, $rights) = @$left2rights; my (@deps, @recipes, @otherchunks); for my $right (@$rights) { if (ref $right) { # [ \@dir, \@targets, \@prereqs ] # @dir is dir parts for use by File::Spec # @targets is make targets within that dir # @prereqs are named targets - undef=[] my ($dir, $targets, $prereqs) = @$right; my $target_name = parallel_target_mangle($self, $dir, $tar +gets); push @deps, $target_name; push @otherchunks, format_chunk( $self, $target_name, $prereqs, $dir, $targets ); } else { push @deps, $right; } } ( join(' : ', $left, join ' ', @deps) . "\n", @otherchunks, ); } sub parallel_target_mangle { my ($self, $dir, $targets) = @_; my $target = join '_', @$dir, @$targets; $target =~ s#[/\\]#_#g; # avoid ambiguity with filenames $target; }

In reply to Re: EU::MM recipes -- a lazy Makefile.PL for README and repository info by etj
in thread EU::MM recipes -- a lazy Makefile.PL for README and repository info by Discipulus

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.