From: Gurusamy Sarathy Date: Sun, 22 Feb 1998 02:40:56 +0000 (+0000) Subject: [win32] get compiler building under win32 (needed Makefile.PL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a321948466e7bb48bfd30dd6612a9a479df612a;p=p5sagit%2Fp5-mst-13.2.git [win32] get compiler building under win32 (needed Makefile.PL hacks that could be applicable to other platforms) p4raw-id: //depot/win32/perl@568 --- diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL index 88bd4ba..bc42a34 100644 --- a/ext/B/Makefile.PL +++ b/ext/B/Makefile.PL @@ -4,6 +4,7 @@ use Config; my $e = $Config{'exe_ext'}; my $o = $Config{'obj_ext'}; my $exeout_flag = '-o '; +my @extras = (); if ($^O eq 'MSWin32') { if ($Config{'cc'} =~ /^cl/i) { $exeout_flag = '-Fe'; @@ -11,11 +12,19 @@ if ($^O eq 'MSWin32') { elsif ($Config{'cc'} =~ /^bcc/i) { $exeout_flag = '-e'; } + # XXX this probably applies to everyone else + @extras = ( + OBJECT => "B$o byterun$o", + depend => { + "B$o" => "B.c ../../bytecode.h ../../byterun.h", + "byterun$o" => "../../byterun.c ../../bytecode.h ../../byterun.h", + }); } WriteMakefile( NAME => "B", VERSION => "a5", + @extras, clean => { FILES => "perl byteperl$e *$o B.c *~" } diff --git a/win32/Makefile b/win32/Makefile index 3e1ad86..ee7e757 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -307,7 +307,7 @@ CORE_H = ..\av.h \ .\include\sys\socket.h \ .\win32.h -DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread +DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread B STATIC_EXT=DynaLoader DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader @@ -318,6 +318,7 @@ SDBM_FILE=$(EXTDIR)\SDBM_File\SDBM_File IO=$(EXTDIR)\IO\IO ATTRS=$(EXTDIR)\attrs\attrs THREAD=$(EXTDIR)\Thread\Thread +B=$(EXTDIR)\B\B SOCKET_DLL=..\lib\auto\Socket\Socket.dll FCNTL_DLL=..\lib\auto\Fcntl\Fcntl.dll @@ -326,6 +327,7 @@ SDBM_FILE_DLL=..\lib\auto\SDBM_File\SDBM_File.dll IO_DLL=..\lib\auto\IO\IO.dll ATTRS_DLL=..\lib\auto\attrs\attrs.dll THREAD_DLL=..\lib\auto\Thread\Thread.dll +B_DLL=..\lib\auto\B\B.dll STATICLINKMODULES=DynaLoader DYNALOADMODULES= \ @@ -335,7 +337,8 @@ DYNALOADMODULES= \ $(SDBM_FILE_DLL)\ $(IO_DLL) \ $(ATTRS_DLL) \ - $(THREAD_DLL) + $(THREAD_DLL) \ + $(B_DLL) POD2HTML=$(PODDIR)\pod2html POD2MAN=$(PODDIR)\pod2man @@ -470,7 +473,7 @@ $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs -$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs +$(B_DLL): $(PERLEXE) $(B).xs cd $(EXTDIR)\$(*B) ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl $(MAKE) @@ -482,6 +485,11 @@ $(THREAD_DLL): $(PERLEXE) $(THREAD).xs $(MAKE) cd ..\..\win32 +$(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs + cd $(EXTDIR)\$(*B) + ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl + $(MAKE) + cd ..\..\win32 $(IO_DLL): $(PERLEXE) $(CONFIGPM) $(IO).xs cd $(EXTDIR)\$(*B) @@ -539,9 +547,9 @@ distclean: clean $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) -del /f *.def *.map -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \ - $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL) + $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL) $(B_DLL) -del /f $(SOCKET).c $(IO).c $(SDBM_FILE).c $(FCNTL).c $(OPCODE).c \ - $(DYNALOADER).c $(ATTRS).c $(THREAD).c + $(DYNALOADER).c $(ATTRS).c $(THREAD).c $(B).c -del /f $(PODDIR)\*.html -del /f $(PODDIR)\*.bat -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c \ diff --git a/win32/makefile.mk b/win32/makefile.mk index aed9f59..7b2eb7d 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -418,7 +418,7 @@ CORE_H = ..\av.h \ .\include\sys\socket.h \ .\win32.h -DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread +DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread B STATIC_EXT=DynaLoader DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader @@ -429,6 +429,7 @@ SDBM_FILE=$(EXTDIR)\SDBM_File\SDBM_File IO=$(EXTDIR)\IO\IO ATTRS=$(EXTDIR)\attrs\attrs THREAD=$(EXTDIR)\Thread\Thread +B=$(EXTDIR)\B\B SOCKET_DLL=..\lib\auto\Socket\Socket.dll FCNTL_DLL=..\lib\auto\Fcntl\Fcntl.dll @@ -437,6 +438,7 @@ SDBM_FILE_DLL=..\lib\auto\SDBM_File\SDBM_File.dll IO_DLL=..\lib\auto\IO\IO.dll ATTRS_DLL=..\lib\auto\attrs\attrs.dll THREAD_DLL=..\lib\auto\Thread\Thread.dll +B_DLL=..\lib\auto\B\B.dll STATICLINKMODULES=DynaLoader DYNALOADMODULES= \ @@ -446,7 +448,8 @@ DYNALOADMODULES= \ $(SDBM_FILE_DLL)\ $(IO_DLL) \ $(ATTRS_DLL) \ - $(THREAD_DLL) + $(THREAD_DLL) \ + $(B_DLL) POD2HTML=$(PODDIR)\pod2html POD2MAN=$(PODDIR)\pod2man @@ -643,6 +646,11 @@ $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs +$(B_DLL): $(PERLEXE) $(B).xs + cd $(EXTDIR)\$(*B) && \ + ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl + cd $(EXTDIR)\$(*B) && $(MAKE) + $(THREAD_DLL): $(PERLEXE) $(THREAD).xs cd $(EXTDIR)\$(*B) && \ ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl @@ -700,9 +708,9 @@ distclean: clean $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) -del /f *.def *.map -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \ - $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL) + $(OPCODE_DLL) $(ATTRS_DLL) $(THREAD_DLL) $(B_DLL) -del /f $(SOCKET).c $(IO).c $(SDBM_FILE).c $(FCNTL).c $(OPCODE).c \ - $(DYNALOADER).c $(ATTRS).c $(THREAD).c + $(DYNALOADER).c $(ATTRS).c $(THREAD).c $(B).c -del /f $(PODDIR)\*.html -del /f $(PODDIR)\*.bat -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new