TDBC

View Ticket
Login
Ticket Hash: e226dbc23c0bb81a724c20fa7f60a1b50c387ddb
Title: tdbc win/makefile.vc does not install development files
Status: Closed Type: Build_Problem
Severity: Important Priority: Immediate
Subsystem: tdbc Resolution: Overcome_By_Events
Last Modified: 2012-12-10 08:03:03
Version Found In: 1.0.0
Description:
When trying to compile tdbc::odbc with msvc, I found the following issues in win\makefile.vc:
  • stub library is not installed
  • there are two rules for pkgIndex.tcl: No issue, but leads to a make warning
  • header files are not installed
  • tdbcConfig.sh is incorrect and not installed

The following patch cures all of them:

  • stub library is copied to the same location as the tdbc100.dll.
  • header files are copied to the tcl include folder. The destination folder is build as: $(_INSTALLDIR)\..\include
  • tdbcConfig.sh is installed to the same location as tdbc100.dll. Within the generated tdbcconfig.sh file, the build locations are not usable, because they use relative paths. There is one slash which should be a backslash, hardcoded in tclconfig.sh.in.

I would appreciate, if someone could verify, if this is correct and if I used the desired path names.

Thank you, Harald

---makefile.vc.patch---
--- C:/test/tcl8.6.0/pkgs/tdbc1.0.0/win/makefile_ori.vc	Fri Nov 23 22:46:02 2012
+++ C:/test/tcl8.6.0/pkgs/tdbc1.0.0/win/makefile.vc	Tue Nov 27 13:38:26 2012
@@ -227,7 +227,7 @@
 BIN_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
 DOC_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
 SCRIPT_INSTALL_DIR	= $(PRJ_INSTALL_DIR)
-INCLUDE_INSTALL_DIR	= $(_TCLDIR)\include
+INCLUDE_INSTALL_DIR	= $(_INSTALLDIR)\..\include
 
 ### The following paths CANNOT have spaces in them.
 GENERICDIR	= $(ROOT)\generic
@@ -462,22 +462,22 @@
 @TCL_VERSION@         $(TCL_DOTVERSION)
 <<
 
-$(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in
-	@nmakehlp -s << $** > $@
-
-	type << > $@
-if {[catch {package require Tcl 8.5}]} return
-package ifneeded $(PROJECT) $(DOTVERSION) \
- [list load [file join $$dir $(PRJLIBNAME)] $(PROJECT)]
-<<
+.PHONY: $(OUT_DIR)\tdbcConfig.sh
 
 $(OUT_DIR)\tdbcConfig.sh: $(ROOT)\tdbcConfig.sh.in
 	nmakehlp -s << $** > $@
-@TDBC_LIB_SPEC@              $(PRJLIBNAME)
-@TDBC_STUB_LIB_SPEC@         $(PRJLIBNAME)
-@TDBC_INCLUDE_SPEC@          -I$(LIB_INSTALL_DIR)
-@TDBC_PRIVATE_INCLUDE_SPEC@  -I$(LIB_INSTALL_DIR)
 @PACKAGE_VERSION@            $(DOTVERSION)
+@PKG_LIB_FILE@               $(PRJLIBNAME)
+@tdbc_LIB_SPEC@              $(LIB_INSTALL_DIR)\$(PRJLIBNAME)
+@PKG_STUB_LIB_FILE@          $(PRJSTUBLIBNAME)
+@tdbc_BUILD_STUB_LIB_SPEC@   $(PRJSTUBLIB)
+@tdbc_STUB_LIB_SPEC@         $(LIB_INSTALL_DIR)\$(PRJSTUBLIBNAME)
+@tdbc_BUILD_STUB_LIB_PATH@   $(PRJSTUBLIB)
+@tdbc_STUB_LIB_PATH@         $(LIB_INSTALL_DIR)\$(PRJSTUBLIBNAME)
+@tdbc_SRC_DIR@               $(ROOT)
+@tdbc_INCLUDE_SPEC@          -I$(INCLUDE_INSTALL_DIR)
+@tdbc_BUILD_INCLUDE_SPEC@    -I$(GENERICDIR)
+@tdbc_LIB_DIR@               $(LIB_INSTALL_DIR)
 <<
 
 $(TMP_DIR)\tdbcStubLib.obj : $(GENERICDIR)\tdbcStubLib.c
@@ -495,12 +495,17 @@
 	@echo Installing binaries to '$(SCRIPT_INSTALL_DIR)'
 	@if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
 	@$(CPY) $(PRJLIB) "$(SCRIPT_INSTALL_DIR)" >NUL
+	@$(CPY) $(PRJSTUBLIB) "$(LIB_INSTALL_DIR)" >NUL
 
-install-libraries: $(OUT_DIR)\pkgIndex.tcl
+install-libraries: $(OUT_DIR)\pkgIndex.tcl $(OUT_DIR)\tdbcConfig.sh
 	@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
 	@if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
 	@echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
 	@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)"
+	@$(CPY) $(OUT_DIR)\tdbcConfig.sh "$(SCRIPT_INSTALL_DIR)"
+	@echo Installing header files in '$(INCLUDE_INSTALL_DIR)'
+	@$(CPY) "$(GENERICDIR)\tdbc.h"      "$(INCLUDE_INSTALL_DIR)\"
+	@$(CPY) "$(GENERICDIR)\tdbcDecls.h" "$(INCLUDE_INSTALL_DIR)\"
 
 install-docs:
 	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
User Comments:
oehhar added on 2012-12-05 16:03:00:
Implemented in branch td-win-tea checkin 7f5817340f

oehhar added on 2012-12-10 08:03:03:
Implemented