Proposed fix for [006bef5d75] on Unix. MingW and nmake pending.

This commit is contained in:
apnadkarni
2026-05-20 17:03:36 +00:00
parent bb29ed5240
commit e6cfbab12a
3 changed files with 10 additions and 0 deletions

View File

@@ -507,6 +507,10 @@ LocatePreInitScript(
TRY_PATH(TclJoinPath(3, pathParts, false));
#ifdef CFG_BUILDTIME_SCRDIR
TRY_PATH(Tcl_NewStringObj(CFG_BUILDTIME_SCRDIR, -1));
#endif
done: /* initScriptPtr != NULL => dirPtr holds dir of init.tcl */
if (initScriptPathPtr == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(

View File

@@ -154,6 +154,10 @@ static Tcl_Config const cfg[] = {
{"includedir,install", CFG_INSTALL_INCDIR},
{"docdir,install", CFG_INSTALL_DOCDIR},
/* Build time paths to various stuff */
{"scriptdir,build", CFG_BUILDTIME_SCRDIR},
/* Last entry, closes the array */
{NULL, NULL}
};

View File

@@ -1404,6 +1404,7 @@ tclInterp.o: $(GENERIC_DIR)/tclInterp.c
-DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \
-DCFG_RUNTIME_BINDIR="\"$(bindir)\"" \
-DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY)\"" \
-DCFG_BUILDTIME_SCRDIR="\"$(TCL_BUILDTIME_LIBRARY)\"" \
$(GENERIC_DIR)/tclInterp.c
tclIO.o: $(GENERIC_DIR)/tclIO.c $(IOHDR)
@@ -1541,6 +1542,7 @@ tclPkgConfig.o: $(GENERIC_DIR)/tclPkgConfig.c
-DCFG_RUNTIME_INCDIR="\"$(includedir)\"" \
-DCFG_RUNTIME_DOCDIR="\"$(mandir)\"" \
-DCFG_RUNTIME_DLLFILE="\"$(TCL_LIB_FILE)\"" \
-DCFG_BUILDTIME_SCRDIR="\"$(TCL_BUILDTIME_LIBRARY)\"" \
$(GENERIC_DIR)/tclPkgConfig.c
tclPosixStr.o: $(GENERIC_DIR)/tclPosixStr.c