Change 31300 by [EMAIL PROTECTED] on 2007/05/29 08:09:38
win32/makefile.mk doesn't support GSAR's old dmake (because of
the use of || and && in conditional expressions, which that old
dmake doesn't understand), so stop with a helpful error message
if such a dmake is being used.
There is now no need to have all the clutter of trying to support
different backslash and newline semantics, so ditch that too.
Affected files ...
... //depot/perl/win32/makefile.mk#373 edit
Differences ...
==== //depot/perl/win32/makefile.mk#373 (text) ====
Index: perl/win32/makefile.mk
--- perl/win32/makefile.mk#372~31245~ 2007-05-20 16:10:15.000000000 -0700
+++ perl/win32/makefile.mk 2007-05-29 01:09:38.000000000 -0700
@@ -621,26 +621,15 @@
#################### do not edit below this line #######################
############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
-# Some dmake's built with Borland C++, including Sarathy's one at:
-# http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip
-# require backslashes to be doubled-up when written to $(mktmp) files.
-# Other dmake's do not require this and would actually output a double
-# backslash if they were doubled-up.
-.IF "$(shell @type $(mktmp \\))"=="\\"
-B=\\
-.ELSE
-B=\\\
-.ENDIF
-
-# There is a related issue with other escape sequences: Sarathy's old
-# dmake automatically maps escape sequences like \n to their ASCII values
-# when used in macros, while other dmake's only do so if this behaviour
-# is explicitly requested with the :m modifier.
-DONTUSETHIS=\n
-.IF "$(shell @type $(mktmp \n))"=="\n"
-N=$(DONTUSETHIS:m)
+# Some old dmakes (including Sarathy's one at
+# http://search.cpan.org/CPAN/authors/id/G/GS/GSAR/dmake-4.1pl1-win32.zip)
+# don't support logical OR (||) or logical AND (&&) in conditional
+# expressions and hence don't process this makefile correctly. Determine
+# whether this is the case so that we can give the user an error message.
+.IF 1 == 1 || 1 == 1
+NEWDMAKE = define
.ELSE
-N=$(DONTUSETHIS)
+NEWDMAKE = undef
.ENDIF
o *= .obj
@@ -955,8 +944,8 @@
# -- BKS 10-17-1999
CFG_VARS = \
INST_DRV=$(INST_DRV) ~ \
- INST_TOP=$(INST_TOP:s,\,$B,) ~ \
- INST_VER=$(INST_VER:s,\,$B,) ~ \
+ INST_TOP=$(INST_TOP) ~ \
+ INST_VER=$(INST_VER) ~ \
INST_ARCH=$(INST_ARCH) ~ \
archname=$(ARCHNAME) ~ \
cc=$(CC) ~ \
@@ -966,9 +955,9 @@
d_crypt=$(D_CRYPT) ~ \
d_mymalloc=$(PERL_MALLOC) ~ \
libs=$(LIBFILES:f) ~ \
- incpath=$(CCINCDIR:s,\,$B,) ~ \
+ incpath=$(CCINCDIR) ~ \
libperl=$(PERLIMPLIB:f) ~ \
- libpth=$(CCLIBDIR:s,\,$B,);$(EXTRALIBDIRS:s,\,$B,) ~
\
+ libpth=$(CCLIBDIR);$(EXTRALIBDIRS) ~ \
libc=$(LIBC) ~ \
make=dmake ~ \
_o=$(o) ~ \
@@ -982,7 +971,7 @@
useperlio=$(USE_PERLIO) ~ \
uselargefiles=$(USE_LARGE_FILES) ~ \
usesitecustomize=$(USE_SITECUST) ~ \
- LINK_FLAGS=$(LINK_FLAGS:s,\,$B,) ~ \
+ LINK_FLAGS=$(LINK_FLAGS) ~ \
optimize=$(OPTIMIZE)
#
@@ -1012,7 +1001,7 @@
# Top targets
#
-all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
+all : CHECKDMAKE .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
$(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
$(X2P) MakePPPort Extensions $(PERLSTATIC)
@@ -1077,6 +1066,15 @@
__not_needed:
$(NOOP)
+CHECKDMAKE :
+.IF "$(NEWDMAKE)" == "define"
+ $(NOOP)
+.ELSE
+ @echo Your dmake doesn't support ^|^| or ^&^& in conditional
expressions.
+ @echo Please get the latest dmake from
http://search.cpan.org/dist/dmake/
+ @exit 1
+.ENDIF
+
$(GLOBEXE) : perlglob$(o)
.IF "$(CCTYPE)" == "BORLAND"
$(CC) -c -w -v -tWM -I"$(CCINCDIR)" perlglob.c
@@ -1132,13 +1130,13 @@
if not exist $(CCLIBDIR)\PSDK\odbccp32.lib \
cd $(CCLIBDIR)\PSDK && implib odbccp32.lib $(ODBCCP32_DLL)
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
- @$(mktmp c0x32$(o) $(MINI_OBJ:s,\,$B,),$(@:s,\,$B,),,$(LIBFILES),)
+ @$(mktmp c0x32$(o) $(MINI_OBJ),$@,,$(LIBFILES),)
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -v -mconsole -o $@ $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(MINI_OBJ:s,\,$B,) $(LIBFILES) $(LKPOST))
+ $(mktmp $(LKPRE) $(MINI_OBJ) $(LIBFILES) $(LKPOST))
.ELSE
$(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
- @$(mktmp $(LIBFILES) $(MINI_OBJ:s,\,$B,))
+ @$(mktmp $(LIBFILES) $(MINI_OBJ))
$(EMBED_EXE_MANI)
.ENDIF
@@ -1183,30 +1181,28 @@
$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpd -ap $(BLINK_FLAGS) \
- @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,$B,)$N \
- $(@:s,\,$B,),$N \
- $(subst,\,$B $(shell @type Extensions_static)) $(LIBFILES)$N \
- perldll.def$N)
+ @$(mktmp c0d32$(o) $(PERLDLL_OBJ),$@,, \
+ $(shell @type Extensions_static) $(LIBFILES),perldll.def)
$(IMPLIB) $*.lib $@
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,$B,) \
- $(subst,\,$B $(shell @type Extensions_static)) \
- $(LIBFILES) $(LKPOST))
+ $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
+ $(shell @type Extensions_static) \
+ $(LIBFILES) $(LKPOST))
dlltool --output-lib $(PERLIMPLIB) \
--dllname $(PERLDLL:b).dll \
--def perldll.def \
--base-file perl.base \
--output-exp perl.exp
$(LINK32) -mdll -o $@ $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(PERLDLL_OBJ:s,\,$B,) \
- $(subst,\,$B $(shell @type Extensions_static)) \
- $(LIBFILES) perl.exp $(LKPOST))
+ $(mktmp $(LKPRE) $(PERLDLL_OBJ) \
+ $(shell @type Extensions_static) \
+ $(LIBFILES) perl.exp $(LKPOST))
.ELSE
$(LINK32) -dll -def:perldll.def -out:$@ $(BLINK_FLAGS) \
@Extensions_static \
@$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \
- $(PERLDLL_RES:s,\,$B,) $(PERLDLL_OBJ:s,\,$B,))
+ $(PERLDLL_RES) $(PERLDLL_OBJ))
$(EMBED_DLL_MANI)
.ENDIF
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
@@ -1214,20 +1210,20 @@
$(PERLSTATICLIB): Extensions_static
.IF "$(CCTYPE)" == "BORLAND"
$(LIB32) $(LIB_FLAGS) $@ \
- @$(mktmp $(subst,\,$B $(shell @type Extensions_static)) \
- $(PERLDLL_OBJ:s,\,$B,))
+ @$(mktmp $(shell @type Extensions_static) \
+ $(PERLDLL_OBJ))
.ELIF "$(CCTYPE)" == "GCC"
# XXX: It would be nice if MinGW's ar accepted a temporary file, but this
# doesn't seem to work:
# $(LIB32) $(LIB_FLAGS) $@ \
-# $(mktmp $(LKPRE) $(subst,\,$B $(shell @type Extensions_static)) \
-# $(PERLDLL_OBJ:s,\,$B,) $(LKPOST))
+# $(mktmp $(LKPRE) $(shell @type Extensions_static) \
+# $(PERLDLL_OBJ) $(LKPOST))
$(LIB32) $(LIB_FLAGS) $@ \
- $(subst,\,$B $(shell @type Extensions_static)) \
- $(PERLDLL_OBJ:s,\,$B,)
+ $(shell @type Extensions_static) \
+ $(PERLDLL_OBJ)
.ELSE
$(LIB32) $(LIB_FLAGS) -out:$@ @Extensions_static \
- @$(mktmp $(PERLDLL_OBJ:s,\,$B,))
+ @$(mktmp $(PERLDLL_OBJ))
.ENDIF
$(XCOPY) $(PERLSTATICLIB) $(COREDIR)
@@ -1259,13 +1255,13 @@
$(MINIPERL) ..\x2p\s2p.PL
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
- @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,$B,),$(@:s,\,$B,),,$(LIBFILES),)
+ @$(mktmp c0x32$(o) $(X2P_OBJ),$@,,$(LIBFILES),)
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -v -o $@ $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(X2P_OBJ:s,\,$B,) $(LIBFILES) $(LKPOST))
+ $(mktmp $(LKPRE) $(X2P_OBJ) $(LIBFILES) $(LKPOST))
.ELSE
$(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
- @$(mktmp $(LIBFILES) $(X2P_OBJ:s,\,$B,))
+ @$(mktmp $(LIBFILES) $(X2P_OBJ))
$(EMBED_EXE_MANI)
.ENDIF
@@ -1277,13 +1273,13 @@
$(GENUUDMAP) : $(GENUUDMAP_OBJ)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
- @$(mktmp c0x32$(o)
$(GENUUDMAP_OBJ:s,\,$B,),$(@:s,\,$B,),,$(LIBFILES),)
+ @$(mktmp c0x32$(o) $(GENUUDMAP_OBJ),$@,,$(LIBFILES),)
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -v -o $@ $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(GENUUDMAP_OBJ:s,\,$B,) $(LIBFILES) $(LKPOST))
+ $(mktmp $(LKPRE) $(GENUUDMAP_OBJ) $(LIBFILES) $(LKPOST))
.ELSE
$(LINK32) -subsystem:console -out:$@ $(BLINK_FLAGS) \
- @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ:s,\,$B,))
+ @$(mktmp $(LIBFILES) $(GENUUDMAP_OBJ))
$(EMBED_EXE_MANI)
.ENDIF
@@ -1302,10 +1298,8 @@
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
- @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,$B,)$N \
- $(@:s,\,$B,),$N \
- $(PERLIMPLIB:s,\,$B,) $(LIBFILES),$N \
- $(PERLEXE_RES:s,\,$B,)$N)
+ @$(mktmp c0x32$(o) $(PERLEXE_OBJ),$@,, \
+ $(PERLIMPLIB) $(LIBFILES),,$(PERLEXE_RES))
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
$(PERLEXE_OBJ) $(PERLEXE_RES) $(PERLIMPLIB) $(LIBFILES)
@@ -1322,16 +1316,14 @@
$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
- @$(mktmp c0x32$(o) $(PERLEXEST_OBJ:s,\,$B,)$N \
- $(@:s,\,$B,),$N \
- $(subst,\,$B $(shell @type Extensions_static)) \
- $(PERLSTATICLIB:s,\,$B,) $(LIBFILES),$N \
- $(PERLEXE_RES:s,\,$B,)$N)
+ @$(mktmp c0x32$(o) $(PERLEXEST_OBJ),$@,, \
+ $(shell @type Extensions_static) $(PERLSTATICLIB) $(LIBFILES),,
\
+ $(PERLEXE_RES))
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
- $(mktmp $(LKPRE) $(subst,\,$B $(shell @type Extensions_static)) \
- $(PERLSTATICLIB:s,\,$B,) $(LIBFILES) $(PERLEXEST_OBJ) \
- $(PERLEXE_RES:s,\,$B,) $(LKPOST))
+ $(mktmp $(LKPRE) $(shell @type Extensions_static) \
+ $(PERLSTATICLIB) $(LIBFILES) $(PERLEXEST_OBJ) \
+ $(PERLEXE_RES) $(LKPOST))
.ELSE
$(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
@Extensions_static $(PERLSTATICLIB) \
End of Patch.