Patch autosetup to rename --debug to --autosetup-debug so we can use --debug/--enable-debug for its historical purpose. Update autosetup/README.md with details of the patch.

FossilOrigin-Name: 00dffd10f0c77fed53bdbf1536f6ef9b6076775f1b9a10794b87e3ace33ca1d9
This commit is contained in:
stephan
2024-11-26 19:19:12 +00:00
5 changed files with 41 additions and 20 deletions
+10 -5
View File
@@ -36,7 +36,8 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
#
# 1) --debug is used by autosetup itself, so we have to rename it to
# --with-debug. We cannot use --enable-debug because that is, for
# autosetup, and alias for --debug=1.
# autosetup, and alias for --debug=1. Alternately, we can patch
# autosetup to use --autosetup-debug for its own purposes instead.
#
# 2) In autosetup, all flags starting with (--enable, --disable) are
# forced to be booleans and receive special handling in how they're
@@ -195,10 +196,13 @@ set flags {
with-emsdk:=auto => {Top-most dir of the Emscripten SDK installation. Default = EMSDK env var.}
# </alternative-builds>
# <developer>
with-debug:=1 =>
# Note that using the --debug/--enable-debug flag here requires patching
# autosetup/autosetup to rename the --debug to --autosetup-debug.
with-debug=0
debug=0 =>
{Enable debug build flags. This option will impact performance by
as much as 4x, as it includes large numbers of assert()s in
performance-critical loops. Never use --with-debug for production
performance-critical loops. Never use --debug for production
builds.}
scanstatus => {Enable the SQLITE_ENABLE_STMT_SCANSTATUS feature flag}
dev => {Enable dev-mode build: automatically enables certain other flags}
@@ -234,6 +238,7 @@ unset flags
proj-xfer-options-aliases {
with-readline-inc => with-readline-cflags
with-readline-lib => with-readline-ldflags
with-debug => debug
}
set srcdir $::autosetup(srcdir)
@@ -339,7 +344,7 @@ proj-if-opt-truthy dev {
# which check for these flags will show the user their updated
# state.
proj-opt-set all 1
proj-opt-set with-debug 1
proj-opt-set debug 1
proj-opt-set amalgamation 0
define CFLAGS [get-env CFLAGS {-O0 -g}]
}
@@ -515,7 +520,7 @@ proj-define-for-opt linemacros AMALGAMATION_LINE_MACROS \
"Use #line macros in the amalgamation:"
msg-checking "SQLITE_DEBUG build? "
proj-if-opt-truthy with-debug {
proj-if-opt-truthy debug {
define SQLITE_DEBUG 1
define TARGET_DEBUG {-g -DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0 -Wall}
msg-result yes
+17 -2
View File
@@ -14,6 +14,7 @@ build infrastructure. It is not an [Autosetup][] reference.
- Symbolic Names of Feature Flags
- Do Not Update Global Shared State
- [Updating Autosetup](#updating)
- [Patching Autosetup for Project-local changes](#patching)
------------------------------------------------------------------------
@@ -304,8 +305,22 @@ $ fossil status # show the modified files
```
Unless the upgrade made any incompatible changes (which is exceedingly
rare), that's all there is to it. Check over the diff, test the
configure process, and check it in.
rare), that's all there is to it. Then **apply a patch for the change
described in the following section**, test the configure process, and
check it in.
<a name="patching"></a>
Patching Autosetup for Project-local Changes
------------------------------------------------------------------------
Autosetup reserves the flag name **`--debug`** for its own purposes,
and its own special handling of `--enable-...` flags makes `--debug`
an alias for `--enable-debug`. As we have a long history of using
`--enable-debug` for this project's own purposes, we patch autosetup
to use the name `--autosetup-debug` in place of `--debug`. That
requires (as of this writing) four small edits in
[](/file/autosetup/autosetup), as demonstrated in [check-in
3296c8d3](/info/3296c8d3).
+4 -4
View File
@@ -9,7 +9,7 @@ dir=`dirname "$0"`; exec "`$dir/autosetup-find-tclsh`" "$0" "$@"
set autosetup(version) 0.7.2
# Can be set to 1 to debug early-init problems
set autosetup(debug) [expr {"--debug" in $argv}]
set autosetup(debug) [expr {"--autosetup-debug" in $argv}]
##################################################################
#
@@ -98,7 +98,7 @@ proc main {argv} {
version => "display the version of autosetup"
ref:=text manual:=text
reference:=text => "display the autosetup command reference. 'text', 'wiki', 'asciidoc' or 'markdown'"
debug => "display debugging output as autosetup runs"
autosetup-debug => "display debugging output as autosetup runs"
install:=. => "install autosetup to the current or given directory"
}
if {$autosetup(installed)} {
@@ -132,7 +132,7 @@ proc main {argv} {
}
# Debugging output (set this early)
incr autosetup(debug) [opt-bool debug]
incr autosetup(debug) [opt-bool autosetup-debug]
incr autosetup(force) [opt-bool force]
incr autosetup(msg-quiet) [opt-bool quiet]
incr autosetup(msg-timing) [opt-bool timing]
@@ -2530,7 +2530,7 @@ if {[catch {main $argv} msg opts] == 1} {
show-notices
autosetup-full-error [error-dump $msg $opts $autosetup(debug)]
if {!$autosetup(debug)} {
puts stderr "Try: '[file tail $autosetup(exe)] --debug' for a full stack trace"
puts stderr "Try: '[file tail $autosetup(exe)] --autosetup-debug' for a full stack trace"
}
exit 1
}
+9 -8
View File
@@ -1,5 +1,5 @@
C Move\ssome\sof\sthe\sin-comment\sconfigure\sscript\shelp\stext\sinto\sthe\s--help\stext.\sNo\sfunctional\schanges.
D 2024-11-26T16:12:05.631
C Patch\sautosetup\sto\srename\s--debug\sto\s--autosetup-debug\sso\swe\scan\suse\s--debug/--enable-debug\sfor\sits\shistorical\spurpose.\sUpdate\sautosetup/README.md\swith\sdetails\sof\sthe\spatch.
D 2024-11-26T19:19:12.459
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F auto.def cb4d2a6a3809c3c015ad1d1e5a06836697f78e31b38f154cc20a7b0cb350e0d1
F auto.def 961d2cf22b65d31f9eb97470b50cbbdca34b999cf86f438811c1ec214b296b8b
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@@ -37,8 +37,8 @@ F autoconf/tea/win/rules.vc 94a18c3e453535459b4a643983acca52fb8756e79055bd2ad4b0
F autoconf/tea/win/targets.vc 96a25a1fa6e9e9cfb348fd3760a5395b4ce8acafc8ed10f0412937ec200d5dbd
F autosetup/LICENSE 41a26aebdd2cd185d1e2b210f71b7ce234496979f6b35aef2cbf6b80cbed4ce4
F autosetup/README.autosetup a78ff8c4a3d2636a4268736672a74bf14a82f42687fcf0631a70c516075c031e
F autosetup/README.md f12fd1556b50ff33ebf5c1476f4640c6010b3093ba8d75ba12b5417884011d5e
F autosetup/autosetup 9416ffdcdd6e2dbf7f6d1e5c890078518930f8af7722a950eacc28c7f151d2d6 x
F autosetup/README.md 083b4417637f134875709dfa8ca149ce9b3634725b65e0f7d9b96f2bf56caa3a
F autosetup/autosetup df8b53928b1fe3c67db5bc77c8e1eb8160c1b6a26c370e9a06c68748f803b7e4 x
F autosetup/autosetup-config.guess dfa101c5e8220e864d5e9c72a85e87110df60260d36cb951ad0a85d6d9eaa463 x
F autosetup/autosetup-config.sub a38fb074d0dece01cf919e9fb534a26011608aa8fa606490864295328526cd73 x
F autosetup/autosetup-find-tclsh 25905f6c302959db80c2951aa267b4411c5645b598ce761cfc24a166141e2c4c x
@@ -2199,8 +2199,9 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 7e634d0569667ce1e17f4a611039cbb726078dc2e6be1f1b19655dc569170ce5
R b03ff8f40892202b2bfdeabe2bfe4328
P ee8449c482b6f9cfb82fa2417da194fc9aa56f54ef3ac83d368537181634ab1c 3296c8d30559eafa20f4748339177149172ecf79b019c42ed0d5ee9cf62a666a
R 79991bb77dce9de5475d1a6d91321988
T +closed 3296c8d30559eafa20f4748339177149172ecf79b019c42ed0d5ee9cf62a666a Closed\sby\sintegrate-merge.
U stephan
Z e952930a3cd549b7813b14b13b6d132c
Z 26e02d52e505c2209fb4076354fecc72
# Remove this line to create a well-formed Fossil manifest.
+1 -1
View File
@@ -1 +1 @@
ee8449c482b6f9cfb82fa2417da194fc9aa56f54ef3ac83d368537181634ab1c
00dffd10f0c77fed53bdbf1536f6ef9b6076775f1b9a10794b87e3ace33ca1d9