summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--ext/Encode/Byte/Makefile.PL1
-rw-r--r--ext/Encode/CN/Makefile.PL1
-rw-r--r--ext/Encode/EBCDIC/Makefile.PL1
-rw-r--r--ext/Encode/JP/Makefile.PL1
-rw-r--r--ext/Encode/KR/Makefile.PL1
-rw-r--r--ext/Encode/Symbol/Makefile.PL1
-rw-r--r--ext/Encode/TW/Makefile.PL1
-rw-r--r--utf8.c9
-rw-r--r--win32/buildext.pl28
-rw-r--r--wince/FindExt.pm66
-rw-r--r--wince/Makefile.ce25
-rw-r--r--wince/config.ce2
-rw-r--r--wince/config_H.ce2
14 files changed, 54 insertions, 86 deletions
diff --git a/MANIFEST b/MANIFEST
index d0d33e3def..39cd432153 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2754,7 +2754,6 @@ wince/config_H.ce WinCE port
wince/config_h.PL WinCE port
wince/config_sh.PL WinCE port
wince/dl_win32.xs WinCE port
-wince/FindExt.pm WinCE port
wince/include/arpa/inet.h WinCE port
wince/include/netdb.h WinCE port
wince/include/sys/socket.h WinCE port
diff --git a/ext/Encode/Byte/Makefile.PL b/ext/Encode/Byte/Makefile.PL
index 5f67d8bd6c..3fe7345ead 100644
--- a/ext/Encode/Byte/Makefile.PL
+++ b/ext/Encode/Byte/Makefile.PL
@@ -172,6 +172,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q" -"O"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/ext/Encode/CN/Makefile.PL b/ext/Encode/CN/Makefile.PL
index 775a8f5b38..1dd713a193 100644
--- a/ext/Encode/CN/Makefile.PL
+++ b/ext/Encode/CN/Makefile.PL
@@ -149,6 +149,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/ext/Encode/EBCDIC/Makefile.PL b/ext/Encode/EBCDIC/Makefile.PL
index f2113fa738..73152ee2f9 100644
--- a/ext/Encode/EBCDIC/Makefile.PL
+++ b/ext/Encode/EBCDIC/Makefile.PL
@@ -130,6 +130,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q" -"O"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/ext/Encode/JP/Makefile.PL b/ext/Encode/JP/Makefile.PL
index a1df35d169..b4a4ed0c4e 100644
--- a/ext/Encode/JP/Makefile.PL
+++ b/ext/Encode/JP/Makefile.PL
@@ -149,6 +149,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/ext/Encode/KR/Makefile.PL b/ext/Encode/KR/Makefile.PL
index 4ba99ab82d..88fce2437a 100644
--- a/ext/Encode/KR/Makefile.PL
+++ b/ext/Encode/KR/Makefile.PL
@@ -147,6 +147,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/ext/Encode/Symbol/Makefile.PL b/ext/Encode/Symbol/Makefile.PL
index a436b4d655..e1fa906e24 100644
--- a/ext/Encode/Symbol/Makefile.PL
+++ b/ext/Encode/Symbol/Makefile.PL
@@ -135,6 +135,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q" -"O"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/ext/Encode/TW/Makefile.PL b/ext/Encode/TW/Makefile.PL
index 8f12a81aee..65cc22486e 100644
--- a/ext/Encode/TW/Makefile.PL
+++ b/ext/Encode/TW/Makefile.PL
@@ -145,6 +145,7 @@ sub postamble
}
}
my $plib = $self->{PERL_CORE} ? '"-I$(PERL_LIB)"' : '';
+ $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
my $ucopts = '-"Q"';
$str .=
qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
diff --git a/utf8.c b/utf8.c
index efcc602bb1..c2818c82fa 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1348,15 +1348,6 @@ Perl_to_utf8_case(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, char *norma
HE *he;
SV *val;
-#if defined(UNDER_CE)
-/*strange: compiler complaints that I redefine macro UVXf and points where
- it was first defined. I copied line from there without any changes.
- Nothing should change.
- But when I do not do this, there is an error on a line with
- Perl_newSVpvf(aTHX_ "%04"UVXf, uv1)
-*/
-#define UVXf "lX" /**/
-#endif
if ((hv = get_hv(special, FALSE)) &&
(keysv = sv_2mortal(Perl_newSVpvf(aTHX_ "%04"UVXf, uv1))) &&
(he = hv_fetch_ent(hv, keysv, FALSE, 0)) &&
diff --git a/win32/buildext.pl b/win32/buildext.pl
index 7125753709..65b79beb94 100644
--- a/win32/buildext.pl
+++ b/win32/buildext.pl
@@ -4,7 +4,7 @@ buildext.pl - build extensions
=head1 SYNOPSIS
- buildext.pl make [-make_opts] dep directory [target]
+ buildext.pl make [-make_opts] dep directory [target] !ext1 !ext2
E.g.
@@ -16,11 +16,19 @@ E.g.
buildext.pl dmake perldll.def ..\ext clean
+Will skip building extensions which are marked with an '!' char.
+Mostly because they still not ported to specified platform.
+
=cut
use File::Basename;
use Cwd;
use FindExt;
+
+# @ARGV with '!' at first position are exclusions
+my %excl = map {$_=>1} map {/^!(.*)$/} @ARGV;
+@ARGV = grep {!/^!/} @ARGV;
+
my $here = getcwd();
my $perl = $^X;
$here =~ s,/,\\,g;
@@ -36,7 +44,7 @@ my $pl2bat = "$topdir\\win32\\bin\\pl2bat";
unless (-f "$pl2bat.bat") {
my @args = ($perl, ("$pl2bat.pl") x 2);
print "@args\n";
- system(@args);
+ system(@args) unless defined $::Cross::platform;
}
my $make = shift;
$make .= " ".shift while $ARGV[0]=~/^-/;
@@ -46,12 +54,17 @@ my $dir = shift;
chdir($dir) || die "Cannot cd to $dir\n";
my $targ = shift;
(my $ext = getcwd()) =~ s,/,\\,g;
+my $code;
FindExt::scan_ext($ext);
my @ext = FindExt::extensions();
foreach my $dir (sort @ext)
{
+ if (exists $excl{$dir}) {
+ warn "Skipping extension $ext\\$dir, not ported to current platform";
+ next;
+ }
if (chdir("$ext\\$dir"))
{
my $mmod = -M 'Makefile';
@@ -60,8 +73,11 @@ foreach my $dir (sort @ext)
print "\nRunning Makefile.PL in $dir\n";
my @perl = ($perl, "-I$here\\..\\lib", 'Makefile.PL',
'INSTALLDIRS=perl', 'PERL_CORE=1');
+ if (defined $::Cross::platform) {
+ @perl = (@perl[0,1],"-MCross=$::Cross::platform",@perl[2..$#perl]);
+ }
print join(' ', @perl), "\n";
- my $code = system(@perl);
+ $code = system(@perl);
warn "$code from $dir's Makefile.PL" if $code;
$mmod = -M 'Makefile';
if ($mmod > $dmod)
@@ -72,12 +88,14 @@ foreach my $dir (sort @ext)
if ($targ)
{
print "Making $targ in $dir\n$make $targ\n";
- system("$make $targ");
+ $code = system("$make $targ");
+ die "Unsuccessful make($dir): code=$code" if $code!=0;
}
else
{
print "Making $dir\n$make\n";
- system($make);
+ $code = system($make);
+ die "Unsuccessful make($dir): code=$code" if $code!=0;
}
chdir($here) || die "Cannot cd to $here:$!";
}
diff --git a/wince/FindExt.pm b/wince/FindExt.pm
deleted file mode 100644
index 30392687d1..0000000000
--- a/wince/FindExt.pm
+++ /dev/null
@@ -1,66 +0,0 @@
-package FindExt;
-
-our $VERSION = '1.00';
-
-use strict;
-use File::Find;
-use File::Basename;
-use Cwd;
-
-my $no = join('|',qw(DynaLoader GDBM_File ODBM_File NDBM_File DB_File
- Syslog SysV Langinfo));
-$no = qr/^(?:$no)$/i;
-
-my %ext;
-my $ext;
-sub scan_ext
-{
- my $here = getcwd();
- my $dir = shift;
- chdir($dir) || die "Cannot cd to $dir\n";
- ($ext = getcwd()) =~ s,/,\\,g;
- find(\&find_ext,'.');
- chdir($here) || die "Cannot cd to $here\n";
- my @ext = extensions();
-}
-
-sub dynamic_extensions
-{
- return grep $ext{$_} eq 'dynamic',keys %ext;
-}
-
-sub noxs_extensions
-{
- return grep $ext{$_} eq 'nonxs',keys %ext;
-}
-
-sub extensions
-{
- return keys %ext;
-}
-
-sub find_ext
-{
- if (/^(.*)\.pm$/i || /^(.*)_pm\.PL$/i || /^(.*)\.xs$/i)
- {
- my $name = $1;
- return if $name =~ $no;
- my $dir = $File::Find::dir;
- $dir =~ s,./,,;
- return if exists $ext{$dir};
- return unless -f "$ext/$dir/Makefile.PL";
- if ($dir =~ /$name$/i)
- {
- if (-f "$ext/$dir/$name.xs")
- {
- $ext{$dir} = 'dynamic';
- }
- else
- {
- $ext{$dir} = 'nonxs';
- }
- }
- }
-}
-
-1;
diff --git a/wince/Makefile.ce b/wince/Makefile.ce
index 272769a53b..55f9dfea1d 100644
--- a/wince/Makefile.ce
+++ b/wince/Makefile.ce
@@ -526,6 +526,12 @@ PERLEXE = $(MACHINE)\perl.exe
CONFIGPM = ..\xlib\$(CROSS_NAME)\Config.pm
MINIMOD = ..\lib\ExtUtils\Miniperl.pm
+# Nominate a target which causes extensions to be re-built
+# This used to be $(PERLEXE), but at worst it is the .dll that they depend
+# on and really only the interface - i.e. the .def file used to export symbols
+# from the .dll
+PERLDEP = perldll.def
+
MAKE = nmake -nologo
CFGSH_TMPL = config.ce
@@ -534,7 +540,7 @@ CFGH_TMPL = config_H.ce
#
# filenames given to xsubpp must have forward slashes (since it puts
# full pathnames in #line strings)
-XSUBPP = $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) ...\$(EXTUTILSDIR)\xsubpp \
+XSUBPP = $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) ..\$(EXTUTILSDIR)\xsubpp \
-C++ -prototypes
MICROCORE_SRC = \
@@ -760,20 +766,21 @@ all: hostminiperl $(MINIMOD) $(CONFIGPM) $(PERLEXE)
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
$(CONFIGPM): .\config.h ..\config.sh ..\minimod.pl
- cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
+ cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
-mkdir $(XCOREDIR)
$(XCOPY) ..\*.h $(XCOREDIR)\*.*
$(XCOPY) *.h $(XCOREDIR)\*.*
$(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
$(RCOPY) include $(XCOREDIR)\*.*
- $(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)"
+ -$(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)"
+ if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
.\config.h:
-del /f config.h
copy config_H.ce config.h
..\config.sh: config.ce config_sh.PL
- $(HPERL) -I..\lib config_sh.PL $(CFG_VARS) config.ce > ..\config.sh
+ $(HPERL) -I..\lib -I..\win32 config_sh.PL $(CFG_VARS) config.ce > ..\config.sh
$(MINIMOD) : ..\minimod.pl
cd .. && $(HPERL) minimod.pl > lib\ExtUtils\Miniperl.pm
@@ -796,6 +803,16 @@ $(DYNALOADER).c: $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
$(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
+#----------------------------------------------------------------------------------
+Extensions: ..\win32\buildext.pl $(PERLDEP) $(CONFIGPM)
+ $(HPERL) -I..\lib -I..\win32 -MCross=$(CROSS_NAME) ..\win32\buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) \
+ !Errno !File/Glob !POSIX !Time/HiRes
+
+Extensions_clean:
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
+
+#----------------------------------------------------------------------------------
+
$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
cd $(EXTDIR)\Data\$(*B)
$(HPERL) -I..\..\..\lib -MCross Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
diff --git a/wince/config.ce b/wince/config.ce
index 07eed645f3..6582c1c325 100644
--- a/wince/config.ce
+++ b/wince/config.ce
@@ -873,6 +873,7 @@ usevendorprefix='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
+uvXUformat='"lX"'
uvoformat='"lo"'
uvsize='4'
uvtype='unsigned long'
@@ -888,6 +889,7 @@ vendorlibexp=''
vendorprefix=''
vendorprefixexp=''
version='~VERSION~'
+versiononly='undef'
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
diff --git a/wince/config_H.ce b/wince/config_H.ce
index f447ba1a81..04c7eb0a08 100644
--- a/wince/config_H.ce
+++ b/wince/config_H.ce
@@ -3178,7 +3178,7 @@
#define UVuf "lu" /**/
#define UVof "lo" /**/
#define UVxf "lx" /**/
-#define UVXf undef /**/
+#define UVXf "lX" /**/
#define NVef "e" /**/
#define NVff "f" /**/
#define NVgf "g" /**/