Module: xenomai-forge
Branch: next
Commit: cb28fab42ebdcbdbeddb98dcb16e649dc9c0798b
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=cb28fab42ebdcbdbeddb98dcb16e649dc9c0798b

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Jun 11 14:16:04 2014 +0200

build: move doc/ rule out of the main/all target

Although --enable-doc-build and/or --enable-doc-install may have been
given, we now require the "doc" target to be explicitly requested for
execution, instead of being implicitly part of the "all" target.

---

 Makefile.am  |   11 +++++++----
 Makefile.in  |   19 +++++++++++++++----
 configure    |   23 +++++++++++++++++++++--
 configure.ac |   10 ++++++++--
 4 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cbbbd1a..aad91b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,10 +11,6 @@ SUBDIRS =            \
        utils           \
        demo
 
-if XENO_INSTALL_DOC
-SUBDIRS += doc
-endif
-
 EXTRA_DIST = kernel debian
 
 dist-hook:
@@ -68,3 +64,10 @@ install-exec-local: devices
 
 install-user:
        $(MAKE) SUDO=false install
+
+doc:
+if XENO_RUN_DOC
+       $(MAKE) -C doc/
+endif
+
+.PHONY: doc
diff --git a/Makefile.in b/Makefile.in
index 80631d7..b96a3c0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,7 +78,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@XENO_INSTALL_DOC_TRUE@am__append_1 = doc
 subdir = .
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(top_srcdir)/configure $(am__configure_deps) \
@@ -157,7 +156,7 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
-DIST_SUBDIRS = lib config include scripts testsuite utils demo doc
+DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -365,8 +364,15 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I config
 SUDO = sudo
-SUBDIRS = lib config include scripts testsuite utils demo \
-       $(am__append_1)
+SUBDIRS = \
+       lib             \
+       config          \
+       include         \
+       scripts         \
+       testsuite       \
+       utils           \
+       demo
+
 EXTRA_DIST = kernel debian
 all: all-recursive
 
@@ -879,6 +885,11 @@ install-exec-local: devices
 install-user:
        $(MAKE) SUDO=false install
 
+doc:
+@XENO_RUN_DOC_TRUE@    $(MAKE) -C doc/
+
+.PHONY: doc
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/configure b/configure
index 1a20b1f..1e9d422 100755
--- a/configure
+++ b/configure
@@ -661,6 +661,8 @@ XENO_TLSF_FALSE
 XENO_TLSF_TRUE
 CONFIG_XENO_SHARED_FALSE
 CONFIG_XENO_SHARED_TRUE
+XENO_RUN_DOC_FALSE
+XENO_RUN_DOC_TRUE
 W3M
 A2X
 ASCIIDOC
@@ -13524,11 +13526,24 @@ if test x${XENO_BUILD_DOC} = xy -a x"$W3M" = x ; then
    as_fn_error $? "Missing the w3m tool to build the documentation" "$LINENO" 5
 fi
 
-if test x"$docdir" = x; then
+if test x$docdir = x; then
        docdir=$datadir/doc/$PACKAGE-$VERSION
 fi
 
 
+XENO_RUN_DOC=y
+if test x$XENO_BUILD_DOC = x -a x$XENO_INSTALL_DOC = x; then
+   unset XENO_RUN_DOC
+fi
+ if test "$XENO_RUN_DOC" = y; then
+  XENO_RUN_DOC_TRUE=
+  XENO_RUN_DOC_FALSE='#'
+else
+  XENO_RUN_DOC_TRUE='#'
+  XENO_RUN_DOC_FALSE=
+fi
+
+
 
 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" 
"ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
 if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
@@ -14096,7 +14111,7 @@ fi
 ac_config_files="$ac_config_files Makefile config/Makefile scripts/Makefile 
scripts/xeno-config:scripts/xeno-config-$rtcore_type.in scripts/xeno 
lib/Makefile lib/boilerplate/Makefile lib/cobalt/Makefile 
lib/cobalt/arch/Makefile lib/cobalt/arch/arm/Makefile 
lib/cobalt/arch/arm/include/Makefile lib/cobalt/arch/arm/include/asm/Makefile 
lib/cobalt/arch/arm/include/asm/xenomai/Makefile 
lib/cobalt/arch/powerpc/Makefile lib/cobalt/arch/powerpc/include/Makefile 
lib/cobalt/arch/powerpc/include/asm/Makefile 
lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile 
lib/cobalt/arch/blackfin/Makefile lib/cobalt/arch/blackfin/include/Makefile 
lib/cobalt/arch/blackfin/include/asm/Makefile 
lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile 
lib/cobalt/arch/x86/Makefile lib/cobalt/arch/x86/include/Makefile 
lib/cobalt/arch/x86/include/asm/Makefile 
lib/cobalt/arch/x86/include/asm/xenomai/Makefile lib/cobalt/arch/nios2/Makefile 
lib/cobalt/arch/nios2/include/Makefile lib/cobalt/arch/nios2/include/asm/Makef
 ile lib/cobalt/arch/nios2/include/asm/xenomai/Makefile 
