From fc71c7c2fce04d50b5c1baa8306a02510bc30f73 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sun, 6 Dec 2020 08:06:03 +0000 Subject: nmake builds: extract {TCL,TK}_RELEASE_SERIAL and patch letters from {tcl,tk}.h --- win/rules.vc | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/win/rules.vc b/win/rules.vc index ab43909..c70effb 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change # the major version. RULES_VERSION_MAJOR = 1 -RULES_VERSION_MINOR = 6 +RULES_VERSION_MINOR = 7 # The PROJECT macro must be defined by parent makefile. !if "$(PROJECT)" == "" @@ -907,10 +907,14 @@ WARNINGS = $(WARNINGS) -Wp64 # Sets the following macros: # TCL_MAJOR_VERSION # TCL_MINOR_VERSION +# TCL_RELEASE_SERIAL # TCL_PATCH_LEVEL +# TCL_PATCH_LETTER # TCL_VERSION # TK_MAJOR_VERSION # TK_MINOR_VERSION +# TK_RELEASE_SERIAL +# TK_PATCH_LEVEL # TK_PATCH_LEVEL # TK_VERSION # DOTVERSION - set as (for example) 2.5 @@ -925,6 +929,9 @@ WARNINGS = $(WARNINGS) -Wp64 !if [echo TCL_MINOR_VERSION = \>> versions.vc] \ && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc] !endif +!if [echo TCL_RELEASE_SERIAL = \>> versions.vc] \ + && [nmakehlp -V "$(_TCL_H)" TCL_RELEASE_SERIAL >> versions.vc] +!endif !if [echo TCL_PATCH_LEVEL = \>> versions.vc] \ && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc] !endif @@ -936,6 +943,9 @@ WARNINGS = $(WARNINGS) -Wp64 !if [echo TK_MINOR_VERSION = \>> versions.vc] \ && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc] !endif +!if [echo TK_RELEASE_SERIAL = \>> versions.vc] \ + && [nmakehlp -V "$(_TK_H)" TK_RELEASE_SERIAL >> versions.vc] +!endif !if [echo TK_PATCH_LEVEL = \>> versions.vc] \ && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc] !endif @@ -945,9 +955,26 @@ WARNINGS = $(WARNINGS) -Wp64 TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) +!if [nmakehlp -f $(TCL_PATCH_LEVEL) "a"] +TCL_PATCH_LETTER = a +!elseif [nmakehlp -f $(TCL_PATCH_LEVEL) "b"] +TCL_PATCH_LETTER = b +!else +TCL_PATCH_LETTER = . +!endif + !if defined(_TK_H) + TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION) TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION) +!if [nmakehlp -f $(TK_PATCH_LEVEL) "a"] +TK_PATCH_LETTER = a +!elseif [nmakehlp -f $(TK_PATCH_LEVEL) "b"] +TK_PATCH_LETTER = b +!else +TK_PATCH_LETTER = . +!endif + !endif # Set DOTVERSION and VERSION -- cgit v0.12 From cf333de0987ad12a325909be7ae372f50d2d28a1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 7 Dec 2020 13:53:21 +0000 Subject: rules.vc: Make sure that 3th "load" argument is titlecased in pkgIndex.tcl --- win/makefile.vc | 2 +- win/rules.vc | 6 +++--- win/targets.vc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 3c6b86e..60b6bf0 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -16,7 +16,7 @@ # General usage: # nmake [-nologo] -f makefile.vc [TARGET|MACRODEF [TARGET|MACRODEF] [...]] # -# For MACRODEF, see TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) +# For MACRODEF, see TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) # or examine Sections 6-8 in rules.vc. # # Possible values of TARGET are: diff --git a/win/rules.vc b/win/rules.vc index c70effb..a0084a4 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -6,7 +6,7 @@ # compiler switches, defining common targets and macros. The Tcl makefile # directly includes this. Extensions include it via "rules-ext.vc". # -# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for +# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for # detailed documentation. # # See the file "license.terms" for information on usage and redistribution @@ -1565,11 +1565,11 @@ default-target: $(DEFAULT_BUILD_TARGET) !if $(MULTIPLATFORM_INSTALL) default-pkgindex: @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \ - [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl + [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl !else default-pkgindex: @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \ - [list load [file join $$dir $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl + [list load [file join $$dir $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl !endif default-pkgindex-tea: diff --git a/win/targets.vc b/win/targets.vc index 6bfebc7..077e8f7 100644 --- a/win/targets.vc +++ b/win/targets.vc @@ -4,7 +4,7 @@ # Part of the nmake based build system for Tcl and its extensions. # This file defines some standard targets for the convenience of extensions # and can be optionally included by the extension makefile. -# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for docs. +# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for docs. $(PROJECT): setup pkgindex $(PRJLIB) -- cgit v0.12 From f6bd13629fa5edb7707fc6adb73029c9a09b5e1f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 7 Dec 2020 14:25:31 +0000 Subject: In configure/make Windows build, static builds include dde and registry extension statically too implicitly --- .github/workflows/win-build.yml | 2 +- .travis.yml | 13 ++----------- win/buildall.vc.bat | 4 ++-- win/tcl.dsp | 12 ++++++------ win/tclAppInit.c | 4 ++-- 5 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 9615e85..0c0e597 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -11,7 +11,7 @@ jobs: matrix: cfgopt: - "" - - "OPTS=static,msvcrt" + - "OPTS=static,staticpkg,msvcrt" - "OPTS=symbols" - "OPTS=memdbg" # Using powershell means we need to explicitly stop on failure diff --git a/.travis.yml b/.travis.yml index 6438d66..f166e82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -257,15 +257,6 @@ jobs: before_install: *vcpreinst install: [] script: - - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc all tcltest - - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc test - - name: "Windows/MSVC/StaticPackage" - os: windows - compiler: cl - env: *vcenv - before_install: *vcpreinst - install: [] - script: - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc all tcltest - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc test - name: "Windows/MSVC/Debug" @@ -321,8 +312,8 @@ jobs: before_install: *vcpreinst install: [] script: - - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc all tcltest - - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc test + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc test - name: "Windows/MSVC-x86/Debug" os: windows compiler: cl diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index cb136be..3dc14c1 100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat @@ -68,8 +68,8 @@ if errorlevel 1 goto error :: Build the static core and shell. :: -set OPTS=static,msvcrt -if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt +set OPTS=static,staticpkg,msvcrt +if not %SYMBOLS%.==. set OPTS=symbols,static,staticpkg,msvcrt nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 if errorlevel 1 goto error diff --git a/win/tcl.dsp b/win/tcl.dsp index fe1b859..dc23f86 100644 --- a/win/tcl.dsp +++ b/win/tcl.dsp @@ -34,7 +34,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release\tcl_Dynamic" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=none MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Release\tclsh87.exe" # PROP BASE Bsc_Name "" @@ -43,7 +43,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release\tcl_Dynamic" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=threads MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc MSVCDIR=IDE" # PROP Rebuild_Opt "clean release" # PROP Target_File "Release\tclsh87t.exe" # PROP Bsc_Name "" @@ -76,7 +76,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug\tcl_Static" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static,staticpkg,msvcrt MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Debug\tclsh87sg.exe" # PROP BASE Bsc_Name "" @@ -85,7 +85,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug\tcl_Static" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static,staticpkg,msvcrt MSVCDIR=IDE" # PROP Rebuild_Opt "-a" # PROP Target_File "Debug\tclsh87sg.exe" # PROP Bsc_Name "" @@ -97,7 +97,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release\tcl_Static" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static,staticpkg,msvcrt MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Release\tclsh87s.exe" # PROP BASE Bsc_Name "" @@ -106,7 +106,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release\tcl_Static" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static,staticpkg,msvcrt MSVCDIR=IDE" # PROP Rebuild_Opt "-a" # PROP Target_File "Release\tclsh87s.exe" # PROP Bsc_Name "" diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 3ab9fc8..52ead8e 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -29,7 +29,7 @@ extern Tcl_PackageInitProc Tcltest_Init; extern Tcl_PackageInitProc Tcltest_SafeInit; #endif /* TCL_TEST */ -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if defined(STATIC_BUILD) extern Tcl_PackageInitProc Registry_Init; extern Tcl_PackageInitProc Dde_Init; extern Tcl_PackageInitProc Dde_SafeInit; @@ -164,7 +164,7 @@ Tcl_AppInit( return TCL_ERROR; } -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if defined(STATIC_BUILD) if (Registry_Init(interp) == TCL_ERROR) { return TCL_ERROR; } -- cgit v0.12