Stop loading Time::HiRes in the base test schema - there is no need
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 54_autogen_legalese_and_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 $r_fn = File::Spec->catfile($dir, 'README');
11
12 my $start_file = sub {
13   my $fn = $mm_proto->quote_literal(shift);
14   return join "\n",
15     qq{\t\$(NOECHO) \$(RM_F) $fn},
16     ( map { qq(\t\$(NOECHO) \$(ECHO) "$_" >> $fn) } (
17       "DBIx::Class is Copyright (c) 2005-@{[ (gmtime)[5] + 1900  ]} by mst, castaway, ribasushi, and others.",
18       "See AUTHORS and LICENSE included with this distribution. All rights reserved.",
19       "",
20     )),
21   ;
22 };
23
24 postamble <<"EOP";
25
26 clonedir_generate_files : dbic_clonedir_gen_readme
27
28 dbic_clonedir_gen_readme : dbic_distdir_gen_dbic_pod
29 @{[ $start_file->($r_fn) ]}
30 \tpod2text $dir/lib/DBIx/Class.pod >> $r_fn
31
32 create_distdir : dbic_distdir_regen_license
33
34 dbic_distdir_regen_license :
35 @{[ $start_file->( File::Spec->catfile( Meta->name . '-' . Meta->version, 'LICENSE') ) ]}
36 \t@{[ $mm_proto->oneliner('cat', ['-MExtUtils::Command']) ]} LICENSE >> \$(DISTVNAME)/LICENSE
37
38 EOP
39
40
41 # keep the Makefile.PL eval happy
42 1;