Ensure the testddl is regenerated at Makefile and distdir times
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 61_inject_dbicadmin_pod.pl
CommitLineData
e2633789 1# without having the pod in the file itself, perldoc may very
2# well show a *different* document, because perl and perldoc
3# search @INC differently (crazy right?)
4#
5# make sure we delete and re-create the file - just an append
6# will not do what one expects, because on unixy systems the
7# target is symlinked to the original
fc4b0448 8
204f57da 9# FIXME also on win32 EU::Command::cat() adds crlf even if the
10# source files do not contain any :(
11my $crlf_fixup = ($^O eq 'MSWin32' or $^O eq 'cygwin')
12 ? "\t@{[ $mm_proto->oneliner( qq(\$\$ENV{PERLIO}='unix' and system( \$\$^X, qw( -MExtUtils::Command -e dos2unix -- ), q(\$(DISTVNAME)/script/dbicadmin) ) ) ) ]}"
13 : ''
14;
fc4b0448 15postamble <<"EOP";
16
a0c96f24 17create_distdir : dbic_distdir_dbicadmin_pod_inject
fc4b0448 18
fc4b0448 19dbic_distdir_dbicadmin_pod_inject :
e2633789 20\t\$(RM_F) \$(DISTVNAME)/script/dbicadmin
21\t@{[ $mm_proto->oneliner('cat', ['-MExtUtils::Command']) ]} script/dbicadmin maint/.Generated_Pod/dbicadmin.pod > \$(DISTVNAME)/script/dbicadmin
204f57da 22$crlf_fixup
fc4b0448 23EOP
24
25# keep the Makefile.PL eval happy
261;