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.
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")" in
Nit: there's no need to call "basename" here as "*" will match directory
separators in a case statement.
Best Wishes
Phillip
+*.perl)
+ chmod a+x "$OUTPUT";;
+*)
+ ;;
+esac