[Groonga-commit] groonga/groonga [master] Support 'make dist' with --disable-document

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 6日 (火) 22:59:12 JST


Kouhei Sutou	2012-03-06 22:59:12 +0900 (Tue, 06 Mar 2012)

  New Revision: 9615229e4c3dff49b1bbb99262145ae6e6a07c08

  Log:
    Support 'make dist' with --disable-document

  Modified files:
    build/makefiles/gettext.am
    build/makefiles/sphinx-build.am
    build/makefiles/sphinx.am
    configure.ac
    doc/Makefile.am
    doc/locale/en/Makefile.am
    doc/locale/ja/Makefile.am

  Modified: build/makefiles/gettext.am (+13 -4)
===================================================================
--- build/makefiles/gettext.am    2012-03-06 19:15:40 +0900 (6f56598)
+++ build/makefiles/gettext.am    2012-03-06 22:59:12 +0900 (c397e1e)
@@ -1,14 +1,18 @@
 include $(top_srcdir)/doc/files.am
 include $(top_srcdir)/build/makefiles/sphinx-build.am
 
-if WITH_HG
-BUILT_SOURCES +=				\
+EXTRA_DIST +=					\
+	$(po_files)
+
+if DOCUMENT_AVAILABLE
+EXTRA_DIST +=					\
 	$(mo_files)
 endif
 
-EXTRA_DIST +=					\
-	$(po_files)				\
+if DOCUMENT_BUILDABLE
+BUILT_SOURCES +=				\
 	$(mo_files)
+endif
 
 SUFFIXES += .pot .po .mo
 
@@ -22,7 +26,12 @@ all:
 	msgfmt -o $@ $<
 
 update: pot-build-stamp $(po_files)
+
+if DOCUMENT_BUILDABLE
 build: $(mo_files)
+else
+build:
+endif
 
 html: build
 man: build

  Modified: build/makefiles/sphinx-build.am (+1 -1)
===================================================================
--- build/makefiles/sphinx-build.am    2012-03-06 19:15:40 +0900 (4200998)
+++ build/makefiles/sphinx-build.am    2012-03-06 22:59:12 +0900 (0a1c895)
@@ -16,7 +16,7 @@ SPHINX_BUILD_COMMAND = LOCALE="$(LOCALE)" PYTHONPATH="$(SPHINX_DIR):$$PYTHONPATH
 
 .PHONY: sphinx-ensure-updated
 
-if WITH_HG
+if DOCUMENT_BUILDABLE
 sphinx-ensure-updated:
 	if ! $(SPHINX_BUILD_COMMAND) 2>&1 | head -1 | grep 'v1.[2]' -q > /dev/null; then \
 	  (cd $(SPHINX_DIR) && $(HG) pull --update);					 \

  Modified: build/makefiles/sphinx.am (+9 -2)
===================================================================
--- build/makefiles/sphinx.am    2012-03-06 19:15:40 +0900 (72681ef)
+++ build/makefiles/sphinx.am    2012-03-06 22:59:12 +0900 (d2652d2)
@@ -5,10 +5,13 @@ $(html_files): html-build-stamp
 $(html_files_relative_from_locale_dir): html-build-stamp
 $(man_files): man-build-stamp
 
-if ENABLE_DOCUMENT
+am__nobase_dist_doc_locale_DATA_DIST =
+if DOCUMENT_AVAILABLE
 doc_localedir = $(docdir)/$(LOCALE)
 nobase_dist_doc_locale_DATA =			\
 	$(html_files_relative_from_locale_dir)
+am__nobase_dist_doc_locale_DATA_DIST +=	\
+	$(nobase_dist_doc_locale_DATA)
 endif
 
 document_source_files =				\
@@ -22,7 +25,9 @@ required_build_stamps =				\
 	man-build-stamp				\
 	mo-build-stamp
 
+if DOCUMENT_BUILDABLE
 EXTRA_DIST += $(required_build_stamps)
+endif
 
 man_files =					\
 	man/groonga.1
@@ -59,7 +64,7 @@ mo-build-stamp: $(po_files_relative_from_locale_dir)
 	cd LC_MESSAGES && $(MAKE) build
 	@touch $@
 
-if WITH_HG
+if DOCUMENT_BUILDABLE
 clean-local: $(clean_targets) clean-doctrees
 
 clean-doctrees:
@@ -83,6 +88,7 @@ endif
 .PHONY: linkcheck
 .PHONY: doctest
 
+if DOCUMENT_BUILDABLE
 help:
 	@echo "Please use \`make <target>' where <target> is one of"
 	@echo "  man       to make man files"
@@ -171,3 +177,4 @@ latex-message: latex-build-stamp
 	@echo "Build finished; the LaTeX files are in latex/*."
 	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
 	      "run these through (pdf)latex."
