null+****@clear*****
null+****@clear*****
2011年 5月 18日 (水) 17:10:59 JST
Kouhei Sutou 2011-05-18 08:10:59 +0000 (Wed, 18 May 2011) New Revision: dd0858721af94def91c4dcc3f21d7051e8325c66 Log: [doc] support 'make dist'. Modified files: build/makefiles/gettext.mk build/makefiles/sphinx.mk doc/Makefile.am doc/locale/Makefile.am Modified: build/makefiles/gettext.mk (+4 -0) =================================================================== --- build/makefiles/gettext.mk 2011-05-18 08:09:52 +0000 (a212835) +++ build/makefiles/gettext.mk 2011-05-18 08:10:59 +0000 (86c8708) @@ -1,6 +1,10 @@ include $(abs_top_srcdir)/build/makefiles/gettext-files.mk include $(abs_top_srcdir)/build/makefiles/sphinx-build.mk +EXTRA_DIST += \ + $(po_files) \ + $(mo_files) + .PHONY: gettext update build all: build Modified: build/makefiles/sphinx.mk (+192 -23) =================================================================== --- build/makefiles/sphinx.mk 2011-05-18 08:09:52 +0000 (3e6db66) +++ build/makefiles/sphinx.mk 2011-05-18 08:10:59 +0000 (f2657cd) @@ -1,11 +1,17 @@ +NULL = + +all: html man + include $(abs_top_srcdir)/build/makefiles/sphinx-build.mk include $(abs_top_srcdir)/build/makefiles/gettext-files.mk document_source_files = \ - $(source_fiele) \ + $(source_files) \ $(mo_files_relative_from_locale_dir) -.PHONY: help clean man html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest +.PHONY: help clean +.PHONY: man generate-man +.PHONY: html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest help: @echo "Please use \`make <target>' where <target> is one of" @@ -43,36 +49,41 @@ clean-local: clean-doctree -rm -rf doctest -rm -rf pdf -man: sphinx-ensure-updated man/groonga.1 - -man/groonga.1: $(document_source_files) +man: generate-man +generate-man: man-build-stamp +man-build-stamp: $(document_source_files) + $(MAKE) sphinx-ensure-updated $(SPHINX_BUILD_COMMAND) \ -Dlanguage=$(LOCALE) \ -d $(DOCTREES_BASE)/man \ -b man \ $(ALLSPHINXOPTS) \ man + @touch $@ html: generate-html -generate-html: sphinx-ensure-updated html/index.html - -html/index.html: $(document_source_files) +generate-html: html-build-stamp +html-build-stamp: $(document_source_files) + $(MAKE) sphinx-ensure-updated $(SPHINX_BUILD_COMMAND) \ -Dlanguage=$(LOCALE) \ -d $(DOCTREES_BASE)/html \ -b html \ $(ALLSPHINXOPTS) \ html + @touch $@ -dirhtml: sphinx-ensure-updated dirhtml/index.html - -dirhtml/index.html: $(document_source_files) +dirhtml: generate-dirhtml +generate-dirhtml: dirhtml-build-stamp +dirhtml-build-stamp: $(document_source_files) + $(MAKE) sphinx-ensure-updated $(SPHINX_BUILD_COMMAND) \ -Dlanguage=$(LOCALE) \ -d $(DOCTREES_BASE)/dirhtml \ -b dirhtml \ $(ALLSPHINXOPTS) \ dirhtml + @touch $@ pickle: sphinx-ensure-updated pickle/index.fpickle @@ -180,23 +191,181 @@ pdf: sphinx-ensure-updated $(ALLSPHINXOPTS) \ pdf -if ENABLE_DOCUMENT -dist-hook: - @touch $(distdir)/man-build-stamp - @touch $(distdir)/html-build-stamp +EXTRA_DIST = \ + html-build-stamp \ + man-build-stamp +if ENABLE_DOCUMENT dist_man1_MANS = \ man/groonga.1 -$(dist_man1_MANS): man-build-stamp -man-build-stamp: - $(MAKE) man - nobase_dist_doc_DATA = \ - $(source_files) \ $(html_files) -$(html_files): html-build-stamp -html-build-stamp: - $(MAKE) html +# (cd ../../doc/locale/en; echo "html_files = \\"; find html -type f | sort | sed -e 's,^,\t,' -e 's,$, \\,'; echo "\t\$(NULL)") +html_files = \ + html/.buildinfo \ + html/_sources/characteristic.txt \ + html/_sources/command_version.txt \ + html/_sources/commands.txt \ + html/_sources/commands/cache_limit.txt \ + html/_sources/commands/check.txt \ + html/_sources/commands/clearlock.txt \ + html/_sources/commands/column_create.txt \ + html/_sources/commands/column_list.txt \ + html/_sources/commands/column_remove.txt \ + html/_sources/commands/define_selector.txt \ + html/_sources/commands/defrag.txt \ + html/_sources/commands/delete.txt \ + html/_sources/commands/dump.txt \ + html/_sources/commands/load.txt \ + html/_sources/commands/log_level.txt \ + html/_sources/commands/log_put.txt \ + html/_sources/commands/log_reopen.txt \ + html/_sources/commands/quit.txt \ + html/_sources/commands/select.txt \ + html/_sources/commands/shutdown.txt \ + html/_sources/commands/status.txt \ + html/_sources/commands/suggest.txt \ + html/_sources/commands/table_create.txt \ + html/_sources/commands/table_list.txt \ + html/_sources/commands/table_remove.txt \ + html/_sources/commands/view_add.txt \ + html/_sources/commands_not_implemented/add.txt \ + html/_sources/commands_not_implemented/get.txt \ + html/_sources/commands_not_implemented/set.txt \ + html/_sources/developer.txt \ + html/_sources/developer/com.txt \ + html/_sources/developer/document.txt \ + html/_sources/developer/query.txt \ + html/_sources/developer/test.txt \ + html/_sources/execfile.txt \ + html/_sources/expr.txt \ + html/_sources/functions.txt \ + html/_sources/functions/edit_distance.txt \ + html/_sources/functions/geo_distance.txt \ + html/_sources/functions/geo_in_circle.txt \ + html/_sources/functions/geo_in_rectangle.txt \ + html/_sources/functions/now.txt \ + html/_sources/functions/rand.txt \ + html/_sources/grnslap.txt \ + html/_sources/grntest.txt \ + html/_sources/http.txt \ + html/_sources/index.txt \ + html/_sources/install.txt \ + html/_sources/limitations.txt \ + html/_sources/news.txt \ + html/_sources/process.txt \ + html/_sources/pseudo_column.txt \ + html/_sources/reference.txt \ + html/_sources/spec.txt \ + html/_sources/spec/search.txt \ + html/_sources/troubleshooting.txt \ + html/_sources/troubleshooting/different_results_with_the_same_keyword.txt \ + html/_sources/tutorial.txt \ + html/_sources/tutorial/tutorial01.txt \ + html/_sources/tutorial/tutorial02.txt \ + html/_sources/tutorial/tutorial03.txt \ + html/_sources/tutorial/tutorial04.txt \ + html/_sources/tutorial/tutorial05.txt \ + html/_sources/tutorial/tutorial06.txt \ + html/_sources/tutorial/tutorial07.txt \ + html/_sources/tutorial/tutorial08.txt \ + html/_sources/tutorial/tutorial09.txt \ + html/_sources/tutorial/tutorial10.txt \ + html/_sources/type.txt \ + html/_static/ajax-loader.gif \ + html/_static/basic.css \ + html/_static/comment-bright.png \ + html/_static/comment-close.png \ + html/_static/comment.png \ + html/_static/default.css \ + html/_static/doctools.js \ + html/_static/down-pressed.png \ + html/_static/down.png \ + html/_static/file.png \ + html/_static/jquery.js \ + html/_static/minus.png \ + html/_static/plus.png \ + html/_static/pygments.css \ + html/_static/searchtools.js \ + html/_static/sidebar.js \ + html/_static/underscore.js \ + html/_static/up-pressed.png \ + html/_static/up.png \ + html/_static/websupport.js \ + html/characteristic.html \ + html/command_version.html \ + html/commands.html \ + html/commands/cache_limit.html \ + html/commands/check.html \ + html/commands/clearlock.html \ + html/commands/column_create.html \ + html/commands/column_list.html \ + html/commands/column_remove.html \ + html/commands/define_selector.html \ + html/commands/defrag.html \ + html/commands/delete.html \ + html/commands/dump.html \ + html/commands/load.html \ + html/commands/log_level.html \ + html/commands/log_put.html \ + html/commands/log_reopen.html \ + html/commands/quit.html \ + html/commands/select.html \ + html/commands/shutdown.html \ + html/commands/status.html \ + html/commands/suggest.html \ + html/commands/table_create.html \ + html/commands/table_list.html \ + html/commands/table_remove.html \ + html/commands/view_add.html \ + html/commands_not_implemented/add.html \ + html/commands_not_implemented/get.html \ + html/commands_not_implemented/set.html \ + html/developer.html \ + html/developer/com.html \ + html/developer/document.html \ + html/developer/query.html \ + html/developer/test.html \ + html/execfile.html \ + html/expr.html \ + html/functions.html \ + html/functions/edit_distance.html \ + html/functions/geo_distance.html \ + html/functions/geo_in_circle.html \ + html/functions/geo_in_rectangle.html \ + html/functions/now.html \ + html/functions/rand.html \ + html/genindex.html \ + html/grnslap.html \ + html/grntest.html \ + html/http.html \ + html/index.html \ + html/install.html \ + html/limitations.html \ + html/news.html \ + html/objects.inv \ + html/process.html \ + html/pseudo_column.html \ + html/reference.html \ + html/search.html \ + html/searchindex.js \ + html/spec.html \ + html/spec/search.html \ + html/troubleshooting.html \ + html/troubleshooting/different_results_with_the_same_keyword.html \ + html/tutorial.html \ + html/tutorial/tutorial01.html \ + html/tutorial/tutorial02.html \ + html/tutorial/tutorial03.html \ + html/tutorial/tutorial04.html \ + html/tutorial/tutorial05.html \ + html/tutorial/tutorial06.html \ + html/tutorial/tutorial07.html \ + html/tutorial/tutorial08.html \ + html/tutorial/tutorial09.html \ + html/tutorial/tutorial10.html \ + html/type.html \ + $(NULL) endif Modified: doc/Makefile.am (+151 -175) =================================================================== --- doc/Makefile.am 2011-05-18 08:09:52 +0000 (7c82aa9) +++ doc/Makefile.am 2011-05-18 08:10:59 +0000 (c9e1bf0) @@ -1,187 +1,163 @@ SUBDIRS = \ locale -docdir = $(pkgdatadir)/doc +NULL = + +all: include $(abs_top_srcdir)/build/makefiles/sphinx-build.mk update-examples: GROONGA=$(GROONGA) $(srcdir)/source/update_execution_example.py -if ENABLE_DOCUMENT -dist-hook: - @touch $(distdir)/man-build-stamp - @touch $(distdir)/html-build-stamp - -dist_man1_MANS = \ - man/groonga.1 - -$(dist_man1_MANS): man-build-stamp -man-build-stamp: - $(MAKE) man +man: + for dir in $(SUBDIRS); do \ + (cd $${dir} && $(MAKE) man); \ + done +if ENABLE_DOCUMENT +dist-hook: html man + @touch $(distdir)/build-stamp nobase_dist_doc_DATA = \ - $(source_files) \ - $(html_files) - -# find html -type f | sort | sed -e 's,^,\t,g' -html_files = \ - html/.buildinfo \ - html/_sources/characteristic.txt \ - html/_sources/command_version.txt \ - html/_sources/commands.txt \ - html/_sources/commands/cache_limit.txt \ - html/_sources/commands/check.txt \ - html/_sources/commands/clearlock.txt \ - html/_sources/commands/column_create.txt \ - html/_sources/commands/column_list.txt \ - html/_sources/commands/column_remove.txt \ - html/_sources/commands/define_selector.txt \ - html/_sources/commands/defrag.txt \ - html/_sources/commands/delete.txt \ - html/_sources/commands/dump.txt \ - html/_sources/commands/load.txt \ - html/_sources/commands/log_level.txt \ - html/_sources/commands/log_put.txt \ - html/_sources/commands/log_reopen.txt \ - html/_sources/commands/quit.txt \ - html/_sources/commands/select.txt \ - html/_sources/commands/shutdown.txt \ - html/_sources/commands/status.txt \ - html/_sources/commands/suggest.txt \ - html/_sources/commands/table_create.txt \ - html/_sources/commands/table_list.txt \ - html/_sources/commands/table_remove.txt \ - html/_sources/commands/view_add.txt \ - html/_sources/commands_not_implemented/add.txt \ - html/_sources/commands_not_implemented/get.txt \ - html/_sources/commands_not_implemented/set.txt \ - html/_sources/developer.txt \ - html/_sources/developer/com.txt \ - html/_sources/developer/document.txt \ - html/_sources/developer/query.txt \ - html/_sources/developer/test.txt \ - html/_sources/execfile.txt \ - html/_sources/expr.txt \ - html/_sources/functions.txt \ - html/_sources/functions/edit_distance.txt \ - html/_sources/functions/geo_distance.txt \ - html/_sources/functions/geo_in_circle.txt \ - html/_sources/functions/geo_in_rectangle.txt \ - html/_sources/functions/now.txt \ - html/_sources/functions/rand.txt \ - html/_sources/grnslap.txt \ - html/_sources/grntest.txt \ - html/_sources/http.txt \ - html/_sources/index.txt \ - html/_sources/install.txt \ - html/_sources/limitations.txt \ - html/_sources/news.txt \ - html/_sources/process.txt \ - html/_sources/pseudo_column.txt \ - html/_sources/reference.txt \ - html/_sources/spec.txt \ - html/_sources/spec/search.txt \ - html/_sources/troubleshooting.txt \ - html/_sources/troubleshooting/different_results_with_the_same_keyword.txt \ - html/_sources/tutorial.txt \ - html/_sources/tutorial/tutorial01.txt \ - html/_sources/tutorial/tutorial02.txt \ - html/_sources/tutorial/tutorial03.txt \ - html/_sources/tutorial/tutorial04.txt \ - html/_sources/tutorial/tutorial05.txt \ - html/_sources/tutorial/tutorial06.txt \ - html/_sources/tutorial/tutorial07.txt \ - html/_sources/tutorial/tutorial08.txt \ - html/_sources/tutorial/tutorial09.txt \ - html/_sources/tutorial/tutorial10.txt \ - html/_sources/type.txt \ - html/_static/basic.css \ - html/_static/default.css \ - html/_static/doctools.js \ - html/_static/file.png \ - html/_static/jquery.js \ - html/_static/minus.png \ - html/_static/plus.png \ - html/_static/pygments.css \ - html/_static/searchtools.js \ - html/_static/sidebar.js \ - html/_static/underscore.js \ - html/characteristic.html \ - html/command_version.html \ - html/commands.html \ - html/commands/cache_limit.html \ - html/commands/check.html \ - html/commands/clearlock.html \ - html/commands/column_create.html \ - html/commands/column_list.html \ - html/commands/column_remove.html \ - html/commands/define_selector.html \ - html/commands/defrag.html \ - html/commands/delete.html \ - html/commands/dump.html \ - html/commands/load.html \ - html/commands/log_level.html \ - html/commands/log_put.html \ - html/commands/log_reopen.html \ - html/commands/quit.html \ - html/commands/select.html \ - html/commands/shutdown.html \ - html/commands/status.html \ - html/commands/suggest.html \ - html/commands/table_create.html \ - html/commands/table_list.html \ - html/commands/table_remove.html \ - html/commands/view_add.html \ - html/commands_not_implemented/add.html \ - html/commands_not_implemented/get.html \ - html/commands_not_implemented/set.html \ - html/developer.html \ - html/developer/com.html \ - html/developer/document.html \ - html/developer/query.html \ - html/developer/test.html \ - html/execfile.html \ - html/expr.html \ - html/functions.html \ - html/functions/edit_distance.html \ - html/functions/geo_distance.html \ - html/functions/geo_in_circle.html \ - html/functions/geo_in_rectangle.html \ - html/functions/now.html \ - html/functions/rand.html \ - html/genindex.html \ - html/grnslap.html \ - html/grntest.html \ - html/http.html \ - html/index.html \ - html/install.html \ - html/limitations.html \ - html/news.html \ - html/objects.inv \ - html/process.html \ - html/pseudo_column.html \ - html/reference.html \ - html/search.html \ - html/searchindex.js \ - html/spec.html \ - html/spec/search.html \ - html/troubleshooting.html \ - html/troubleshooting/different_results_with_the_same_keyword.html \ - html/tutorial.html \ - html/tutorial/tutorial01.html \ - html/tutorial/tutorial02.html \ - html/tutorial/tutorial03.html \ - html/tutorial/tutorial04.html \ - html/tutorial/tutorial05.html \ - html/tutorial/tutorial06.html \ - html/tutorial/tutorial07.html \ - html/tutorial/tutorial08.html \ - html/tutorial/tutorial09.html \ - html/tutorial/tutorial10.html \ - html/type.html - -$(html_files): html-build-stamp -html-build-stamp: - $(MAKE) html + $(relative_source_files) +else +dist-hook: + @echo "must specify --enable-document for 'make dist'" + @false endif + +# (echo "relative_source_files = \\"; find source -type f -not -name '*.pyc' | sort | sed -e 's,^,\t,' -e 's,$, \\,'; echo "\t\$(NULL)") +relative_source_files = \ + source/__init__.py \ + source/characteristic.txt \ + source/command_version.txt \ + source/commands.txt \ + source/commands/cache_limit.txt \ + source/commands/check.txt \ + source/commands/clearlock.txt \ + source/commands/column_create.txt \ + source/commands/column_list.txt \ + source/commands/column_remove.txt \ + source/commands/define_selector.txt \ + source/commands/defrag.txt \ + source/commands/delete.txt \ + source/commands/dump.txt \ + source/commands/load.txt \ + source/commands/log_level.txt \ + source/commands/log_put.txt \ + source/commands/log_reopen.txt \ + source/commands/quit.txt \ + source/commands/select.txt \ + source/commands/shutdown.txt \ + source/commands/status.txt \ + source/commands/suggest.txt \ + source/commands/table_create.txt \ + source/commands/table_list.txt \ + source/commands/table_remove.txt \ + source/commands/view_add.txt \ + source/commands_not_implemented/add.txt \ + source/commands_not_implemented/get.txt \ + source/commands_not_implemented/set.txt \ + source/conf.py \ + source/developer.txt \ + source/developer/com.txt \ + source/developer/document.txt \ + source/developer/query.txt \ + source/developer/test.txt \ + source/example/tutorial01-1.log \ + source/example/tutorial01-10.log \ + source/example/tutorial01-11.log \ + source/example/tutorial01-12.log \ + source/example/tutorial01-13.log \ + source/example/tutorial01-14.log \ + source/example/tutorial01-15.log \ + source/example/tutorial01-16.log \ + source/example/tutorial01-17.log \ + source/example/tutorial01-2.log \ + source/example/tutorial01-3.log \ + source/example/tutorial01-4.log \ + source/example/tutorial01-5.log \ + source/example/tutorial01-6.log \ + source/example/tutorial01-7.log \ + source/example/tutorial01-8.log \ + source/example/tutorial01-9.log \ + source/example/tutorial02-1.log \ + source/example/tutorial02-2.log \ + source/example/tutorial02-3.log \ + source/example/tutorial03-1.log \ + source/example/tutorial03-2.log \ + source/example/tutorial03-3.log \ + source/example/tutorial04-1.log \ + source/example/tutorial04-2.log \ + source/example/tutorial04-3.log \ + source/example/tutorial04-4.log \ + source/example/tutorial04-5.log \ + source/example/tutorial04-6.log \ + source/example/tutorial04-7.log \ + source/example/tutorial05-1.log \ + source/example/tutorial05-2.log \ + source/example/tutorial05-3.log \ + source/example/tutorial05-4.log \ + source/example/tutorial05-5.log \ + source/example/tutorial05-6.log \ + source/example/tutorial06-1.log \ + source/example/tutorial06-2.log \ + source/example/tutorial06-3.log \ + source/example/tutorial06-4.log \ + source/example/tutorial06-5.log \ + source/example/tutorial06-6.log \ + source/example/tutorial06-7.log \ + source/example/tutorial07-1.log \ + source/example/tutorial07-2.log \ + source/example/tutorial07-3.log \ + source/example/tutorial07-4.log \ + source/example/tutorial08-1.log \ + source/example/tutorial10-1.log \ + source/example/tutorial10-10.log \ + source/example/tutorial10-2.log \ + source/example/tutorial10-3.log \ + source/example/tutorial10-4.log \ + source/example/tutorial10-5.log \ + source/example/tutorial10-6.log \ + source/example/tutorial10-7.log \ + source/example/tutorial10-8.log \ + source/example/tutorial10-9.log \ + source/execfile.txt \ + source/expr.txt \ + source/functions.txt \ + source/functions/edit_distance.txt \ + source/functions/geo_distance.txt \ + source/functions/geo_in_circle.txt \ + source/functions/geo_in_rectangle.txt \ + source/functions/now.txt \ + source/functions/rand.txt \ + source/grnslap.txt \ + source/grntest.txt \ + source/http.txt \ + source/index.txt \ + source/install.txt \ + source/limitations.txt \ + source/news.txt \ + source/process.txt \ + source/pseudo_column.txt \ + source/rdoc.py \ + source/reference.txt \ + source/spec.txt \ + source/spec/search.txt \ + source/textile.py \ + source/troubleshooting.txt \ + source/troubleshooting/different_results_with_the_same_keyword.txt \ + source/tutorial.txt \ + source/tutorial/tutorial01.txt \ + source/tutorial/tutorial02.txt \ + source/tutorial/tutorial03.txt \ + source/tutorial/tutorial04.txt \ + source/tutorial/tutorial05.txt \ + source/tutorial/tutorial06.txt \ + source/tutorial/tutorial07.txt \ + source/tutorial/tutorial08.txt \ + source/tutorial/tutorial09.txt \ + source/tutorial/tutorial10.txt \ + source/type.txt \ + source/update_execution_example.py \ + $(NULL) Modified: doc/locale/Makefile.am (+4 -0) =================================================================== --- doc/locale/Makefile.am 2011-05-18 08:09:52 +0000 (aa5cd8e) +++ doc/locale/Makefile.am 2011-05-18 08:10:59 +0000 (dcd0cab) @@ -24,3 +24,7 @@ add: a \ \ doc\/locale\/$(LOCALE)\/LC_MESSAGES\/Makefile" \ $(top_srcdir)/configure.ac +man: + for dir in $(SUBDIRS); do \ + (cd $${dir} && $(MAKE) man); \ + done