From 4a63473eabe6605fe89a33405a68573ce5faeabe Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 1 Nov 2021 10:43:08 +0100 Subject: [PATCH] Automatic maintainer mode --- .github/workflows/test-build.yml | 4 ++-- README.md | 4 ++-- autogen.sh | 3 --- configure.ac | 8 ++++++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 9dc27d6..f957ade 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -31,7 +31,7 @@ jobs: - name: Build run: | ./autogen.sh - QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode --enable-debug + ./configure --enable-silent-rules --enable-debug make -j 8 - name: Run test @@ -80,7 +80,7 @@ jobs: # - name: Run test # run: | # ./autogen.sh -# QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode --enable-debug +# ./configure --enable-silent-rules --enable-debug # make -j 8 # make -j check # make distcheck diff --git a/README.md b/README.md index 7ba1e08..fb1281b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ in org-mode files and produce the source code and the documentation from these f ``` ./autogen.sh -./configure --prefix=$PWD/_install --enable-silent-rules --enable-maintainer-mode +./configure --prefix=$PWD/_install make make check @@ -54,7 +54,7 @@ by the preprocessor otherwise). To enable vfc_ci support, the library should be configured with the following command : ``` -./configure --prefix=$PWD/_install \ --enable-silent-rules --enable-maintainer-mode --enable-vfc_ci --host=x86_64 \ CC="verificarlo-f" FC="verificarlo-f" +./configure --prefix=$PWD/_install \ --enable-vfc_ci --host=x86_64 \ CC="verificarlo-f" FC="verificarlo-f" ``` where CC and FC are set to verificarlo-f, and support is explicitely enabled diff --git a/autogen.sh b/autogen.sh index 97ce9ec..c993445 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,6 +2,3 @@ python ./tools/build_makefile.py autoreconf -i -echo "To configure in maintainer mode, use: -$ QMCKL_DEVEL=1 ./configure --enable-silent-rules --enable-maintainer-mode -" diff --git a/configure.ac b/configure.ac index 550f858..ca54f83 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,14 @@ AC_INIT([qmckl],[0.1.1], [https://trex-coe.github.io/qmckl/index.html]) AC_CONFIG_AUX_DIR(tools) AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11]) + +# Activate developer mode when the source is the git repository. +# Otherwise, it is the source distribution and the developer mode should not be activated. +TEST_IFEXISTS=".git" +AC_CHECK_FILE([$TEST_IFEXISTS], + [enable_maintainer_mode="yes"], +) + AM_MAINTAINER_MODE() LT_INIT AC_CONFIG_SRCDIR([configure.ac])