summaryrefslogtreecommitdiff
path: root/win32/makefile.mk
diff options
context:
space:
mode:
Diffstat (limited to 'win32/makefile.mk')
-rw-r--r--win32/makefile.mk33
1 files changed, 15 insertions, 18 deletions
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 56f17ea77c..dab54d643b 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -122,12 +122,8 @@ CCTYPE *= BORLAND
# set the install locations of the compiler include/libraries
# Running VCVARS32.BAT is *required* when using Visual C.
# Some versions of Visual C don't define MSVCDIR in the environment,
-# so you may have to set CCHOME explicitly.
-#
-# If the path contains spaces, you can try putting it in double
-# quotes, but support for this is not well-tested, and various
-# other things may break, so you're kinda on your own if you are
-# into specious paths. :-)
+# so you may have to set CCHOME explicitly (spaces in the path name should
+# not be quoted)
#
CCHOME *= C:\bc5
#CCHOME *= $(MSVCDIR)
@@ -147,7 +143,8 @@ CCLIBDIR *= $(CCHOME)\lib
#BUILDOPT *= -DPERL_POLLUTE
#
-# specify space-separated list of extra directories to look for libraries
+# specify semicolon-separated list of extra directories that modules will
+# look for libraries (spaces in path names need not be quoted)
#
EXTRALIBDIRS *=
@@ -220,7 +217,7 @@ IMPLIB = implib -c
# Options
#
RUNTIME = -D_RTLDLL
-INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I$(CCINCDIR)
+INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -I"$(CCINCDIR)"
#PCHFLAGS = -H -Hc -H=c:\temp\bcmoduls.pch
DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG)
LOCDEFS = -DPERLDLL -DPERL_CORE
@@ -240,7 +237,7 @@ LINK_DBG =
CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
+LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
OBJOUT_FLAG = -o
EXEOUT_FLAG = -e
LIBOUT_FLAG =
@@ -278,7 +275,7 @@ LINK_DBG =
.ENDIF
CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
-LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) $(EXTRALIBDIRS:^"-L")
+LINK_FLAGS = $(LINK_DBG) -L"$(CCLIBDIR)"
OBJOUT_FLAG = -o
EXEOUT_FLAG = -o
LIBOUT_FLAG =
@@ -705,14 +702,14 @@ CFG_VARS = \
"INST_VER=$(INST_VER)" \
"archname=$(ARCHNAME)" \
"cc=$(CC)" \
- "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)" \
+ "ccflags=$(OPTIMIZE:s/"/\"/) $(DEFINES) $(OBJECT)" \
"cf_email=$(EMAIL)" \
"d_crypt=$(D_CRYPT)" \
"d_mymalloc=$(PERL_MALLOC)" \
"libs=$(LIBFILES:f)" \
- "incpath=$(CCINCDIR)" \
+ "incpath=$(CCINCDIR:s/"/\"/)" \
"libperl=$(PERLIMPLIB:f)" \
- "libpth=$(strip $(CCLIBDIR) $(EXTRALIBDIRS) $(LIBFILES:d))" \
+ "libpth=$(CCLIBDIR:s/"/\"/);$(EXTRALIBDIRS:s/"/\"/)" \
"libc=$(LIBC)" \
"make=dmake" \
"_o=$(o)" "obj_ext=$(o)" \
@@ -722,8 +719,8 @@ CFG_VARS = \
"nonxs_ext=$(NONXS_EXT)" \
"usethreads=$(USE_THREADS)" \
"usemultiplicity=$(USE_MULTI)" \
- "LINK_FLAGS=$(LINK_FLAGS)" \
- "optimize=$(OPTIMIZE)"
+ "LINK_FLAGS=$(LINK_FLAGS:s/"/\"/)" \
+ "optimize=$(OPTIMIZE:s/"/\"/)"
#
# Top targets
@@ -738,9 +735,9 @@ $(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
$(GLOBEXE) : perlglob$(o)
.IF "$(CCTYPE)" == "BORLAND"
- $(CC) -c -w -v -tWM -I$(CCINCDIR) perlglob.c
+ $(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
$(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32$(o) perlglob$(o) \
- $(CCLIBDIR)\32BIT\wildargs$(o),$@,,import32.lib cw32mt.lib,
+ "$(CCLIBDIR)\32BIT\wildargs$(o)",$@,,import32.lib cw32mt.lib,
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) $(LINK_FLAGS) -o $@ perlglob$(o) $(LIBFILES)
.ELSE
@@ -768,7 +765,7 @@ regen_config_h:
-cd .. && del /f perl.exe
cd .. && perl configpm
-del /f $(CFGH_TMPL)
- -mkdir ..\lib\CORE
+ -mkdir $(COREDIR)
-perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
rename config.h $(CFGH_TMPL)