From: Rafael Espindola Date: Fri, 12 Nov 2010 19:24:06 +0000 (+0000) Subject: Add --enable-docs. Patch by NAKAMURA Takumi. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9d9ae9fb59ee3897ffc21dfa3b7078478ac6d674;p=oota-llvm.git Add --enable-docs. Patch by NAKAMURA Takumi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118918 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Makefile b/Makefile index ae650b7f2d9..3c6b953eb9f 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,10 @@ ifneq ($(ENABLE_SHARED),1) DIRS := $(filter-out tools/llvm-shlib, $(DIRS)) endif +ifneq ($(ENABLE_DOCS),1) + DIRS := $(filter-out docs, $(DIRS)) +endif + ifeq ($(MAKECMDGOALS),libs-only) DIRS := $(filter-out tools runtime docs, $(DIRS)) OPTIONAL_DIRS := diff --git a/Makefile.config.in b/Makefile.config.in index 9c2f4e6f202..a4d9f3d7c5f 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -264,6 +264,9 @@ OPTIMIZE_OPTION := @OPTIMIZE_OPTION@ # information to allow gprof to be used to get execution frequencies. #ENABLE_PROFILING = 1 +# When ENABLE_DOCS is disabled, docs/ will not be built. +ENABLE_DOCS = @ENABLE_DOCS@ + # When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built ENABLE_DOXYGEN = @ENABLE_DOXYGEN@ diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 1d5fa154fc4..9988f0e0675 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -493,6 +493,18 @@ else esac fi +dnl Allow enablement of building and installing docs +AC_ARG_ENABLE(docs, + AS_HELP_STRING([--enable-docs], + [Build documents (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_DOCS,[1]) ;; + no) AC_SUBST(ENABLE_DOCS,[0]) ;; + default) AC_SUBST(ENABLE_DOCS,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-docs. Use "yes" or "no"]) ;; +esac + dnl Allow enablement of doxygen generated documentation AC_ARG_ENABLE(doxygen, AS_HELP_STRING([--enable-doxygen], diff --git a/configure b/configure index 9c807946d87..bb634be1573 100755 --- a/configure +++ b/configure @@ -688,6 +688,7 @@ DEBUG_RUNTIME DEBUG_SYMBOLS JIT TARGET_HAS_JIT +ENABLE_DOCS ENABLE_DOXYGEN ENABLE_THREADS ENABLE_PIC @@ -1411,6 +1412,7 @@ Optional Features: --enable-debug-symbols Build compiler with debug symbols (default is NO if optimization is on and YES if it's off) --enable-jit Enable Just In Time Compiling (default is YES) + --enable-docs Build documents (default is YES) --enable-doxygen Build doxygen documentation (default is NO) --enable-threads Use threads if available (default is YES) --enable-pic Build LLVM with Position Independent Code (default @@ -4871,6 +4873,25 @@ else esac fi +# Check whether --enable-docs was given. +if test "${enable_docs+set}" = set; then + enableval=$enable_docs; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_DOCS=1 + ;; + no) ENABLE_DOCS=0 + ;; + default) ENABLE_DOCS=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-docs. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-docs. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + # Check whether --enable-doxygen was given. if test "${enable_doxygen+set}" = set; then enableval=$enable_doxygen; @@ -11501,7 +11522,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <conf$$subs.sed <<_ACEOF +ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim CLANGPATH!$CLANGPATH$ac_delim CLANGXXPATH!$CLANGXXPATH$ac_delim ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim @@ -21845,7 +21867,6 @@ ALL_BINDINGS!$ALL_BINDINGS$ac_delim OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim RPATH!$RPATH$ac_delim -RDYNAMIC!$RDYNAMIC$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -21887,11 +21908,12 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +RDYNAMIC!$RDYNAMIC$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 2; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5