Re: [RFC PATCH v4 05/19] Makefile: use "generate-perl.sh" to massage Perl library
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Nov 11, 2024, 10:53 UTC
- Message-ID
- <6a608200-2dd5-4505-9e1d-1e161ae2896c@gmail.com>
- In-Reply-To
- <eddafe1cf8935fd25d107645168ace3f65e1064c.1729771605.git.ps@pks.im>
Hi Patrick
On 24/10/2024 13:39, Patrick Steinhardt wrote:
Show 6 quoted lines
> 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
;;
esacto 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.
Show 15 quoted lines
> sed -e '1{' \
> + -e " /^#!.*perl/!b" \
> -e " s|#!.*perl|#!$PERL_PATH|" \
> -e " r $PERL_HEADER" \
> -e ' G' \
> -e '}' \
> - -e "s/@GIT_VERSION@/$GIT_VERSION/g" \
> + -e "s|@GIT_VERSION@|$GIT_VERSION|g" \
> + -e "s|@LOCALEDIR@|$PERL_LOCALEDIR|g" \
> + -e "s|@NO_GETTEXT@|$NO_GETTEXT|g" \
> + -e "s|@NO_PERL_CPAN_FALLBACKS@|$NO_PERL_CPAN_FALLBACKS|g" \
> "$INPUT" >"$OUTPUT"
> -chmod a+x "$OUTPUT"
> +
> +case "$(basename "$INPUT")" inNit: there's no need to call "basename" here as "*" will match directory separators in a case statement.
Best Wishes
Phillip
Show 5 quoted lines
> +*.perl) > + chmod a+x "$OUTPUT";; > +*) > + ;; > +esac