@@ -177,8 +177,8 @@ proc teaish-configure-core {} {
177
177
178
178
# TEA has --with-tclinclude but it appears to only be useful for
179
179
# building an extension against an uninstalled copy of TCL's own
180
- # source tree. Either we get that info from tclConfig.sh or we
181
- # give up.
180
+ # source tree. The policy here is that either we get that info
181
+ # from tclConfig.sh or we give up.
182
182
#
183
183
# with-tclinclude:DIR
184
184
# => {Specify the directory which contains the tcl.h. This should not
@@ -188,24 +188,27 @@ proc teaish-configure-core {} {
188
188
# extensions, and thus use a teaish-... prefix on most flags. However,
189
189
# --teaish-extension-dir is frequently needed, so...
190
190
#
191
- # As of this spontaneous moment, we'll formalize using using
192
- # --t-X-Y to abbreviate teaish flags when doing so is
191
+ # As of this spontaneous moment, we'll settle on using --t-A-X to
192
+ # abbreviate --teaish-A...-X... flags when doing so is
193
193
# unambiguous...
194
194
ted: t-e-d:
195
195
teaish-extension-dir:DIR
196
- => {Looks for an extension in the given directory instead of the current dir.}
196
+ => {Looks for an extension in the given directory instead of the current
197
+ dir.}
197
198
198
199
t-c-e:
199
200
teaish-create-extension:TARGET_DIRECTORY
200
201
=> {Writes stub files for creating an extension. Will refuse to overwrite
201
- existing files without --force.}
202
+ existing files without --teaish- force.}
202
203
203
204
t-f
204
205
teaish-force
205
- => {Has a context-dependent meaning (autosetup defines --force for its own use)}
206
+ => {Has a context-dependent meaning (autosetup defines --force for its
207
+ own use).}
206
208
207
209
t-d-d
208
- teaish-dump-defines => {Dump all configure-defined vars to config.defines.txt}
210
+ teaish-dump-defines
211
+ => {Dump all configure-defined vars to config.defines.txt}
209
212
210
213
t-v
211
214
teaish-verbose=0
@@ -813,7 +816,7 @@ proc teaish__find_extension {} {
813
816
if {$dirExt ne $dirSrc } {
814
817
lappend flist $dirSrc /teaish.tcl
815
818
}
816
- if {![proj-first-file-found $flist extT ]} {
819
+ if {![proj-first-file-found extT $flist ]} {
817
820
if {$gotHelpArg } {
818
821
# Tell teaish-configure-core that the lack of extension is not
819
822
# an error when --help is used.
@@ -859,9 +862,8 @@ If you are attempting an out-of-tree build, use
859
862
# We use the first one of teaish.make.in or teaish.make we find in
860
863
# $dirExt.
861
864
#
862
- if {[proj-first-file-found \
863
- [list $dirExt /teaish.make.in $dirExt /teaish.make] \
864
- extM]} {
865
+ if {[proj-first-file-found extM \
866
+ [list $dirExt /teaish.make.in $dirExt /teaish.make]]} {
865
867
if {[string match *.in $extM ]} {
866
868
define TEAISH_MAKEFILE_IN $extM
867
869
define TEAISH_MAKEFILE [file rootname [file tail $extM ]]
@@ -878,9 +880,8 @@ If you are attempting an out-of-tree build, use
878
880
}
879
881
880
882
# Look for teaish.pkginit.tcl[.in]
881
- if {[proj-first-file-found \
882
- [list $dirExt /teaish.pkginit.tcl.in $dirExt /teaish.pkginit.tcl] \
883
- extI]} {
883
+ if {[proj-first-file-found extI \
884
+ [list $dirExt /teaish.pkginit.tcl.in $dirExt /teaish.pkginit.tcl]]} {
884
885
if {[string match *.in $extI ]} {
885
886
proj-dot-ins-append $extI
886
887
define TEAISH_PKGINIT_TCL_IN $extI
@@ -897,19 +898,19 @@ If you are attempting an out-of-tree build, use
897
898
898
899
# Look for pkgIndex.tcl[.in]...
899
900
set piPolicy 0
900
- if {[proj-first-file-found $dirExt /pkgIndex.tcl.in extPI ]} {
901
+ if {[proj-first-file-found extPI $dirExt /pkgIndex.tcl.in]} {
901
902
# Generate ./pkgIndex.tcl from it.
902
903
define TEAISH_PKGINDEX_TCL_IN $extPI
903
904
define TEAISH_PKGINDEX_TCL [file rootname [file tail $extPI ]]
904
905
apply $addDist $extPI
905
906
set piPolicy 0x01
906
907
} elseif {$dirExt ne $dirSrc
907
- && [proj-first-file-found $dirSrc /pkgIndex.tcl.in extPI ]} {
908
+ && [proj-first-file-found extPI $dirSrc /pkgIndex.tcl.in]} {
908
909
# Generate ./pkgIndex.tcl from it.
909
910
define TEAISH_PKGINDEX_TCL_IN $extPI
910
911
define TEAISH_PKGINDEX_TCL [file rootname [file tail $extPI ]]
911
912
set piPolicy 0x02
912
- } elseif {[proj-first-file-found $dirExt /pkgIndex.tcl extPI ]} {
913
+ } elseif {[proj-first-file-found extPI $dirExt /pkgIndex.tcl]} {
913
914
# Assume it's a static file and use it.
914
915
define TEAISH_PKGINDEX_TCL_IN " "
915
916
define TEAISH_PKGINDEX_TCL $extPI
@@ -924,7 +925,7 @@ If you are attempting an out-of-tree build, use
924
925
# Look for teaish.test.tcl[.in]
925
926
proj-assert {" " ne $dirExt }
926
927
set flist [list $dirExt /teaish.test.tcl.in $dirExt /teaish.test.tcl]
927
- if {[proj-first-file-found $flist ttt ]} {
928
+ if {[proj-first-file-found ttt $flist ]} {
928
929
if {[string match *.in $ttt ]} {
929
930
# Generate teaish.test.tcl from $ttt
930
931
set xt [file rootname [file tail $ttt ]]
@@ -944,7 +945,7 @@ If you are attempting an out-of-tree build, use
944
945
945
946
# Look for teaish.tester.tcl[.in]
946
947
set flist [list $dirExt /teaish.tester.tcl.in $dirSrc /teaish.tester.tcl.in]
947
- if {[proj-first-file-found $flist ttt ]} {
948
+ if {[proj-first-file-found ttt $flist ]} {
948
949
# Generate teaish.test.tcl from $ttt
949
950
set xt [file rootname [file tail $ttt ]]
950
951
file delete -force -- $xt ; # ensure no stale copy is used
@@ -1408,10 +1409,14 @@ proc teaish__pragma {args} {
1408
1409
# teaish-pkginfo-set ?-vars|-subst? {-name foo -version 0.1.2}
1409
1410
#
1410
1411
# The latter may be easier to write for a multi-line invocation.
1411
- # Passing the -vars flag tells it to perform a [subst] of (only)
1412
- # variables in the {...} part from the calling scope. The -subst flag
1413
- # will cause is to [subst] the {...} with command substitution as well
1414
- # (but no backslash substitution).
1412
+ #
1413
+ # For the second call form, passing the -vars flag tells it to perform
1414
+ # a [subst] of (only) variables in the {...} part from the calling
1415
+ # scope. The -subst flag will cause it to [subst] the {...} with
1416
+ # command substitution as well (but no backslash substitution). When
1417
+ # using -subst for string concatenation, e.g. with -libDir
1418
+ # foo[get-version-number], be sure to wrap the value in braces:
1419
+ # -libDir {foo[get-version-number]}.
1415
1420
#
1416
1421
# Each pkginfo flag corresponds to one piece of extension package
1417
1422
# info. Teaish provides usable default values for all of these flags,
0 commit comments