From 5b5730ed81d63642d86e89036f2bf0153b090eb0 Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 26 Sep 2022 17:06:04 +0200 Subject: [PATCH] Do not rely on the .git folder for TREXIO_DEVEL setup This poses issues when packaging for Guix and Debian --- .devel | 0 CMakeLists.txt | 2 +- configure.ac | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .devel diff --git a/.devel b/.devel new file mode 100644 index 0000000..e69de29 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a5712f..ba6f6c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON) # Optional configure for developer mode to generate source code from org-mode files. option(TREXIO_DEVEL "TREXIO developer mode (for code generation)." OFF) -if(EXISTS "${CMAKE_SOURCE_DIR}/.git/config") +if(EXISTS "${CMAKE_SOURCE_DIR}/.devel") set(TREXIO_DEVEL ON) find_package(Python3 REQUIRED) if(Python3_FOUND) diff --git a/configure.ac b/configure.ac index 3ef8c86..cd0a7b2 100644 --- a/configure.ac +++ b/configure.ac @@ -16,10 +16,10 @@ AM_PROG_AR LT_PREREQ([2.2]) LT_INIT -# Activate developer mode when the source is the git repository. +# Activate developer mode when if a dummy file is present (true when cloning the git repository). # Otherwise, it is the source distribution and the developer mode should not be activated. -TEST_IFEXISTS=".git" -AS_IF([test -d $TEST_IFEXISTS], +TEST_IFEXISTS=".devel" +AS_IF([test -f $TEST_IFEXISTS], [enable_maintainer_mode="yes"] )