null+****@clear*****
null+****@clear*****
2012年 1月 12日 (木) 17:03:23 JST
Kouhei Sutou 2012-01-12 17:03:23 +0900 (Thu, 12 Jan 2012) New Revision: 61bf230bed946393a1373ceb565d6e129da2a4d3 Log: don't clean generated files by Sphinx on no hg environment. Modified files: build/makefiles/gettext.am build/makefiles/sphinx.am configure.ac Modified: build/makefiles/gettext.am (+1 -1) =================================================================== --- build/makefiles/gettext.am 2012-01-12 16:46:44 +0900 (b4b8f85) +++ build/makefiles/gettext.am 2012-01-12 17:03:23 +0900 (6f56598) @@ -1,7 +1,7 @@ include $(top_srcdir)/doc/files.am include $(top_srcdir)/build/makefiles/sphinx-build.am -if ENABLE_DOCUMENT +if WITH_HG BUILT_SOURCES += \ $(mo_files) endif Modified: build/makefiles/sphinx.am (+2 -0) =================================================================== --- build/makefiles/sphinx.am 2012-01-12 16:46:44 +0900 (202c6ac) +++ build/makefiles/sphinx.am 2012-01-12 17:03:23 +0900 (c537aa5) @@ -63,9 +63,11 @@ clean-local: $(clean_targets) clean-doctrees clean-doctrees: rm -rf $(DOCTREES_BASE) +if WITH_HG maintainer-clean: maintainer-clean-local maintainer-clean-local: rm -rf -- $(generated_files) +endif .PHONY: help .PHONY: man clean-man Modified: configure.ac (+9 -7) =================================================================== --- configure.ac 2012-01-12 16:46:44 +0900 (ccf15e2) +++ configure.ac 2012-01-12 17:03:23 +0900 (42a145e) @@ -937,21 +937,23 @@ AC_MSG_RESULT($enable_document) document_available=no if test x"$enable_document" != x"no"; then - if test -f "$srcdir/doc/build-stamp"; then + AC_PATH_PROG(HG, hg, []) + if test -n "$HG"; then document_available=yes else - AC_PATH_PROG(HG, hg, hg-not-found) - if test x"$HG" = x"hg-not-found"; then + if test -f "$srcdir/doc/build-stamp"; then + document_available=yes + else if test x"$enable_document" = x"yes"; then - AC_MSG_ERROR("No hg found") + AC_MSG_ERROR("No hg found") fi - else - document_available=yes fi - AC_SUBST(HG) fi + AC_SUBST(HG) fi +AM_CONDITIONAL([WITH_HG], [test -n "${HG}"]) + AM_CONDITIONAL([ENABLE_DOCUMENT], [test "${document_available}" = "yes"]) AC_MSG_CHECKING([whether document available])