1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add 'tcl' makefile target which builds all but tclextension (which does not have a well-defined name and dependencies). Improve the deps for .tclenv.sh to avoid getting a stale tclsh when re-configuring with a different --with-tcl(sh).

FossilOrigin-Name: 1bd9de719b0944fdceec32103da3131a7d387820850ab03f652f813d840355b8
This commit is contained in:
stephan
2024-11-08 13:37:00 +00:00
parent a4093dcc06
commit a700db9387
4 changed files with 17 additions and 12 deletions

View File

@ -978,7 +978,7 @@ has_tclsh85:
# It took half an hour to figure that out.
#
T.tcl.env.sh = ./.tclenv.sh
$(T.tcl.env.sh): $(TCLSH_CMD) $(TCL_CONFIG_SH) $(MAKEFILE_LIST)
$(T.tcl.env.sh): $(TCLSH_CMD) $(TCL_CONFIG_SH) $(MAKEFILE_LIST) config.log
@if [ x = "x$(TCL_CONFIG_SH)" ]; then \
echo 'TCL_CONFIG_SH must be set to point to a "tclConfig.sh"' 1>&2; exit 1; \
fi
@ -991,6 +991,7 @@ $(T.tcl.env.sh): $(TCLSH_CMD) $(TCL_CONFIG_SH) $(MAKEFILE_LIST)
echo "TCLLIBDIR=$$ld/sqlite3"; \
fi > $@; \
echo ". \"$(TCL_CONFIG_SH)\" || exit \$$?" >> $@
@echo "Created $@"
#
# $(T.tcl.env.source) is shell code to be run as part of any
@ -1334,6 +1335,7 @@ tclsqlite-stubs.o: $(T.tcl.env.sh) $(TOP)/src/tclsqlite.c $(DEPS_OBJ_COMMON)
tclsqlite3$(T.exe): $(T.tcl.env.sh) tclsqlite-shell.o $(libsqlite3.SO)
$(T.link.tcl) -o $@ tclsqlite-shell.o \
$(libsqlite3.SO) $$TCL_INCLUDE_SPEC $$TCL_LIB_SPEC $(LDFLAGS.libsqlite3)
tcl: tclsqlite3$(T.exe)
# Rules to build opcodes.c and opcodes.h
#
@ -1476,6 +1478,7 @@ install: install-headers
#
pkgIndex.tcl:
echo 'package ifneeded sqlite3 $(PACKAGE_VERSION) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
tcl: pkgIndex.tcl
libtclsqlite3.SO = libtclsqlite3$(T.dll)
$(libtclsqlite3.SO): $(T.tcl.env.sh) tclsqlite.o $(LIBOBJ)
$(T.tcl.env.source); \
@ -1488,7 +1491,8 @@ $(libtclsqlite3.SO): $(T.tcl.env.sh) tclsqlite.o $(LIBOBJ)
$(libtclsqlite3.SO)-1: $(libtclsqlite3.SO)
$(libtclsqlite3.SO)-0 $(libtclsqlite3.SO)-:
libtcl: $(libtclsqlite3.SO)-$(HAVE_TCL)
all: libtcl
tcl: libtcl
all: tcl
install-tcl-1: $(libtclsqlite3.SO) pkgIndex.tcl
$(T.tcl.env.source); \