Skip to content

Commit 1c01f0f

Browse files
dschogitster
authored andcommitted
cmake: put the Perl modules into the correct location again
In ccfba9e (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca358e6 commit 1c01f0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,10 @@ foreach(script ${git_perl_scripts} ${perl_modules})
882882
string(REPLACE ".perl" "" perl_gen_path "${script}")
883883

884884
get_filename_component(perl_gen_dir "${perl_gen_path}" DIRECTORY)
885+
if(script MATCHES "\.pm$")
886+
string(REGEX REPLACE "^perl" "perl/build/lib" perl_gen_dir "${perl_gen_dir}")
887+
string(REGEX REPLACE "^perl" "perl/build/lib" perl_gen_path "${perl_gen_path}")
888+
endif()
885889
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${perl_gen_dir}")
886890

887891
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${perl_gen_path}"

0 commit comments

Comments
 (0)