git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/5] cmake: put the Perl modules into the correct location again

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 17, 2024, 17:32 UTC
Message-ID
<0f1808e37cc75ac6d2bd5f28deb7c91bfeedcba9.1734456721.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1840.git.1734456721.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

In ccfba9e0c45 (Makefile: use "generate-perl.sh" to massage Perl library, 2024-12-06), the previous strategy (which avoided spawning a shell script to transform the files) was replaced by the same `generate-perl.sh` invocation as for the Makefile-based build.

The only difference is that now the transformation tries to handle the Perl modules in-place (which ends up in empty files because the same file is used as input and output via stdin/stdout redirection), and the Perl script cannot find them anymore because they are not in the expected place.

Let's put them into the expected place again, i.e. into `perl/build/lib/` instead of `perl/`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 contrib/buildsystems/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 6f35cd66f39..36f18ab2dd1 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -882,6 +882,10 @@ foreach(script ${git_perl_scripts} ${perl_modules})
 	string(REPLACE ".perl" "" perl_gen_path "${script}")
 
 	get_filename_component(perl_gen_dir "${perl_gen_path}" DIRECTORY)
+	if(script MATCHES "\.pm$")
+		string(REGEX REPLACE "^perl" "perl/build/lib" perl_gen_dir "${perl_gen_dir}")
+		string(REGEX REPLACE "^perl" "perl/build/lib" perl_gen_path "${perl_gen_path}")
+	endif()
 	file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${perl_gen_dir}")
 
 	add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${perl_gen_path}"
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 5 of 8 in “ps/build follow-ups”
  1. 0/5 ps/build follow-upsJohannes Schindelin via GitGitGadget, Dec 17, 2024
  2. 1/5 cmake: better support for out-of-tree builds follow-upJohannes Schindelin via GitGitGadget, Dec 17, 2024
  3. 2/5 cmake(mergetools): better support for out-of-tree buildsJohannes Schindelin via GitGitGadget, Dec 17, 2024
  4. 3/5 cmake: use the correct file name for the Perl headerJohannes Schindelin via GitGitGadget, Dec 17, 2024
  5. 4/5 cmake: put the Perl modules into the correct location againJohannes Schindelin via GitGitGadget, Dec 17, 2024
  6. 5/5 cmake/vcxproj: stop special-casing `remote-ext`Johannes Schindelin via GitGitGadget, Dec 17, 2024
  7. Junio C HamanoDec 17, 2024
  8. Patrick SteinhardtDec 18, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.