From 5c62bc1c718899799df35abbae166a700226cac9 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 28 Sep 2022 17:52:33 +0200 Subject: [PATCH] Added --disable-doc to configure --- Makefile.am | 20 ++++++++++++-------- configure.ac | 10 +++++++++- tools/build_makefile.py | 8 ++++++-- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index 472ee62..b4b6cd9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,15 +72,21 @@ CLEANFILES+=$(test_qmckl_fo) $(src_qmckl_fo) $(test_qmckl_o) $(src_qmckl_o) $(FH include generated.mk +htmldir = $(docdir)/html +textdir = $(docdir)/text +htmldir_loc = share/doc/qmckl/html +textdir_loc = share/doc/qmckl/text ln_s_verbose = $(ln_s_verbose_@AM_V@) ln_s_verbose_ = $(ln_s_verbose_@AM_DEFAULT_V@) ln_s_verbose_0 = @echo " LN_S $<"; -htmldir = $(docdir)/html -textdir = $(docdir)/text -htmldir_loc = share/doc/qmckl/html -textdir_loc = share/doc/qmckl/text +# Include Guix manifest in the source code distribution tarball +tools_qmckl_scm = tools/qmckl.scm +EXTRA_DIST += $(tools_qmckl_scm) + +# Documentation rules +if HAVE_DOC htmlize_el = $(htmldir_loc)/htmlize.el dist_html_DATA = $(HTML_FILES) \ $(htmldir_loc)/qmckl.css \ @@ -88,13 +94,10 @@ dist_html_DATA = $(HTML_FILES) \ dist_text_DATA = $(TEXT_FILES) -# Include Guix manifest in the source code distribution tarball -tools_qmckl_scm = tools/qmckl.scm -EXTRA_DIST += $(tools_qmckl_scm) - html-local: $(htmlize_el) $(dist_html_DATA) text: $(htmlize_el) $(dist_text_DATA) doc: html text +endif setup_py = $(srcdir)/python/setup.py process_header_py = $(srcdir)/python/src/process_header.py @@ -131,6 +134,7 @@ if QMCKL_DEVEL if VFC_CI AM_LDFLAGS=-lvfc_probes -lvfc_probes_f +ACLOCAL_AMFLAGS += -I tools endif EXTRA_DIST += $(ORG_FILES) $(TANGLED_FILES) $(EXPORTED_FILES) $(test_qmckl_f) diff --git a/configure.ac b/configure.ac index 21be7ae..64252d5 100644 --- a/configure.ac +++ b/configure.ac @@ -273,6 +273,14 @@ AC_ARG_ENABLE([hpc], AS_IF([test "x$enable_hpc" = "yes"], [AC_DEFINE([HAVE_HPC], [1], [Activate HPC routines])]) +AC_ARG_ENABLE([doc], + [AS_HELP_STRING([--disable-doc], + [Disable documentation])], + [enable_doc=$withval], + [enable_doc=yes]) + +AM_CONDITIONAL([HAVE_DOC],[test "x$enable_doc" = "no"]) + # Enable Verificarlo tests AC_ARG_ENABLE([vfc_ci], [AS_HELP_STRING([--enable-vfc_ci], @@ -283,7 +291,7 @@ AC_ARG_ENABLE([vfc_ci], AS_IF([test "x$enable_vfc_ci" = "xyes"], [FCFLAGS="-D VFC_CI $FCFLAGS" CFLAGS="-D VFC_CI $CFLAGS" - LDFLAGS="-lvfc_probes $LDFLAGS"]) + LIBS="$LIBS -lvfc_probes"]) AM_CONDITIONAL([VFC_CI], [test "x$vfc_ci" = "xtrue"]) diff --git a/tools/build_makefile.py b/tools/build_makefile.py index 9b575d8..797985e 100755 --- a/tools/build_makefile.py +++ b/tools/build_makefile.py @@ -205,8 +205,12 @@ def main(): "C_TEST_FILES="+" ".join(C_TEST_FILES), "F_TEST_FILES="+" ".join(F_TEST_FILES), "TESTS="+" ".join(TESTS.keys()), - "HTML_FILES="+" ".join(HTML.values()), - "TEXT_FILES="+" ".join(TEXT.values()), + "HTML_FILES=", + "TEXT_FILES=", + "if HAVE_DOC", + "HTML_FILES+="+" ".join(HTML.values()), + "TEXT_FILES+="+" ".join(TEXT.values()), + "endif", "" ] output+= ["",