Make `perl Makefile.PL` runs more user friendly - better diagnostics
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 52_autogen_README.pl
1 # When a long-standing branch is updated a README may still linger around
2 unlink 'README' if -f 'README';
3
4 # Makefile syntax allows adding extra dep-specs for already-existing targets,
5 # and simply appends them on *LAST*-come *FIRST*-serve basis.
6 # This allows us to inject extra depenencies for standard EUMM targets
7
8 require File::Spec;
9 my $dir = File::Spec->catdir(qw(maint .Generated_Pod));
10 my $fn = File::Spec->catfile($dir, 'README');
11
12 postamble <<"EOP";
13
14 clonedir_generate_files : dbic_clonedir_gen_readme
15
16 dbic_clonedir_gen_readme :
17 \t@{[ $mm_proto->oneliner('mkpath', ['-MExtUtils::Command']) ]} $dir
18 \tpod2text lib/DBIx/Class.pm > $fn
19
20 EOP
21
22 # keep the Makefile.PL eval happy
23 1;