#################### 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=\\
+# 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
-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)
-.ELSE
-N=$(DONTUSETHIS)
+NEWDMAKE = undef
.ENDIF
o *= .obj
# -- 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) ~ \
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) ~ \
useperlio=$(USE_PERLIO) ~ \
uselargefiles=$(USE_LARGE_FILES) ~ \
usesitecustomize=$(USE_SITECUST) ~ \
- LINK_FLAGS=$(LINK_FLAGS:s,\,$B,) ~ \
+ LINK_FLAGS=$(LINK_FLAGS) ~ \
optimize=$(OPTIMIZE)
#
# Top targets
#
-all : .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
+all : CHECKDMAKE .\config.h $(GLOBEXE) $(MINIPERL) $(MK2) \
$(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
$(X2P) MakePPPort Extensions $(PERLSTATIC)
__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
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
$(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)
$(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)
$(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
$(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
$(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)
$(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) \