From: Phillip Wood Date: Sun, 10 Nov 2024 14:36:49 GMT Subject: Re: [RFC PATCH v4 04/19] Makefile: extract script to massage Perl scripts Message-ID: 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.sh This 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 > + ${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})