summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorBram <perl-rt@wizbit.be>2022-08-11 19:02:16 +0200
committerxenu <me@xenu.pl>2022-08-22 21:23:56 +0200
commitbded974f30650c2002b7abfdf8555531ecbfac81 (patch)
tree7204e89f2536b79374d2e571e7d80006e47b4bcc /win32
parenta1e3603d9bc6dda037cac0f2d3dc1dbf59bdf06f (diff)
downloadperl-bded974f30650c2002b7abfdf8555531ecbfac81.tar.gz
win32: Remove trailing backslash from `INST_TOP`
When `INST_TOP` contains a trailing backslash then things go horribly wrong. Example (output slightly altered for readability): C:\...> gmake INST_TOP=C:\Perl\blead\perl\ ... ..\miniperl.exe -I..\lib config_sh.PL "INST_TOP=C:\Perl\blead\perl\" "INST_VER=" "INST_ARCH=" "archname=MSWin32-x64-multi-thread" "cc=gcc" "ld=g++" "ccflags= -DWIN32 -DWIN64 ...." ... Use of uninitialized value $opt{"static_ext"} in split at config_sh.PL line 57. ... Can't open -DWIN32: No such file or directory at config_sh.PL line 335. ... ..\miniperl.exe -I..\lib ..\configpm --chdir=.. Use of uninitialized value $t in string eq at ..\configpm line 345. ... written lib/Config.pod syntax error at lib/Config_heavy.pl line 165, near "x;" Compilation failed in require at ..\configpm line 1144. gmake: *** [GNUmakefile:1195: ..\lib\Config.pm] Error 255 -> The trailing backslash in 'INST_TOP' caused the double quote (in `miniperl.exe config_sh.PL`) to be escaped which messes up the rest of the arguments/the argument parsing leading to the errors. Avoid the errors by removing the trailing backslash. (Tested on Windows 10 with GNU Make v4.2.1)
Diffstat (limited to 'win32')
-rw-r--r--win32/GNUmakefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 1af1535847..7b91d35ab0 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -539,6 +539,9 @@ CPANDIR = ..\cpan
PODDIR = ..\pod
HTMLDIR = .\html
+# Strip trailing backslash from INST_TOP
+override INST_TOP := $(INST_TOP:\=)
+
INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
INST_LIB = $(INST_TOP)$(INST_VER)\lib