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 <dorileo@profusion.mobi>



SVN revision: 76680
This commit is contained in:
Leandro Dorileo 2012-09-14 15:51:30 +00:00 committed by Bruno Dilly
parent 84807e6abc
commit cb63d40a90
2 changed files with 24 additions and 7 deletions

View File

@ -1,5 +1,6 @@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
if !BUILD_DOCS_ONLY
SUBDIRS = src doc data SUBDIRS = src doc data
MAINTAINERCLEANFILES = \ MAINTAINERCLEANFILES = \
@ -36,6 +37,7 @@ README
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ephysics.pc pkgconfig_DATA = ephysics.pc
endif
.PHONY: doc .PHONY: doc
@ -43,4 +45,4 @@ pkgconfig_DATA = ephysics.pc
doc: doc:
@echo "entering doc/" @echo "entering doc/"
make -C doc doc make -C doc doc

View File

@ -131,8 +131,21 @@ case "$host_os" in
esac esac
AC_SUBST(EFL_EPHYSICS_BUILD) 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], PKG_CHECK_MODULES([EPHYSICS],
[ [
eina >= 1.2.99 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}" requirement_ephysics="bullet >= 2.80 ecore >= 1.2.99 evas >= 1.2.99 eina >= 1.2.99 ${requirement_ephysics}"
fi
### Checks for header files ### Checks for header files
AC_CHECK_HEADERS([locale.h sys/resource.h]) AC_CHECK_HEADERS([locale.h sys/resource.h])
@ -175,22 +189,23 @@ esac
AC_SUBST(lt_enable_auto_import) AC_SUBST(lt_enable_auto_import)
## Tests ## 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"]) PKG_CHECK_MODULES([ELEMENTARY], [elementary >= 1.0.99], [build_tests="yes"], [build_tests="no"])
AC_ARG_ENABLE([build-tests], AC_ARG_ENABLE([build-tests],
AC_HELP_STRING([--disable-build-tests], AC_HELP_STRING([--disable-build-tests],
[Disable building tests. It is enabled by default unless [Disable building tests. It is enabled by default unless
required dependencies are not present. @<:@default==enabled@:>@]), required dependencies are not present. @<:@default==enabled@:>@]),
[ [
if test "x${enableval}" = "xno" ; then if test "x${enableval}" = "xyes" ; then
build_tests="no"
else
requirement_ephysics="elementary >= 1.0.99 ${requirement_ephysics}" requirement_ephysics="elementary >= 1.0.99 ${requirement_ephysics}"
fi fi
], ],
[]) [])
fi
AM_CONDITIONAL([BUILD_TESTS], [test "x${build_tests}" = "xyes"]) 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], PKG_CHECK_MODULES([EPHYSICS_TEST],
[ [
eina >= 1.2.99 eina >= 1.2.99
@ -229,7 +244,7 @@ echo "------------------------------------------------------------------------"
echo echo
echo "Configuration Options Summary:" echo "Configuration Options Summary:"
echo echo
echo " Documentation........: ${build_doc}" echo " Documentation........: ${build_doc} | docs-only: ${build_docs_only}"
echo " Tests................: ${build_tests}" echo " Tests................: ${build_tests}"
echo echo
echo "Compilation............: make (or gmake)" echo "Compilation............: make (or gmake)"