Commit 6b9687d2 authored by Swann Perarnau's avatar Swann Perarnau

[doc] working makefiles, configure

Ensure that autoconf and automake can build the docs, and are
distributing it properly.

Still one issue: if we detect doxygen and sphinx on configure, we
rebuild the docs, even if the user is using a distributed release.
parent 1eeaeed0
Pipeline #7000 passed with stages
in 4 minutes and 36 seconds
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src include tests
SUBDIRS = src include tests doc
if ADD_BENCHMARKS
SUBDIRS += benchmarks
endif
if AML_DOXYGEN
SUBDIRS += doc
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = aml.pc
......
......@@ -69,11 +69,24 @@ AC_CHECK_HEADERS([numa.h],,[AC_MSG_ERROR([AML requires libnuma headers.])])
AC_CHECK_HEADERS([numaif.h],,[AC_MSG_ERROR([AML requires libnuma headers.])])
AC_CHECK_LIB(numa, mbind,,[AC_MSG_ERROR([AML requires libnuma.])])
# Doxygen
# See m4/ax_doxygen.m4
AC_CHECK_PROG(doxygen_happy, [doxygen], [yes], [no])
AM_CONDITIONAL([AML_DOXYGEN],[ test "x$doxygen_happy" = "xyes" ])
# check doxygen + sphinx for documentation build
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen], [no])
AC_CHECK_PROG([SPHINXBUILD], [sphinx-build], [sphinx-build], [no])
if [[ "x$DOXYGEN" != xno ]]; then
if [[ "x$SPHINXBUILD" != xno ]]; then
AC_MSG_NOTICE([Doxygen and Sphinx found, documentation will be build])
BUILD_DOCS=yes
else
AC_MSG_NOTICE([Sphinx not found, cannot build documentation])
BUILD_DOCS=no
fi
else
AC_MSG_NOTICE([Doxygen not found, cannot build documentation])
BUILD_DOCS=no
fi
AM_CONDITIONAL([BUILD_DOCS],[ test "x$BUILD_DOCS" = xyes ])
AC_CONFIG_HEADERS([include/config.h])
......
......@@ -2,26 +2,31 @@ DATA_INSTALL_DIR=$(datadir)/aml
DOXYGEN_BUILD_DIR=./build-doxygen
SPHINX_BUILD_DIR=./build-sphinx
doxygen:
doxygen aml.doxy
if BUILD_DOCS
build-docs:
$(DOXYGEN) aml.doxy
$(SPHINXBUILD) -b html -a . $(SPHINX_BUILD_DIR)
else
build-docs:
echo "not building documentation"
endif
create-doc-dir:
mkdir -p $(DATA_INSTALL_DIR)
install-doc-html:
if [ -d $(DOXYGEN_BUILD_DIR)/html ]; then \
cp -r $(DOXYGEN_BUILD_DIR)/html $(DATA_INSTALL_DIR); \
install-doc-html: build-docs
if [ -d $(SPHINX_BUILD_DIR) ]; then \
cp -r $(SPHINX_BUILD_DIR) $(DATA_INSTALL_DIR)/html; \
fi
install-data-local: create-doc-dir install-doc-html
uninstall-local:
rm -rf $(DATA_INSTALL_DIR)
clean-local:
rm -rf $(DOXYGEN_BUILD_DIR) $(SPHINX_BUILD_DIR)
dist-hook: doxygen
cp -r $(DOXYGEN_BUILD_DIR) $(distdir)
dist-hook: build-docs
cp -r $(SPHINX_BUILD_DIR) $(distdir)
EXTRA_DIST= aml.doxy conf.py pages index.rst img
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment