Commit | Line | Data |
a14c7707 |
1 | # leftovers in old checkouts |
2 | unlink 'lib/DBIx/Class/Optional/Dependencies.pod' |
3 | if -f 'lib/DBIx/Class/Optional/Dependencies.pod'; |
4 | |
5 | my $pod_dir = '.generated_pod'; |
6 | my $ver = Meta->version; |
7 | |
8 | # cleanup the generated pod dir (again - kill leftovers from old checkouts) |
9 | require File::Path; |
10 | require File::Glob; |
11 | File::Path::rmtree( [File::Glob::bsd_glob "$pod_dir/*"], { verbose => 0 } ); |
12 | |
13 | # generate the OptDeps pod both in the clone-dir and during the makefile distdir |
14 | { |
15 | print "Regenerating Optional/Dependencies.pod\n"; |
16 | require DBIx::Class::Optional::Dependencies; |
17 | DBIx::Class::Optional::Dependencies->_gen_pod ($ver, $pod_dir); |
18 | |
19 | postamble <<"EOP"; |
20 | |
21 | .PHONY: dbic_clonedir_gen_optdeps_pod |
22 | |
23 | create_distdir : dbic_clonedir_gen_optdeps_pod |
24 | |
25 | dbic_clonedir_gen_optdeps_pod : |
26 | \t\$(ABSPERL) -Ilib -MDBIx::Class::Optional::Dependencies -e "DBIx::Class::Optional::Dependencies->_gen_pod(qw($ver $pod_dir))" |
27 | |
28 | EOP |
29 | } |
30 | |
31 | # generate the inherit pods both in the clone-dir and during the makefile distdir |
32 | { |
33 | print "Regenerating project documentation to include inherited methods\n"; |
34 | |
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"; |
37 | |
38 | postamble <<"EOP"; |
39 | |
40 | .PHONY: dbic_clonedir_gen_inherit_pods |
41 | |
42 | create_distdir : dbic_clonedir_gen_inherit_pods |
43 | |
44 | dbic_clonedir_gen_inherit_pods : |
45 | \t\$(ABSPERL) -Ilib maint/gen_pod_inherit |
46 | |
47 | EOP |
48 | } |
49 | |
50 | # keep the Makefile.PL eval happy |
51 | 1; |