+endif

  Modified: configure.ac (+18 -2)
===================================================================
--- configure.ac    2012-03-06 19:15:40 +0900 (a573560)
+++ configure.ac    2012-03-06 22:59:12 +0900 (1834970)
@@ -965,13 +965,17 @@ AC_ARG_ENABLE(document,
 AC_MSG_RESULT($enable_document)
 
 document_available=no
+document_buildable=no
+have_built_document=no
 if test x"$enable_document" != x"no"; then
   AC_PATH_PROG(HG, hg, [])
   if test -n "$HG"; then
     document_available=yes
+    document_buildable=yes
   else
     if test -f "$srcdir/doc/build-stamp"; then
       document_available=yes
+      have_built_document=yes
     else
       if test x"$enable_document" = x"yes"; then
 	AC_MSG_ERROR("No hg found")
@@ -983,11 +987,21 @@ fi
 
 AM_CONDITIONAL([WITH_HG], [test -n "${HG}"])
 
-AM_CONDITIONAL([ENABLE_DOCUMENT],
+AM_CONDITIONAL([DOCUMENT_AVAILABLE],
                [test "${document_available}" = "yes"])
 AC_MSG_CHECKING([whether document available])
 AC_MSG_RESULT($document_available)
 
+AM_CONDITIONAL([DOCUMENT_BUILDABLE],
+               [test "${document_buildable}" = "yes"])
+AC_MSG_CHECKING([whether document buildable])
+AC_MSG_RESULT($document_buildable)
+
+AM_CONDITIONAL([HAVE_BUILT_DOCUMENT],
+               [test "${have_built_document}" = "yes"])
+AC_MSG_CHECKING([whether having built document])
+AC_MSG_RESULT($have_built_document)
+
 # Munin plugins
 AC_MSG_CHECKING([whether install munin plugins])
 AC_ARG_WITH(munin-plugins,
@@ -1109,7 +1123,9 @@ echo "  Compiler:              ${CC}"
 echo "  CFLAGS:                ${CFLAGS}"
 echo "  CXXFLAGS:              ${CXXFLAGS}"
 echo "  Libraries:             ${LIBS}"
-echo "  Documentation:         ${document_available}"
+echo "  Document:              ${document_available}"
+echo "    buildable:           ${document_buildable}"
+echo "    built:               ${have_built_document}"
 echo "  Munin plugins:         ${install_munin_plugins}"
 echo "  Package platform:      ${package_platform}"
 echo

  Modified: doc/Makefile.am (+2 -4)
===================================================================
--- doc/Makefile.am    2012-03-06 19:15:40 +0900 (7c33bf8)
+++ doc/Makefile.am    2012-03-06 22:59:12 +0900 (15932e6)
@@ -42,12 +42,10 @@ update-images:
 	cd $(srcdir)/source/_static/images && \
 	  $(MAKE) -f $(abs_srcdir)/images.mk update-images
 
-if ENABLE_DOCUMENT
 nobase_dist_doc_DATA =				\
 	$(source_files_relative_from_doc_dir)
-endif
 
-if WITH_HG
+if DOCUMENT_BUILDABLE
 dist-hook: html man
 	@touch $(distdir)/build-stamp
 
@@ -64,7 +62,7 @@ maintainer-clean-local:
 distclean-local:
 	-rm -rf sphinx
 else
-if ENABLE_DOCUMENT
+if HAVE_BUILT_DOCUMENT
 EXTRA_DIST += build-stamp
 endif
 endif

  Modified: doc/locale/en/Makefile.am (+1 -1)
===================================================================
--- doc/locale/en/Makefile.am    2012-03-06 19:15:40 +0900 (7647c85)
+++ doc/locale/en/Makefile.am    2012-03-06 22:59:12 +0900 (2c6701e)
@@ -2,6 +2,6 @@ LOCALE = en
 
 include $(top_srcdir)/build/makefiles/locale.am
 
-if ENABLE_DOCUMENT
+if DOCUMENT_AVAILABLE
 dist_man1_MANS = $(man_files)
 endif

  Modified: doc/locale/ja/Makefile.am (+1 -1)
===================================================================
--- doc/locale/ja/Makefile.am    2012-03-06 19:15:40 +0900 (308a2f1)
+++ doc/locale/ja/Makefile.am    2012-03-06 22:59:12 +0900 (ebe5f8b)
@@ -2,7 +2,7 @@ LOCALE = ja
 
 include $(top_srcdir)/build/makefiles/locale.am
 
-if ENABLE_DOCUMENT
+if DOCUMENT_AVAILABLE
 ja_man1dir = $(mandir)/ja/man1
 dist_ja_man1_DATA = $(man_files)
 endif




Groonga-commit メーリングリストの案内
Back to archive index