lib/cobalt/arch/sh/Makefile lib/cobalt/arch/sh/include/Makefile 
lib/cobalt/arch/sh/include/asm/Makefile 
lib/cobalt/arch/sh/include/asm/xenomai/Makefile lib/copperplate/Makefile 
lib/copperplate/regd/Makefile lib/alchemy/Makefile lib/vxworks/Makefile 
lib/psos/Makefile lib/analogy/Makefile testsuite/Makefile 
testsuite/latency/Makefile testsuite/cyclic/Makefile 
testsuite/switchtest/Makefile testsuite/clocktest/Makefile 
testsuite/unit/Makefile testsuite/xeno-test/Makefile 
testsuite/regression/Makefile testsuite/regression/posix/Makefile 
utils/Makefile utils/can/Makefile utils/analogy/Makefile utils/ps/Makefile 
utils/slackspot/Makefile demo/Makefile demo/posix/Makefile 
demo/posix/cobalt/Makefile demo/alchemy/Makefile demo/alchemy/cobalt/Makefile 
include/Makefile include/nocore/Makefile include/cobalt/uapi/Makefile 
include/cobalt/uapi/asm-generic/Makefile include/cobalt/uapi/kernel/Makefile 
include/cobalt/uapi/rtdm/Makefile include/cob
 alt/Makefile include/cobalt/sys/Makefile include/cobalt/kernel/Makefile 
include/cobalt/kernel/rtdm/Makefile include/cobalt/kernel/rtdm/analogy/Makefile 
include/cobalt/boilerplate/Makefile include/rtdm/Makefile 
include/rtdm/uapi/Makefile include/mercury/Makefile 
include/mercury/boilerplate/Makefile include/boilerplate/Makefile 
include/copperplate/Makefile include/alchemy/Makefile include/vxworks/Makefile 
include/psos/Makefile"
 
 
-if test \! x$XENO_INSTALL_DOC = x ; then
+if test \! x$XENO_RUN_DOC = x ; then
       ac_config_files="$ac_config_files doc/Makefile doc/man/Makefile 
doc/doxygen/Makefile doc/doxygen/Doxyfile-common doc/doxygen/Doxyfile 
doc/doxygen/Doxyfile-nucleus doc/doxygen/Doxyfile-cobalt 
doc/doxygen/Doxyfile-rtdm doc/asciidoc/Makefile"
 
 fi
@@ -14278,6 +14293,10 @@ if test -z "${XENO_INSTALL_DOC_TRUE}" && test -z 
"${XENO_INSTALL_DOC_FALSE}"; th
   as_fn_error $? "conditional \"XENO_INSTALL_DOC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${XENO_RUN_DOC_TRUE}" && test -z "${XENO_RUN_DOC_FALSE}"; then
+  as_fn_error $? "conditional \"XENO_RUN_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${CONFIG_XENO_SHARED_TRUE}" && test -z 
"${CONFIG_XENO_SHARED_FALSE}"; then
   as_fn_error $? "conditional \"CONFIG_XENO_SHARED\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 6ba6e96..3b7b97d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -447,11 +447,17 @@ if test x${XENO_BUILD_DOC} = xy -a x"$W3M" = x ; then
    AC_MSG_ERROR([Missing the w3m tool to build the documentation])
 fi
 
-if test x"$docdir" = x; then
+if test x$docdir = x; then
        docdir=$datadir/doc/$PACKAGE-$VERSION
 fi
 AC_SUBST(docdir)
 
+XENO_RUN_DOC=y
+if test x$XENO_BUILD_DOC = x -a x$XENO_INSTALL_DOC = x; then
+   unset XENO_RUN_DOC
+fi
+AM_CONDITIONAL(XENO_RUN_DOC,[test "$XENO_RUN_DOC" = y])
+
 dnl Check for Valgrind client API support.
 dnl Some GCC releases produce broken assembly code for Valgrind
 dnl client calls, so we check this too. --disable-valgrind-client
@@ -870,7 +876,7 @@ AC_CONFIG_FILES([ \
        include/psos/Makefile \
        ])
 
-if test \! x$XENO_INSTALL_DOC = x ; then
+if test \! x$XENO_RUN_DOC = x ; then
       AC_CONFIG_FILES([ \
        doc/Makefile \
        doc/man/Makefile \


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to