From 9f88ecdd970f8304aa68a8ff7662ce0bf167dfed Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Wed, 9 Dec 2020 04:31:07 +0000 Subject: nmake: subsume staticpkg option within static builds --- win/makefile.vc | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index bb41f1c..03a7ead 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -151,12 +151,24 @@ RCFILE = tcl.rc DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) +# The staticpkg option is not longer supported in Tcl 8.7 +# though extensions may still be using it. If specified together +# with "static", ignore it as that is now the default for +# static build. For non-static builds, no longer supported +# now (was permitted in 8.6) +!if $(TCL_USE_STATIC_PACKAGES) +!if $(STATIC_BUILD) +!message *** NOTE: The "staticpkg" option redundant in 8.7. +!else +!message *** NOTE: The "staticpkg" option ignored for shared library builds. +!endif +!endif !if [nmakehlp -f $(OPTS) "noembed"] -!message *** Option noembed specified. Tcl script library will not be appended to binary. +!message *** Option noembed specified. Tcl script library will not be appended to the binary. TCL_EMBED_SCRIPTS = 0 !else -!message *** Tcl script library will be appended to binary. +!message *** Tcl script library will be appended to the binary. TCL_EMBED_SCRIPTS = 1 !endif @@ -210,12 +222,6 @@ TCLTEST = $(OUT_DIR)\$(PROJECT)test.exe TCLSHOBJS = \ $(TMP_DIR)\tclAppInit.obj \ -!if !$(STATIC_BUILD) -!if $(TCL_USE_STATIC_PACKAGES) - $(TMP_DIR)\tclWinReg.obj \ - $(TMP_DIR)\tclWinDde.obj \ -!endif -!endif $(TMP_DIR)\tclsh.res TCLTESTOBJS = \ @@ -225,10 +231,6 @@ TCLTESTOBJS = \ $(TMP_DIR)\tclThreadTest.obj \ $(TMP_DIR)\tclWinTest.obj \ !if !$(STATIC_BUILD) -!if $(TCL_USE_STATIC_PACKAGES) - $(TMP_DIR)\tclWinReg.obj \ - $(TMP_DIR)\tclWinDde.obj \ -!endif $(OUT_DIR)\tommath.lib \ !endif $(TMP_DIR)\testMain.obj @@ -589,7 +591,7 @@ $(LIBTCLZIP): .PHONY @$(MKDIR) "$(LIBTCLVFS)" @$(CPYDIR) $(LIBDIR) "$(LIBTCLVFS)\tcl_library" @move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" > NUL -!if ! $(TCL_USE_STATIC_PACKAGES) +!if ! $(STATIC_BUILD) # Remove the registry and dde directories as the DLLS are still external @$(RMDIR) "$(LIBTCLVFS)\tcl_library\registry" @$(RMDIR) "$(LIBTCLVFS)\tcl_library\dde" @@ -794,7 +796,6 @@ gendate: $(TMP_DIR)\testMain.obj: $(WIN_DIR)\tclAppInit.c $(cc32) $(appcflags) /DTCL_TEST /DUNICODE /D_UNICODE \ - /DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \ -Fo$@ $? $(TMP_DIR)\tclMainW.obj: $(GENERICDIR)\tclMain.c @@ -834,7 +835,6 @@ $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c $(TMP_DIR)\tclAppInit.obj: $(WIN_DIR)\tclAppInit.c $(cc32) $(appcflags) /DUNICODE /D_UNICODE \ - /DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \ -Fo$@ $? ### The following objects should be built using the stub interfaces @@ -1019,21 +1019,13 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata "$(MODULE_INSTALL_DIR)\8.4\platform\shell-$(PKG_SHELL_VER).tm" !endif @echo Installing $(TCLDDELIBNAME) -!if $(STATIC_BUILD) -!if !$(TCL_USE_STATIC_PACKAGES) - @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\" -!endif -!else +!if !$(STATIC_BUILD) @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\" @$(CPY) "$(ROOT)\library\dde\pkgIndex.tcl" \ "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\" !endif @echo Installing $(TCLREGLIBNAME) -!if $(STATIC_BUILD) -!if !$(TCL_USE_STATIC_PACKAGES) - @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\" -!endif -!else +!if !$(STATIC_BUILD) @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\registry$(REGDOTVERSION)\" @$(CPY) "$(ROOT)\library\registry\pkgIndex.tcl" \ "$(LIB_INSTALL_DIR)\registry$(REGDOTVERSION)\" -- cgit v0.12