]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Rename the cache variable POSIX_SHELL to XZ_POSIX_SHELL
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 15 Jun 2024 15:07:04 +0000 (18:07 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 20 Jun 2024 12:00:05 +0000 (15:00 +0300)
We still need the variable POSIX_SHELL for configure_file()
but it doesn't need to be a cache variable.

CMakeLists.txt

index 3f3baecba02dbd83673f8c482d6bfe90c120604c..886d3879006d26dc4b37546ee04c0730585ed3c8 100644 (file)
@@ -1978,14 +1978,14 @@ if(UNIX)
         set(POSIX_SHELL_DEFAULT "/bin/sh")
     endif()
 
-    set(POSIX_SHELL "${POSIX_SHELL_DEFAULT}" CACHE STRING
+    set(XZ_POSIX_SHELL "${POSIX_SHELL_DEFAULT}" CACHE STRING
         "Shell to use for scripts (xzgrep and others)")
 
-    # Guess the extra path to add from POSIX_SHELL. Autotools-based build
+    # Guess the extra path to add from XZ_POSIX_SHELL. Autotools-based build
     # has a separate option --enable-path-for-scripts=PREFIX but this is
     # enough for Solaris.
     set(enable_path_for_scripts)
-    get_filename_component(POSIX_SHELL_DIR "${POSIX_SHELL}" DIRECTORY)
+    get_filename_component(POSIX_SHELL_DIR "${XZ_POSIX_SHELL}" DIRECTORY)
 
     if(NOT POSIX_SHELL_DIR STREQUAL "/bin" AND
             NOT POSIX_SHELL_DIR STREQUAL "/usr/bin")
@@ -2005,6 +2005,7 @@ if(UNIX)
     endif()
 
     set(xz "xz")
+    set(POSIX_SHELL "${XZ_POSIX_SHELL}")
 
     foreach(S xzdiff xzgrep xzmore xzless)
         configure_file("src/scripts/${S}.in" "${S}"