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
}
}
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};
}
}
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};
}
}
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};
}
}
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};
}
}
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};
}
}
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};
}
}
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};
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)) &&
=head1 SYNOPSIS
- buildext.pl make [-make_opts] dep directory [target]
+ buildext.pl make [-make_opts] dep directory [target] !ext1 !ext2
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;
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]=~/^-/;
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';
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)
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:$!";
}
+++ /dev/null
-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;
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
#
# 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 = \
$(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
$(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
usevfork='false'
usrinc='/usr/include'
uuname=''
+uvXUformat='"lX"'
uvoformat='"lo"'
uvsize='4'
uvtype='unsigned long'
vendorprefix=''
vendorprefixexp=''
version='~VERSION~'
+versiononly='undef'
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
#define UVuf "lu" /**/
#define UVof "lo" /**/
#define UVxf "lx" /**/
-#define UVXf undef /**/
+#define UVXf "lX" /**/
#define NVef "e" /**/
#define NVff "f" /**/
#define NVgf "g" /**/