From: Gurusamy Sarathy Date: Fri, 14 Nov 1997 05:14:44 +0000 (+0000) Subject: Fix various details in win32 makefiles and Config.pm setup. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc0502853eaa4689351eeccc4becf89ec85060e0;p=p5sagit%2Fp5-mst-13.2.git Fix various details in win32 makefiles and Config.pm setup. - ldflags is set for both compilers now - extensions list is now correct - delete perl95.exe on distclean - cf_time now gets updated (once) - ccdlflags is set for Borland - fix startperl so dprofpp works p4raw-id: //depot/win32/perl@249 --- diff --git a/win32/Makefile b/win32/Makefile index 5d24130..d2e4641 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -86,7 +86,7 @@ LIBFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib \ version.lib odbc32.lib odbccp32.lib CFLAGS = -nologo -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) -LINK_FLAGS = -nologo $(LIBFILES) $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) +LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) OBJOUT_FLAG = -Fo #################### do not edit below this line ####################### @@ -103,7 +103,7 @@ OBJOUT_FLAG = -Fo .obj.dll: $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ - -out:$@ $(LINK_FLAGS) $< $(LIBPERL) + -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) # INST_BIN=$(INST_TOP)\bin @@ -244,7 +244,8 @@ CORE_H = ..\av.h \ .\include\sys\socket.h \ .\win32.h -EXTENSIONS=DynaLoader Socket IO Fcntl Opcode SDBM_File attrs Thread +DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread +STATIC_EXT=DynaLoader DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader SOCKET=$(EXTDIR)\Socket\Socket @@ -289,7 +290,8 @@ $(DYNALOADER).obj : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c #------------------------------------------------------------ $(GLOBEXE): perlglob.obj - $(LINK32) $(LINK_FLAGS) -out:$@ -subsystem:$(SUBSYS) perlglob.obj setargv.obj + $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ + perlglob.obj setargv.obj $(GLOBBAT) : ..\lib\File\DosGlob.pm $(MINIPERL) $(MINIPERL) $(PL2BAT) - < ..\lib\File\DosGlob.pm > $(GLOBBAT) @@ -311,7 +313,8 @@ config.w32 : $(CFGSH_TMPL) "INST_TOP=$(INST_TOP)" "cc=$(CC)" "ccflags=$(OPTIMIZE) $(DEFINES)" \ "cf_email=$(EMAIL)" "libs=$(LIBFILES)" "incpath=$(CCINCDIR)" \ "libpth=$(CCLIBDIR)" "libc=$(LIBC)" \ - "LINK_FLAGS=$(LINK_FLAGS)" \ + "static_ext=$(STATIC_EXT)" "dynamic_ext=$(DYNAMIC_EXT)" \ + "ldflags=$(LINK_FLAGS)" "optimize=$(OPTIMIZE)" \ config.w32 > ..\config.sh $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl @@ -325,7 +328,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl $(MINIPERL) : ..\miniperlmain.obj $(CORE_OBJ) $(WIN32_OBJ) $(LINK32) -subsystem:console -out:$@ @<< - $(LINK_FLAGS) ..\miniperlmain.obj $(CORE_OBJ) $(WIN32_OBJ) + $(LINK_FLAGS) $(LIBFILES) ..\miniperlmain.obj $(CORE_OBJ) $(WIN32_OBJ) << $(WIN32_OBJ) : $(CORE_H) @@ -337,7 +340,7 @@ perldll.def : $(MINIPERL) $(CONFIGPM) $(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) $(LINK32) -dll -def:perldll.def -out:$@ @<< - $(LINK_FLAGS) $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) + $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) << $(XCOPY) $(PERLIMPLIB) ..\lib\CORE @@ -354,7 +357,7 @@ perlmain.obj : perlmain.c $(CC) $(CFLAGS) -UPERLDLL -c perlmain.c $(PERLEXE): $(PERLDLL) $(CONFIGPM) perlmain.obj - $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) \ + $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) $(LIBFILES) \ perlmain.obj $(WINIOMAYBE) $(PERLIMPLIB) copy perl.exe $@ del perl.exe @@ -374,7 +377,7 @@ win32mt.obj : win32.c $(CC) $(CFLAGS) -MT -c $(OBJOUT_FLAG)win32mt.obj win32.c $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ) - $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) \ + $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) $(LIBFILES) \ $(PERL95_OBJ) $(PERLIMPLIB) copy perl95.exe $@ del perl95.exe @@ -454,7 +457,7 @@ utils: $(PERLEXE) bin\pl2bat.pl distclean: clean - -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ + -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \ $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) -del /f *.def *.map -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \ diff --git a/win32/config.bc b/win32/config.bc index 60e9b47..5dd96fd 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -11,8 +11,8 @@ cc='bcc32' ccflags='-DWIN32' cppflags='-DWIN32' dlsrc='dl_win32.xs' -dynamic_ext='Fcntl IO Opcode SDBM_File Socket' -extensions='Fcntl IO Opcode SDBM_File Socket' +dynamic_ext='Socket IO Fcntl Opcode SDBM_File attrs Thread' +extensions='~static_ext~ ~dynamic_ext~' installarchlib='~INST_TOP~\lib' installprivlib='~INST_TOP~\lib' libpth='' @@ -26,7 +26,7 @@ shsharp='true' sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL' so='dll' startsh='#!/bin/sh' -static_ext=' ' +static_ext='DynaLoader' Author='' CONFIG='true' Date='$Date' @@ -60,10 +60,10 @@ c='' castflags='0' cat='type' cccdlflags=' ' -ccdlflags=' ' -cf_by='garyng' -cf_email='71564.1743@compuserve.com' -cf_time='Thu Apr 11 06:20:49 PDT 1996' +ccdlflags='-tWD' +cf_by='nobody' +cf_email='nobody@no.where.net' +cf_time='' chgrp='' chmod='' chown='' @@ -357,12 +357,12 @@ installscript='~INST_TOP~\bin' installsitearch='~INST_TOP~\lib\site' installsitelib='~INST_TOP~\lib\site' intsize='4' -known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket' +known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket IO attrs Thread' ksh='' large='' ld='tlink32' lddlflags='-Tpd' -ldflags='~LINK_FLAGS~' +ldflags='' less='less' lib_ext='.lib' libc='cw32mti.lib' @@ -411,7 +411,7 @@ o_nonblock='O_NONBLOCK' obj_ext='.obj' oldarchlib='' oldarchlibexp='' -optimize='-O' +optimize='-O2' orderlib='false' package='perl5' pager='more /e' @@ -462,7 +462,7 @@ spackage='Perl5' spitshell='' split='' ssizetype='int' -startperl='#perl' +startperl='#!perl' stdchar='unsigned char' stdio_base='((fp)->buffer)' stdio_bufsiz='((fp)->level + (fp)->curp - (fp)->buffer)' diff --git a/win32/config.vc b/win32/config.vc index 2bce3b2..d34b1f9 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -11,8 +11,8 @@ cc='cl' ccflags='-MD -DWIN32' cppflags='-DWIN32' dlsrc='dl_win32.xs' -dynamic_ext='Fcntl IO Opcode SDBM_File Socket' -extensions='Fcntl IO Opcode SDBM_File Socket' +dynamic_ext='Socket IO Fcntl Opcode SDBM_File attrs Thread' +extensions='~static_ext~ ~dynamic_ext~' installarchlib='~INST_TOP~\lib' installprivlib='~INST_TOP~\lib' libpth='' @@ -26,7 +26,7 @@ shsharp='true' sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL' so='dll' startsh='#!/bin/sh' -static_ext=' ' +static_ext='DynaLoader' Author='' CONFIG='true' Date='$Date' @@ -61,9 +61,9 @@ castflags='0' cat='type' cccdlflags=' ' ccdlflags=' ' -cf_by='garyng' -cf_email='71564.1743@compuserve.com' -cf_time='Thu Apr 11 06:20:49 PDT 1996' +cf_by='nobody' +cf_email='nobody@no.where.net' +cf_time='' chgrp='' chmod='' chown='' @@ -357,7 +357,7 @@ installscript='~INST_TOP~\bin' installsitearch='~INST_TOP~\lib\site' installsitelib='~INST_TOP~\lib\site' intsize='4' -known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket' +known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket IO attrs Thread' ksh='' large='' ld='link' @@ -462,7 +462,7 @@ spackage='Perl5' spitshell='' split='' ssizetype='int' -startperl='#perl' +startperl='#!perl' stdchar='char' stdio_base='((fp)->_base)' stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 0769ef3..0c3713c 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -17,7 +17,15 @@ $opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0] while (<>) { s/~([\w_]+)~/$opt{$1}/g; - $_ = "$1='$opt{$1}'\n" if (/^([\w_]+)=/ && exists($opt{$1})); + if (/^([\w_]+)=(.*)$/) { + # this depends on cf_time being empty in the template (or we'll get a loop) + if ($1 eq 'cf_time') { + $_ = "$1='" . localtime(time) . "'\n" if $2 =~ /^\s*'\s*'/; + } + elsif (exists $opt{$1}) { + $_ = "$1='$opt{$1}'\n"; + } + } print; } diff --git a/win32/makefile.mk b/win32/makefile.mk index 35baed5..2b7dc8c 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -131,7 +131,7 @@ LIBFILES = oldnames.lib kernel32.lib user32.lib gdi32.lib \ version.lib odbc32.lib odbccp32.lib CFLAGS = -nologo -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) -LINK_FLAGS = -nologo $(LIBFILES) $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) +LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) OBJOUT_FLAG = -Fo .ENDIF @@ -157,7 +157,7 @@ OBJOUT_FLAG = -Fo .obj.dll: $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ - -out:$@ $(LINK_FLAGS) $< $(LIBPERL) + -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) .ENDIF @@ -312,7 +312,8 @@ CORE_H = ..\av.h \ .\include\sys\socket.h \ .\win32.h -EXTENSIONS=DynaLoader Socket IO Fcntl Opcode SDBM_File attrs Thread +DYNAMIC_EXT=Socket IO Fcntl Opcode SDBM_File attrs Thread +STATIC_EXT=DynaLoader DYNALOADER=$(EXTDIR)\DynaLoader\DynaLoader SOCKET=$(EXTDIR)\Socket\Socket @@ -362,7 +363,8 @@ $(GLOBEXE): perlglob.obj $(LINK32) -Tpe -ap $(LINK_FLAGS) c0x32.obj perlglob.obj \ $(CCLIBDIR)\32BIT\wildargs.obj,$@,,import32.lib cw32mt.lib, .ELSE - $(LINK32) $(LINK_FLAGS) -out:$@ -subsystem:$(SUBSYS) perlglob.obj setargv.obj + $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ + perlglob.obj setargv.obj .ENDIF $(GLOBBAT) : ..\lib\File\DosGlob.pm $(MINIPERL) @@ -384,7 +386,8 @@ config.w32 : $(CFGSH_TMPL) "INST_TOP=$(INST_TOP)" "cc=$(CC)" "ccflags=$(OPTIMIZE) $(DEFINES)" \ "cf_email=$(EMAIL)" "libs=$(LIBFILES:f)" "incpath=$(CCINCDIR)" \ "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" "libc=$(LIBC)" \ - "LINK_FLAGS=$(LINK_FLAGS)" \ + "static_ext=$(STATIC_EXT)" "dynamic_ext=$(DYNAMIC_EXT)" \ + "ldflags=$(LINK_FLAGS)" "optimize=$(OPTIMIZE)" \ config.w32 > ..\config.sh $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl @@ -403,7 +406,7 @@ $(MINIPERL) : ..\miniperlmain.obj $(CORE_OBJ) $(WIN32_OBJ) $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\),$@,,$(LIBFILES),) .ELSE $(LINK32) -subsystem:console -out:$@ \ - @$(mktmp $(LINK_FLAGS) ..\miniperlmain.obj \ + @$(mktmp $(LINK_FLAGS) $(LIBFILES) ..\miniperlmain.obj \ $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\)) .ENDIF @@ -425,7 +428,7 @@ $(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) $(IMPLIB) $*.lib $@ .ELSE $(LINK32) -dll -def:perldll.def -out:$@ \ - @$(mktmp $(LINK_FLAGS) $(CORE_OBJ:s,\,\\) \ + @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ:s,\,\\) \ $(WIN32_OBJ:s,\,\\) $(DLL_OBJ:s,\,\\)) .ENDIF $(XCOPY) $(PERLIMPLIB) ..\lib\CORE @@ -450,7 +453,7 @@ $(PERLEXE): $(PERLDLL) $(CONFIGPM) perlmain.obj $@,\n \ $(PERLIMPLIB) $(LIBFILES)\n) .ELSE - $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) \ + $(LINK32) -subsystem:console -out:perl.exe $(LINK_FLAGS) $(LIBFILES) \ perlmain.obj $(WINIOMAYBE) $(PERLIMPLIB) copy perl.exe $@ del perl.exe @@ -473,7 +476,7 @@ win32mt.obj : win32.c $(CC) $(CFLAGS) -MT -c $(OBJOUT_FLAG)win32mt.obj win32.c $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ) - $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) \ + $(LINK32) -subsystem:console -out:perl95.exe $(LINK_FLAGS) $(LIBFILES) \ $(PERL95_OBJ) $(PERLIMPLIB) copy perl95.exe $@ del perl95.exe @@ -542,7 +545,7 @@ utils: $(PERLEXE) bin\pl2bat.pl distclean: clean - -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ + -del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \ $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) -del /f *.def *.map -del /f $(SOCKET_DLL) $(IO_DLL) $(SDBM_FILE_DLL) $(FCNTL_DLL) \