From ff1007604bbf3d9d01aac95bde1e67a6806cb6df Mon Sep 17 00:00:00 2001
From: Coke <will@coleda.com>
Date: Sat, 19 Feb 2011 00:41:01 -0500
Subject: [PATCH] Remove "make docs" global target
- also removes default make target in docs/ dir
- makes "make help" the default.
TT #1954
---
config/auto/perldoc.pm | 43 ------------------------------------------
config/gen/makefiles/docs.in | 31 ++++++-----------------------
config/gen/makefiles/root.in | 13 ------------
3 files changed, 7 insertions(+), 80 deletions(-)
diff --git a/config/auto/perldoc.pm b/config/auto/perldoc.pm
index 8ff8465..d210422 100644
a
|
b
|
|
46 | 46 | |
47 | 47 | _handle_version($conf, $version, $cmd); |
48 | 48 | |
49 | | my $TEMP_pod_build = <<'E_NOTE'; |
50 | | |
51 | | # the following part of the Makefile was built by 'config/auto/perldoc.pm' |
52 | | |
53 | | E_NOTE |
54 | | |
55 | | opendir my $OPS, 'src/ops' or die "opendir ops: $!"; |
56 | | my @ops = sort grep { !/^\./ && /\.ops$/ } readdir $OPS; |
57 | | closedir $OPS; |
58 | | |
59 | | my $TEMP_pod = join q{ } => |
60 | | map { my $t = $_; $t =~ s/\.ops$/.pod/; "ops/$t" } @ops; |
61 | | |
62 | | my $new_perldoc = $conf->data->get('new_perldoc'); |
63 | | |
64 | | foreach my $ops (@ops) { |
65 | | my $pod = $ops; |
66 | | $pod =~ s/\.ops$/.pod/; |
67 | | if ( $new_perldoc ) { |
68 | | $TEMP_pod_build .= <<"END" |
69 | | ops/$pod: ../src/ops/$ops |
70 | | \t\$(PERLDOC_BIN) -ud ops/$pod ../src/ops/$ops |
71 | | \t\$(CHMOD) 0644 ops/$pod |
72 | | |
73 | | END |
74 | | } |
75 | | else { |
76 | | $TEMP_pod_build .= <<"END" |
77 | | ops/$pod: ../src/ops/$ops |
78 | | \t\$(PERLDOC_BIN) -u ../ops/$ops > ops/$pod |
79 | | \t\$(CHMOD) 0644 ../ops/$pod |
80 | | |
81 | | END |
82 | | } |
83 | | } |
84 | | |
85 | | $conf->data->set( |
86 | | TEMP_pod => $TEMP_pod, |
87 | | TEMP_pod_build => $TEMP_pod_build, |
88 | | ); |
89 | | |
90 | 49 | return 1; |
91 | 50 | } |
92 | 51 | |
… |
… |
|
98 | 57 | has_perldoc => 0, |
99 | 58 | new_perldoc => 0, |
100 | 59 | perldoc => 'echo', |
101 | | TEMP_pod => '', |
102 | | TEMP_pod_build => '', |
103 | 60 | ); |
104 | 61 | $self->set_result('no'); |
105 | 62 | return; |
diff --git a/config/gen/makefiles/docs.in b/config/gen/makefiles/docs.in
index 4965daa..dfb2729 100644
a
|
b
|
|
10 | 10 | PERLDOC_BIN = @perldoc@ |
11 | 11 | VERSION = @VERSION@@DEVEL@ |
12 | 12 | |
13 | | # long list of .pod files |
14 | | POD = @TEMP_pod@ |
15 | | |
16 | 13 | # |
17 | 14 | # Targets |
18 | 15 | # |
19 | | |
20 | | # The default target |
21 | | all: packfile-c.pod $(POD) |
22 | | |
23 | 16 | # This is a listing of all targets, that are meant to be called by users |
24 | 17 | # Most of them are proxied in the root makefile parrot/Makefile |
25 | 18 | help : |
26 | 19 | @echo "" |
27 | | @echo "Following targets are available to the user:" |
| 20 | @echo "Following targets are available:" |
28 | 21 | @echo "" |
29 | | @echo "all: Generate documentation from .pod files or from the sources." |
| 22 | @echo "help Generate this usage statement." |
30 | 23 | @echo " This is the default target." |
31 | 24 | @echo "" |
| 25 | @echo "html Generate html documentation" |
| 26 | @echo "html-clean Remove html documentation" |
| 27 | @echo "" |
32 | 28 | @echo "htmlhelp: windows only, generate a .chm file." |
33 | 29 | @echo "htmlhelp-clean: Remove generated .chm" |
34 | 30 | @echo "" |
35 | 31 | @echo "pdf: Generate a PDF from the html docs" |
36 | 32 | @echo "pdf-clean: Remove generated pdf" |
37 | 33 | @echo "" |
38 | | @echo " clean: Remove the generated documentation." |
| 34 | @echo " clean: Invoke all clean targets" |
39 | 35 | @echo "" |
40 | 36 | |
41 | | $(POD): doc-prep |
42 | | |
43 | | doc-prep: |
44 | | $(MKPATH) ops |
45 | | $(TOUCH) doc-prep |
46 | | |
47 | | packfile-c.pod: ../src/packfile/api.c |
48 | | #IF(new_perldoc): $(PERLDOC_BIN) -ud packfile-c.pod ../src/packfile/api.c |
49 | | #ELSE: $(PERLDOC_BIN) -u ../src/packfile/api.c > packfile-c.pod |
50 | | |
51 | | clean: |
52 | | $(RM_F) packfile-c.pod $(POD) doc-prep |
| 37 | clean: htmlhelp-clean html-clean |
53 | 38 | |
54 | 39 | html: |
55 | 40 | $(PERL) -I../lib ../tools/docs/make_html_docs.pl --version=$(VERSION) |
… |
… |
|
78 | 63 | htmlhelp-clean: |
79 | 64 | #IF(win32): $(RM_F) "html/*.hhc" "html/*.hhk" "html/*.hhp" "html/*.chm" |
80 | 65 | |
81 | | @TEMP_pod_build@ |
82 | | |
83 | 66 | # Local variables: |
84 | 67 | # mode: makefile |
85 | 68 | # End: |
diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in
index 89cfbba..c205295 100644
a
|
b
|
|
757 | 757 | @echo "" |
758 | 758 | @echo "Documentation:" |
759 | 759 | @echo " help: Print this help message." |
760 | | @echo " docs: Generate documentation from POD in the sources." |
761 | 760 | @echo " html: Generate HTML documentation from POD in the sources." |
762 | 761 | @echo " html-clean: Remove the HTML documentation." |
763 | 762 | @echo " htmlhelp: Compile HTML documentation (CHM format)." |
… |
… |
|
1914 | 1913 | # |
1915 | 1914 | ############################################################################### |
1916 | 1915 | |
1917 | | #IF(has_perldoc):docs : docs.dummy |
1918 | | #ELSE:docs : docs.stub |
1919 | | |
1920 | | docs.stub: |
1921 | | @echo "Perldoc is required, but not detected." |
1922 | | |
1923 | | docs.dummy : |
1924 | | $(MAKE) docs |
1925 | | |
1926 | | docs-clean : |
1927 | | $(MAKE) docs clean |
1928 | | |
1929 | 1916 | #IF(has_perldoc):html : html.dummy |
1930 | 1917 | #ELSE:html : html.stub |
1931 | 1918 | |