summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2013-11-04 03:18:58 -0500
committerTony Cook <tony@develop-help.com>2013-11-12 10:47:13 +1100
commitd9d770874f926b7b4990948b7eecca98fde9e695 (patch)
tree73744cfe0453135bd131ce3cee6c1836eddd3a10 /win32
parent9b4bdfd44e0e6d44a447f231c281f967c7ca35c9 (diff)
downloadperl-d9d770874f926b7b4990948b7eecca98fde9e695.tar.gz
check existence of headers and libs for WinCE in Makefile.ce
Macro LIBC was used since day 1 of WinCE port (commit e1caacb4fd ), but never before defined. On Desktop Win32 Perl, LIBC is msvcrt.lib, so fix corelibc/msvcrt to be LIBC and not part of CELIBS. Then use LIBC in a sanity check. Sanity checks will give an error message, vs running the C compiler and geting cryptic messages about unknown .hs and random missing symbols.
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.ce27
1 files changed, 24 insertions, 3 deletions
diff --git a/win32/Makefile.ce b/win32/Makefile.ce
index b73e6e3baa..bd1da4c503 100644
--- a/win32/Makefile.ce
+++ b/win32/Makefile.ce
@@ -530,10 +530,11 @@ CELIB = celib.lib
CELIBS = -nodefaultlib \
ws2.lib $(CELIB) coredll.lib
+#this libc's purpose is WinCE entrypoint to main wrapper, not a real C std lib
!if $(CEVersion) > 200
-CELIBS = $(CELIBS) corelibc.lib
+LIBC = corelibc.lib
!else
-CELIBS = $(CELIBS) msvcrt.lib
+LIBC = msvcrt.lib
!endif
LIBBASEFILES = $(CRYPT_LIB) $(CELIBS)
@@ -899,6 +900,26 @@ XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\malloc.obj
XDLLOBJS = $(XDLLOBJS) $(DLLDIR)\fcrypt.obj
!ENDIF
+#sanity checks to make sure all our external files (celib, w32console, and
+#MS CE SDK) are locatable
+lib_check :
+ @if not exist $(CECONSOLEDIR)\$(MACHINE)\w32console.obj cmd /k \
+ "echo w32console.obj doesn't seem to exist, check your w32console directory \
+ & exit 1"
+ @if not exist $(CELIBDLLDIR)\$(MACHINE)-release\celib.lib cmd /k \
+ "echo celib.lib doesn't seem to exist, check your celib directory \
+ & exit 1"
+ @for %X in ( $(LIBC) ) do @if exist %~^$LIB:X ( exit 0 ) \
+ else ( echo $(LIBC) doesn't seem to exist, check your build enviroment & exit 1 )
+
+#specific header files to check picked at random
+header_check :
+ @if not exist $(CELIBDLLDIR)\inc\cewin32.h cmd /k \
+ "echo cewin32.h doesn't seem to exist, check your celib directory \
+ & exit 1"
+ @for %X in (ceconfig.h) do @if exist %~^$INCLUDE:X ( exit 0 ) \
+ else ( echo ceconfig.h doesn't seem to exist, check your build enviroment & exit 1 )
+
{$(SRCDIR)}.c{$(DLLDIR)}.obj:
$(CC) -c $(CFLAGS_O) -DPERL_EXTERNAL_GLOB -Fo$(DLLDIR)\ $<
@@ -923,7 +944,7 @@ perldll.def : $(HPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h
$(HPERL) -I..\lib -MCross -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
CCTYPE=$(CCTYPE) -DPERL_DLL=$(PERLDLL) TARG_DIR=..\ > perldll.def
-$(PERLDLL) : $(DLLDIR) perldll.def $(XDLLOBJS) $(PERLDLL_RES)
+$(PERLDLL) : header_check lib_check $(DLLDIR) perldll.def $(XDLLOBJS) $(PERLDLL_RES)
$(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ \
$(SUBSYS) $(LDLIBPATH) \
$(LINK_FLAGS) $(LIBFILES) \