Subject: Re: [RFC PATCH v4 05/19] Makefile: use "generate-perl.sh" to massage Perl library

From: Patrick Steinhardt <[email-masked]>
Date: Mon, 11 Nov 2024 15:13:15 +0100

On Mon, Nov 11, 2024 at 10:53:58AM +0000, Phillip Wood wrote:
> Hi Patrick
> 
> On 24/10/2024 13:39, Patrick Steinhardt wrote:
> > diff --git a/generate-perl.sh b/generate-perl.sh
> > index 12e116b76e5..cb1629857c6 100755
> > --- a/generate-perl.sh
> > +++ b/generate-perl.sh
> > @@ -17,10 +17,20 @@ OUTPUT="$5"
> >   . "$GIT_BUILD_OPTIONS"
> 
> I need to add
> 
> case "$OUTPUT" in
> *.pm)
> 	dir="$(dirname $OUTPUT)"
> 	if ! test -d "$dir"
> 	then
> 		mkdir -p "$dir"
> 	fi
>     ;;
> esac
> 
> to create the output directories when building out of tree using CMake on
> Linux. I'm not sure why it works on Windows without this, or why we don't
> need to create the leading directories when generating clar-decls.h or
> clar.suite as CMake seems to do it for us when it initializes the build
> directory.

Ah, indeed, I can reproduce this when using Makefiles. I'll solve this
via `file(MAKE_DIRECTORY)`.

Patrick