1 # leftovers in old checkouts
2 unlink 'lib/DBIx/Class/Optional/Dependencies.pod'
3 if -f 'lib/DBIx/Class/Optional/Dependencies.pod';
5 my $pod_dir = '.generated_pod';
6 my $ver = Meta->version;
8 # cleanup the generated pod dir (again - kill leftovers from old checkouts)
11 File::Path::rmtree( File::Glob::bsd_glob("$pod_dir/*"), { verbose => 0 } );
14 # generate the OptDeps pod both in the clone-dir and during the makefile distdir
16 print "Regenerating Optional/Dependencies.pod\n";
17 require DBIx::Class::Optional::Dependencies;
18 DBIx::Class::Optional::Dependencies->_gen_pod ($ver, $pod_dir);
22 clonedir_generate_files : dbic_clonedir_gen_optdeps_pod
24 dbic_clonedir_gen_optdeps_pod :
25 \t\$(ABSPERLRUN) -Ilib -MDBIx::Class::Optional::Dependencies -e "DBIx::Class::Optional::Dependencies->_gen_pod(qw($ver $pod_dir))"
31 # generate the inherit pods both in the clone-dir and during the makefile distdir
33 print "Regenerating project documentation to include inherited methods\n";
35 # if the author doesn't have them, don't fail the initial "perl Makefile.pl" step
36 do "maint/gen_pod_inherit" or print "\n!!! FAILED: $@\n";
40 clonedir_generate_files : dbic_clonedir_gen_inherit_pods
42 dbic_clonedir_gen_inherit_pods :
43 \t\$(ABSPERLRUN) -Ilib maint/gen_pod_inherit
49 # copy the contents of .generated_pod over to lib/
50 # (yes, overwriting is fine, though nothing should reside there)
54 clonedir_post_generate_files : dbic_clonedir_copy_generated_pod
56 dbic_clonedir_copy_generated_pod :
57 \t\$(RM_F) .generated_pod/.packlist
58 \t\$(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {qw(.generated_pod/DBIx lib/DBIx write .generated_pod/.packlist)}, verbose => 0, uninstall_shadows => 0, skip => [] ]);'
64 # everything that came from .generated_pod, needs to be removed from our lib/
68 clonedir_cleanup_generated_files : dbic_clonedir_cleanup_generated_pod_copies
70 dbic_clonedir_cleanup_generated_pod_copies :
71 \t\$(ABSPERLRUN) -MExtUtils::Install -e 'uninstall(qw(.generated_pod/.packlist))'
76 # keep the Makefile.PL eval happy