Re: [RFC PATCH v4 04/19] Makefile: extract script to massage Perl scripts
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Nov 10, 2024, 14:36 UTC
- Message-ID
- <c2508eef-bedb-43dd-9d4b-7e980d4ade37@gmail.com>
- In-Reply-To
- <50b607a412afea051a7839b9f3f1b4519b58721a.1729771605.git.ps@pks.im>
Hi Patrick
On 24/10/2024 13:39, Patrick Steinhardt wrote:
>
> + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${perl_gen_path}
> + COMMAND ${CMAKE_SOURCE_DIR}/generate-perl.shThis is missing ${SH_EXE} in order to work with cmd.exe on windows when running the build from Visual Studio. Also do we want to quote the command arguments in case there is a ';' in the path - we seem to be a bit inconsistant in about that in CMakeLists.txt. Also we should add VERBATIM so that special characters in the arguments are quoted when generating the build rules.
Best Wishes
Phillip
Show 10 quoted lines
> + ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS
> + ${PROJECT_VERSION}
> + ${CMAKE_BINARY_DIR}/PERL-HEADER
> + ${CMAKE_SOURCE_DIR}/${script}
> + ${CMAKE_BINARY_DIR}/${perl_gen_path}
> + DEPENDS ${CMAKE_SOURCE_DIR}/generate-perl.sh
> + ${CMAKE_SOURCE_DIR}/${script})
> + list(APPEND perl_gen ${CMAKE_BINARY_DIR}/${perl_gen_path})
> endforeach()
> +add_custom_target(perl-gen ALL DEPENDS ${perl_gen})