mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Minor cleanups and fixes in the autoconf/tea pieces.
FossilOrigin-Name: 4d6536bd0ad333854309e825feaca26fdd13ac4458c7ccfbe77fc76cc5a968bc
This commit is contained in:
@ -205,13 +205,13 @@ tclsh: $(teaish.makefile) config.log
|
||||
# simply loads the DLL and success if it can.
|
||||
#
|
||||
#
|
||||
tx.tester.args = $(tx.dll) $(tx.loadPrefix) @TEAISH_TESTER_TCL@
|
||||
tx.tester.args = $(tx.dll) $(tx.loadPrefix) @TEAISH_MODULE_TEST_TCL@
|
||||
.PHONY: test-pre test-core test test-post test-extension
|
||||
test-extension: # this name is reserved for use by teaish.make
|
||||
test-prepre: $(tx.dll)
|
||||
test-pre: test-prepre
|
||||
test-core: test-pre
|
||||
$(TCLSH) teaish.tester.tcl $(tx.tester.args)
|
||||
$(TCLSH) @TEAISH_TESTER_TCL@ $(tx.tester.args)
|
||||
test-post: test-core
|
||||
test: test-post
|
||||
|
||||
@ -286,12 +286,7 @@ $(tx.makefile): config.log
|
||||
#
|
||||
# Package archive generation ("dist") rules...
|
||||
#
|
||||
@if THEAISH_OUT_OF_EXT_TREE
|
||||
dist:
|
||||
@echo "'dist' can only be used from an extension's home dir" 1>&2; \
|
||||
echo "In this case: @TEAISH_DIR@" 1>&2; exit 1
|
||||
undist:
|
||||
@else
|
||||
@if TEAISH_ENABLE_DIST
|
||||
@if BIN_ZIP
|
||||
# Temp dir for dist.zip. Must be different than dist.tgz or else
|
||||
# parallel builds may hose the dist.
|
||||
@ -350,7 +345,14 @@ undist-tgz:
|
||||
rm -f $(dist.tgz)
|
||||
undist: undist-tgz
|
||||
@endif #BIN_TAR
|
||||
@endif #THEAISH_OUT_OF_EXT_TREE
|
||||
@else
|
||||
undist:
|
||||
dist:
|
||||
@if TEAISH_OUT_OF_EXT_TREE
|
||||
@echo "'dist' can only be used from an extension's home dir" 1>&2; \
|
||||
echo "In this case: @TEAISH_DIR@" 1>&2; exit 1
|
||||
@endif
|
||||
@endif #TEAISH_ENABLE_DIST
|
||||
|
||||
@if TEAISH_MAKEFILE
|
||||
#
|
||||
|
@ -265,7 +265,8 @@ proc teaish__configure-phase1 {} {
|
||||
|
||||
#define AS_LIBDIR $::autosetup(libdir)
|
||||
define TEAISH_LIBDIR $::autosetup(libdir)/teaish
|
||||
define TEAISH_TESTER_TCL [get-define TEAISH_LIBDIR]/tester.tcl
|
||||
define TEAISH_MODULE_TEST_TCL $::autosetup(libdir)/teaish/tester.tcl
|
||||
define TEAISH_TESTER_TCL $::autosetup(builddir)/teaish.tester.tcl
|
||||
teaish__configure-finalize
|
||||
}
|
||||
|
||||
@ -297,6 +298,10 @@ proc teaish__configure-finalize {} {
|
||||
define $f [join [get-define $f]]
|
||||
}
|
||||
|
||||
if {[get-define TEAISH_OUT_OF_EXT_TREE]} {
|
||||
define TEAISH_ENABLE_DIST 0
|
||||
}
|
||||
|
||||
define TEAISH_AUTOSETUP_DIR $::autosetup(libdir)
|
||||
proj-setup-autoreconfig TEAISH_AUTORECONFIG
|
||||
proj-dot-ins-append $::autosetup(srcdir)/Makefile.in
|
||||
@ -622,7 +627,7 @@ proc teaish__find-extension {} {
|
||||
set ::argv $largv
|
||||
set dbld $::autosetup(builddir)
|
||||
set dsrc $::autosetup(srcdir)
|
||||
set dext [get-define TEAISH_DIR $::autosetup(builddir)]
|
||||
set dext [get-define TEAISH_DIR $dbld]
|
||||
|
||||
#
|
||||
# teaish.tcl is a TCL script which implements various
|
||||
@ -631,7 +636,10 @@ proc teaish__find-extension {} {
|
||||
# We use the first one we find in the builddir or srcdir.
|
||||
#
|
||||
if {"" eq $extT} {
|
||||
set flist [list $dext/teaish.tcl $dsrc/teaish.tcl]
|
||||
set flist [list $dext/teaish.tcl]
|
||||
if {[lindex $flist 0] ne "$dsrc/teaish.tcl"} {
|
||||
lappend flist $dsrc/teaish.tcl
|
||||
}
|
||||
if {![proj-first-file-found $flist extT]} {
|
||||
if {"--help" in $::argv} {
|
||||
return 0
|
||||
@ -663,7 +671,10 @@ use --teaish-extension-dir=/path/to/extension"
|
||||
# the builddir or the srcdir.
|
||||
#
|
||||
if {"" eq $extM} {
|
||||
set flist [list $dext/teaish.make.in $dsrc/teaish.make.in]
|
||||
set flist [list $dext/teaish.make.in]
|
||||
if {[lindex $flist 0] ne "$dsrc/teaish.make.in"} {
|
||||
lappend flist $dsrc/teaish.make.in
|
||||
}
|
||||
proj-first-file-found $flist extM
|
||||
}
|
||||
if {"" ne $extM && [file readable $extM]} {
|
||||
@ -677,10 +688,14 @@ use --teaish-extension-dir=/path/to/extension"
|
||||
#proj-warn "Did not find an teaish.make.in."
|
||||
}
|
||||
|
||||
set extI $dext/teaish.pkginit.tcl
|
||||
if {[file exists $extI]} {
|
||||
define TEAISH_PKGINIT_TCL $extI
|
||||
set flist [list $dext/teaish.pkginit.tcl]
|
||||
if {[lindex $flist 0] ne "$dsrc/teaish.pkginit.in"} {
|
||||
lappend flist $dsrc/teaish.pkginit.in
|
||||
}
|
||||
if {[proj-first-file-found $flist extI]} {
|
||||
msg-result "Extension post-load init = $extI"
|
||||
define TEAISH_PKGINIT_TCL $extI
|
||||
define TEAISH_PKGINIT_TCL_TAIL [file tail $extI]; # for use in pkgIndex.tcl
|
||||
#teaish-add-install $extI
|
||||
}
|
||||
|
||||
@ -692,9 +707,9 @@ use --teaish-extension-dir=/path/to/extension"
|
||||
define TEAISH_LIBDIR_NAME [get-define TEAISH_PKGNAME]
|
||||
define TEAISH_VERSION 0.0.0
|
||||
|
||||
# THEAISH_OUT_OF_EXT_TREE = 1 if we're building from a dir other
|
||||
# TEAISH_OUT_OF_EXT_TREE = 1 if we're building from a dir other
|
||||
# than the extension's home dir.
|
||||
define THEAISH_OUT_OF_EXT_TREE \
|
||||
define TEAISH_OUT_OF_EXT_TREE \
|
||||
[expr {[file-normalize $::autosetup(builddir)] ne [file-normalize [get-define TEAISH_DIR]]}]
|
||||
|
||||
#
|
||||
@ -704,9 +719,11 @@ use --teaish-extension-dir=/path/to/extension"
|
||||
foreach {optionalDef dflt} [subst {
|
||||
TEAISH_LOAD_PREFIX "[string totitle [get-define TEAISH_PKGNAME]]"
|
||||
TEAISH_MAKEFILE_CODE ""
|
||||
TEAISH_ENABLE_DIST 1
|
||||
}] {
|
||||
define $optionalDef $dflt
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -944,6 +961,18 @@ proc teaish-combine-option-lists {args} {
|
||||
return $rv
|
||||
}
|
||||
|
||||
# @teaish-enable-dist ?yes?
|
||||
#
|
||||
# Explicitly enables or disables the "dist" rules in the default
|
||||
# Makefile.in. This is equivalent to defining TEAISH_ENABLE_DIST
|
||||
# to $yes (which must be 0 or 1).
|
||||
#
|
||||
# By default, dist creation is enabled.
|
||||
#
|
||||
proc teaish-enable-dist {{yes 1}} {
|
||||
define TEAISH_ENABLE_DIST $yes
|
||||
}
|
||||
|
||||
#
|
||||
# Handles --teaish-create-extension=TARGET-DIR
|
||||
#
|
||||
|
@ -5,11 +5,11 @@
|
||||
if {[package vsatisfies [package provide Tcl] 9.0-]} {
|
||||
package ifneeded @TEAISH_PKGNAME@ @TEAISH_VERSION@ [list apply {{dir} {
|
||||
load [file join $dir @TEAISH_DLL9@] @TEAISH_LOAD_PREFIX@
|
||||
@if TEAISH_PKGINIT_TCL
|
||||
set initScript [file join $dir @TEAISH_PKGINIT_TCL@]
|
||||
# if {[file exists $initScript]} {
|
||||
@if TEAISH_PKGINIT_TCL_TAIL
|
||||
set initScript [file join $dir [file tail @TEAISH_PKGINIT_TCL_TAIL@]]
|
||||
if {[file exists $initScript]} {
|
||||
source -encoding utf-8 $initScript
|
||||
# }
|
||||
}
|
||||
@endif
|
||||
}} $dir]
|
||||
} else {
|
||||
@ -20,11 +20,11 @@ if {[package vsatisfies [package provide Tcl] 9.0-]} {
|
||||
} else {
|
||||
load {} @TEAISH_LOAD_PREFIX@
|
||||
}
|
||||
@if TEAISH_PKGINIT_TCL
|
||||
set initScript [file join $dir @TEAISH_PKGINIT_TCL@]
|
||||
# if {[file exists $initScript]} {
|
||||
@if TEAISH_PKGINIT_TCL_TAIL
|
||||
set initScript [file join $dir [file tail @TEAISH_PKGINIT_TCL_TAIL@]]
|
||||
if {[file exists $initScript]} {
|
||||
source -encoding utf-8 $initScript
|
||||
# }
|
||||
}
|
||||
@endif
|
||||
}} $dir]
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ proc teaish-configure {} {
|
||||
LDFLAGS_LIBRT
|
||||
|
||||
teaish-add-cflags -define CFLAGS_LIBICU OPT_FEATURE_FLAGS
|
||||
teaish-enable-dist 0
|
||||
|
||||
}; # teaish-configure
|
||||
|
||||
|
Reference in New Issue
Block a user