diff --git a/MANIFEST b/MANIFEST index 70b203b..21fb98d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -223,9 +223,9 @@ config/gen/config_pm/config_pir.in [] config/gen/config_pm/myconfig.in [] config/gen/core_pmcs.pm [] config/gen/makefiles.pm [] -config/gen/makefiles/docs.in [] config/gen/makefiles/editor.in [] config/gen/makefiles/ext.in [] +config/gen/makefiles/html.in [] config/gen/makefiles/parrot_embed_pl.in [] config/gen/makefiles/parrot_pc.in [] config/gen/makefiles/root.in [] diff --git a/config/auto/perldoc.pm b/config/auto/perldoc.pm index 8ff8465..d210422 100644 --- a/config/auto/perldoc.pm +++ b/config/auto/perldoc.pm @@ -46,47 +46,6 @@ sub runstep { _handle_version($conf, $version, $cmd); - my $TEMP_pod_build = <<'E_NOTE'; - -# the following part of the Makefile was built by 'config/auto/perldoc.pm' - -E_NOTE - - opendir my $OPS, 'src/ops' or die "opendir ops: $!"; - my @ops = sort grep { !/^\./ && /\.ops$/ } readdir $OPS; - closedir $OPS; - - my $TEMP_pod = join q{ } => - map { my $t = $_; $t =~ s/\.ops$/.pod/; "ops/$t" } @ops; - - my $new_perldoc = $conf->data->get('new_perldoc'); - - foreach my $ops (@ops) { - my $pod = $ops; - $pod =~ s/\.ops$/.pod/; - if ( $new_perldoc ) { - $TEMP_pod_build .= <<"END" -ops/$pod: ../src/ops/$ops -\t\$(PERLDOC_BIN) -ud ops/$pod ../src/ops/$ops -\t\$(CHMOD) 0644 ops/$pod - -END - } - else { - $TEMP_pod_build .= <<"END" -ops/$pod: ../src/ops/$ops -\t\$(PERLDOC_BIN) -u ../ops/$ops > ops/$pod -\t\$(CHMOD) 0644 ../ops/$pod - -END - } - } - - $conf->data->set( - TEMP_pod => $TEMP_pod, - TEMP_pod_build => $TEMP_pod_build, - ); - return 1; } @@ -98,8 +57,6 @@ sub _initial_content_check { has_perldoc => 0, new_perldoc => 0, perldoc => 'echo', - TEMP_pod => '', - TEMP_pod_build => '', ); $self->set_result('no'); return; diff --git a/config/gen/makefiles.pm b/config/gen/makefiles.pm index 0be30c9..4de7a0e 100644 --- a/config/gen/makefiles.pm +++ b/config/gen/makefiles.pm @@ -15,7 +15,6 @@ package gen::makefiles; use strict; use warnings; - use base qw(Parrot::Configure::Step); use Parrot::Configure::Utils ':gen'; @@ -57,7 +56,7 @@ sub _init { { SOURCE => 'config/gen/makefiles/editor.in' }, 'parrot.pc' => { SOURCE => 'config/gen/makefiles/parrot_pc.in' }, - 'docs/Makefile' => { SOURCE => 'config/gen/makefiles/docs.in' }, + 'html/Makefile' => { SOURCE => 'config/gen/makefiles/html.in' }, }; return \%data; } @@ -85,7 +84,6 @@ sub makefiles { foreach my $target (@targets) { my $args = $self->{makefiles}->{$target}; my $source = delete $args->{SOURCE}; - $conf->genfile($source => $target, %$args ); } return; diff --git a/config/gen/makefiles/docs.in b/config/gen/makefiles/docs.in deleted file mode 100644 index 4965daa..0000000 --- a/config/gen/makefiles/docs.in +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) 2001-2010, Parrot Foundation. - -# Setup of some commands -PERL = @perl@ -CHMOD = @chmod@ -MKPATH = @mkpath@ -TOUCH = @touch@ -RM_F = @rm_f@ -RM_RF = @rm_rf@ -PERLDOC_BIN = @perldoc@ -VERSION = @VERSION@@DEVEL@ - -# long list of .pod files -POD = @TEMP_pod@ - -# -# Targets -# - -# The default target -all: packfile-c.pod $(POD) - -# This is a listing of all targets, that are meant to be called by users -# Most of them are proxied in the root makefile parrot/Makefile -help : - @echo "" - @echo "Following targets are available to the user:" - @echo "" - @echo "all: Generate documentation from .pod files or from the sources." - @echo " This is the default target." - @echo "" - @echo "htmlhelp: windows only, generate a .chm file." - @echo "htmlhelp-clean: Remove generated .chm" - @echo "" - @echo "pdf: Generate a PDF from the html docs" - @echo "pdf-clean: Remove generated pdf" - @echo "" - @echo " clean: Remove the generated documentation." - @echo "" - -$(POD): doc-prep - -doc-prep: - $(MKPATH) ops - $(TOUCH) doc-prep - -packfile-c.pod: ../src/packfile/api.c -#IF(new_perldoc): $(PERLDOC_BIN) -ud packfile-c.pod ../src/packfile/api.c -#ELSE: $(PERLDOC_BIN) -u ../src/packfile/api.c > packfile-c.pod - -clean: - $(RM_F) packfile-c.pod $(POD) doc-prep - -html: - $(PERL) -I../lib ../tools/docs/make_html_docs.pl --version=$(VERSION) -html-clean: - $(RM_RF) html - -# If you are missing the command 'pdflatex' then you have first to install a -# LaTeX distribution with it. For Windows and UNIX downloads are for example -# available from: http://miktex.org, http://tug.org/texlive or -# http://www.ctan.org -pdf: ../tools/docs/filename_and_chapter.pl - $(MKPATH) build/modified_pod - $(PERL) ../tools/docs/filename_and_chapter.pl - cd build && pdflatex parrot-book.tex && pdflatex parrot-book.tex - -#pdf-release: build/parrot-book.pdf -# cp build/parrot-book.pdf build/parrot-book-$$(date +"%Y.%m").pdf - -pdf-clean: - $(RM_RF) build - -htmlhelp: html -#IF(win32): cd .. && $(PERL) tools/docs/mk_chm.pl -#IF(win32): -cd html && hhc parrot.hhp - -htmlhelp-clean: -#IF(win32): $(RM_F) "html/*.hhc" "html/*.hhk" "html/*.hhp" "html/*.chm" - -@TEMP_pod_build@ - -# Local variables: -# mode: makefile -# End: -# vim: ft=make: diff --git a/config/gen/makefiles/html.in b/config/gen/makefiles/html.in new file mode 100644 index 0000000..d1cbb2b --- /dev/null +++ b/config/gen/makefiles/html.in @@ -0,0 +1,71 @@ +# Copyright (C) 2001-2010, Parrot Foundation. + +# Setup of some commands +PERL = @perl@ +CHMOD = @chmod@ +MKPATH = @mkpath@ +TOUCH = @touch@ +RM_F = @rm_f@ +RM_RF = @rm_rf@ +PERLDOC_BIN = @perldoc@ +VERSION = @VERSION@@DEVEL@ + + +# +# Targets +# + +# The default target +all: html + +html: + $(PERL) -I../lib ../tools/docs/make_html_docs.pl --version=$(VERSION) +html-clean: + $(RM_RF) html + +clean: html-clean + +htmlhelp: html +#IF(win32): cd .. && $(PERL) tools/docs/mk_chm.pl +#IF(win32): -cd html && hhc parrot.hhp + +htmlhelp-clean: +#IF(win32): $(RM_F) "html/*.hhc" "html/*.hhk" "html/*.hhp" "html/*.chm" + +# This is a listing of all targets, that are meant to be called by users +# Most of them are proxied in the root makefile parrot/Makefile +help : + @echo "" + @echo "Following targets are available to the user:" + @echo "" + @echo "all: Generate .html documentation." + @echo " This is the default target." + @echo "" + @echo "htmlhelp: windows only, generate a .chm file." + @echo "htmlhelp-clean: Remove generated .chm" + @echo "" + @echo "pdf: Generate a PDF from the html docs" + @echo "pdf-clean: Remove generated pdf" + @echo "" + @echo " clean: Remove the generated documentation." + @echo "" + +# If you are missing the command 'pdflatex' then you have first to install a +# LaTeX distribution with it. For Windows and UNIX downloads are for example +# available from: http://miktex.org, http://tug.org/texlive or +# http://www.ctan.org +pdf: ../tools/docs/filename_and_chapter.pl + $(MKPATH) build/modified_pod + $(PERL) ../tools/docs/filename_and_chapter.pl + cd build && pdflatex parrot-book.tex && pdflatex parrot-book.tex + +#pdf-release: build/parrot-book.pdf +# cp build/parrot-book.pdf build/parrot-book-$$(date +"%Y.%m").pdf + +pdf-clean: + $(RM_RF) build + +# Local variables: +# mode: makefile +# End: +# vim: ft=make: diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in index 6655eaf..1b01e16 100644 --- a/config/gen/makefiles/root.in +++ b/config/gen/makefiles/root.in @@ -145,7 +145,7 @@ include compilers/data_json/Defines.mak GEN_MAKEFILES = \ Makefile \ - docs/Makefile \ + html/Makefile \ editor/Makefile \ ext/Makefile \ src/dynoplibs/Rules.mak \ @@ -606,7 +606,6 @@ MAKE = @make_c@ all : \ corevm \ - docs \ #IF(has_glut): $(LIBGLUTCB_SO) \ #IF(has_dynamic_linking): $(EXTRANCITHUNKS_SO) \ $(DIS) \ @@ -754,7 +753,6 @@ help : @echo "" @echo "Documentation:" @echo " help: Print this help message." - @echo " docs: Generate documentation from POD in the sources." @echo " html: Generate HTML documentation from POD in the sources." @echo " html-clean: Remove the HTML documentation." @echo " htmlhelp: Compile HTML documentation (CHM format)." @@ -1889,18 +1887,6 @@ $(INC_DIR)/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_h.pl lib/Parrot/V # ############################################################################### -#IF(has_perldoc):docs : docs.dummy -#ELSE:docs : docs.stub - -docs.stub: - @echo "Perldoc is required, but not detected." - -docs.dummy : - $(MAKE) docs - -docs-clean : - $(MAKE) docs clean - #IF(has_perldoc):html : html.dummy #ELSE:html : html.stub @@ -1908,10 +1894,10 @@ html.stub: @echo "Perldoc is required, but not detected." html.dummy : - $(MAKE) docs html + $(MAKE) html html html-clean : - $(MAKE) docs html-clean + $(MAKE) html html-clean #IF(has_perldoc):htmlhelp : htmlhelp.dummy #ELSE:htmlhelp : htmlhelp.stub @@ -1920,16 +1906,16 @@ htmlhelp.stub: @echo "Perldoc is required, but not detected." htmlhelp.dummy : - $(MAKE) docs htmlhelp + $(MAKE) html htmlhelp htmlhelp-clean : - $(MAKE) docs htmlhelp-clean + $(MAKE) html htmlhelp-clean pdf: - $(MAKE) docs pdf + $(MAKE) html pdf pdf-clean: - $(MAKE) docs pdf-clean + $(MAKE) html pdf-clean ############################################################################### # @@ -2204,7 +2190,6 @@ clean : \ test-clean \ prog-clean \ dynext-clean \ -#IF(has_perldoc): docs-clean \ #IF(has_perldoc): html-clean \ examples-clean \ ext-clean \