Skip to content

Commit

Permalink
Do not rely on the .git folder for TREXIO_DEVEL setup
Browse files Browse the repository at this point in the history
This poses issues when packaging for Guix and Debian
  • Loading branch information
q-posev committed Sep 26, 2022
1 parent 0e96112 commit 5b5730e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Empty file added .devel
Empty file.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
)

Expand Down

0 comments on commit 5b5730e

Please sign in to comment.