From cb63d40a90d693b01a43ca56261eedb653218774 Mon Sep 17 00:00:00 2001 From: Leandro Dorileo Date: Fri, 14 Sep 2012 15:51:30 +0000 Subject: [PATCH] EPhysics: conditinal doc building This patch introduces a --enable-build-docs-only and in that case will not check for dependencies and will have just the make doc target. Patch by: Leandro Dorileo SVN revision: 76680 --- legacy/ephysics/Makefile.am | 4 +++- legacy/ephysics/configure.ac | 27 +++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/legacy/ephysics/Makefile.am b/legacy/ephysics/Makefile.am index 1c7e322a06..4964416e33 100644 --- a/legacy/ephysics/Makefile.am +++ b/legacy/ephysics/Makefile.am @@ -1,5 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 +if !BUILD_DOCS_ONLY SUBDIRS = src doc data MAINTAINERCLEANFILES = \ @@ -36,6 +37,7 @@ README pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = ephysics.pc +endif .PHONY: doc @@ -43,4 +45,4 @@ pkgconfig_DATA = ephysics.pc doc: @echo "entering doc/" - make -C doc doc + make -C doc doc \ No newline at end of file diff --git a/legacy/ephysics/configure.ac b/legacy/ephysics/configure.ac index ee05404502..28fc19e449 100644 --- a/legacy/ephysics/configure.ac +++ b/legacy/ephysics/configure.ac @@ -131,8 +131,21 @@ case "$host_os" in esac AC_SUBST(EFL_EPHYSICS_BUILD) -# Dependencies for the library +build_docs_only="no" +AC_ARG_ENABLE([build-docs-only], + AC_HELP_STRING([--enable-build-docs-only], + [Doesn't build library or tests, just build docs. @<:@default==disabled@:>@]), + [ + if test "x${enableval}" = "xyes" ; then + build_docs_only="yes" + fi + ], + []) +AM_CONDITIONAL([BUILD_DOCS_ONLY], [test "x${build_docs_only}" = "xyes"]) + +# Dependencies for the library +if test "${build_docs_only}" = "no" ; then PKG_CHECK_MODULES([EPHYSICS], [ eina >= 1.2.99 @@ -142,6 +155,7 @@ PKG_CHECK_MODULES([EPHYSICS], ]) requirement_ephysics="bullet >= 2.80 ecore >= 1.2.99 evas >= 1.2.99 eina >= 1.2.99 ${requirement_ephysics}" +fi ### Checks for header files AC_CHECK_HEADERS([locale.h sys/resource.h]) @@ -175,22 +189,23 @@ esac AC_SUBST(lt_enable_auto_import) ## Tests +build_tests="no" +if test "${build_docs_only}" = "no" ; then PKG_CHECK_MODULES([ELEMENTARY], [elementary >= 1.0.99], [build_tests="yes"], [build_tests="no"]) AC_ARG_ENABLE([build-tests], AC_HELP_STRING([--disable-build-tests], [Disable building tests. It is enabled by default unless required dependencies are not present. @<:@default==enabled@:>@]), [ - if test "x${enableval}" = "xno" ; then - build_tests="no" - else + if test "x${enableval}" = "xyes" ; then requirement_ephysics="elementary >= 1.0.99 ${requirement_ephysics}" fi ], []) +fi AM_CONDITIONAL([BUILD_TESTS], [test "x${build_tests}" = "xyes"]) -if test "${build_tests}" = "yes" ; then +if test "${build_tests}" = "yes" && test "${build_docs_only}" = "no" ; then PKG_CHECK_MODULES([EPHYSICS_TEST], [ eina >= 1.2.99 @@ -229,7 +244,7 @@ echo "------------------------------------------------------------------------" echo echo "Configuration Options Summary:" echo -echo " Documentation........: ${build_doc}" +echo " Documentation........: ${build_doc} | docs-only: ${build_docs_only}" echo " Tests................: ${build_tests}" echo echo "Compilation............: make (or gmake)"