Configure-internal build cleanups (no functional changes). Add EXTRA_SRC to the deps of sqlite3.c.

FossilOrigin-Name: 8afb8bbce8654d6f76207fb136e79dc52b6724a71eae82a4c098690a68eb75a1
This commit is contained in:
stephan
2025-03-15 15:19:42 +00:00
parent dae87df198
commit 9f8a238fb5
6 changed files with 47 additions and 46 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ sqlite-configure canonical {
# -------------^^^^^^^ intentionally using [get-env] instead of
# [proj-get-env] here because [sqlite-setup-default-cflags] uses
# [proj-get-env] and we want this to supercede that.
sqlite-munge-cflags
sqlite-munge-cflags; # straighten out -DSQLITE_ENABLE/OMIT flags
}
sqlite-check-common-bins ;# must come before [sqlite-handle-wasi-sdk]
sqlite-handle-wasi-sdk ;# must run relatively early, as it changes the environment
+2
View File
@@ -183,6 +183,8 @@ proc proj-lshift_ {listVar {count 1}} {
}
########################################################################
# @proj-strip-hash-comments value
#
# Expects to receive string input, which it splits on newlines, strips
# out any lines which begin with any number of whitespace followed by
# a '#', and returns a value containing the [append]ed results of each
+33 -34
View File
@@ -61,13 +61,21 @@ array set sqliteConfig [proj-strip-hash-comments {
set sqliteConfig(is-cross-compiling) [proj-is-cross-compiling]
########################################################################
# Processes all configure --flags for this build $buildMode must be
# either "canonical" or "autoconf", and others may be added in the
# Processes all configure --flags for this build, run build-specific
# config checks, then finalize the configure process. $buildMode must
# be either "canonical" or "autoconf", and others may be added in the
# future. After bootstrapping, $configScript is eval'd in the caller's
# scope, then post-configuration finalization is run. $configScript is
# intended to hold configure code which is specific to the given
# $buildMode, with the caveat that _some_ build-specific code is
# encapsulated in the configuration finalization step.
#
# The intent is that all build-mode-specific configuration goes inside
# the $configScript argument to this function, and that an auto.def file
# contains only two commands:
#
# use sqlite-config
# sqlite-configure BUILD_NAME { build-specific configure script }
proc sqlite-configure {buildMode configScript} {
set allBuildModes {canonical autoconf}
if {$buildMode ni $allBuildModes} {
@@ -131,7 +139,7 @@ proc sqlite-configure {buildMode configScript} {
########################################################################
set allFlags {
# Structure: a list of M {Z} pairs, where M is a descriptive
# option group name and Z is a list of X Y pairs. X is a list of
# option group name and Z is a list of X Y pairs. X is a list of
# $buildMode name(s) to which the Y flags apply, or {*} to apply
# to all builds. Y is a {block} in the form expected by
# autosetup's [options] command. Each block which is applicable
@@ -168,8 +176,8 @@ proc sqlite-configure {buildMode configScript} {
largefile=1
=> {This legacy flag has no effect on the library but may influence
the contents of the generated sqlite_cfg.h}
# ^^^ It's not clear that this actually does anything, as
# HAVE_LFS is not checked anywhere in the .c/.h/.in files.
# ^^^ It's not clear that LFS support actually does anything,
# as HAVE_LFS is not checked anywhere in the .c/.h/.in files.
load-extension=1 => {Disable loading of external extensions}
math=1 => {Disable math functions}
json=1 => {Disable JSON functions}
@@ -365,12 +373,13 @@ proc sqlite-configure {buildMode configScript} {
}; # sqlite-configure
########################################################################
# Performs late-stage config steps common to both the canonical and
# autoconf bundle builds.
# Performs late-stage config steps common to all supported
# $::sqliteConfig(build-mode) values.
proc sqlite-configure-finalize {} {
set buildMode $::sqliteConfig(build-mode)
set isCanonical [expr {$buildMode eq "canonical"}]
set isAutoconf [expr {$buildMode eq "autoconf"}]
proj-assert {$isCanonical || $isAutoconf} "Unknown build mode: $buildMode"
define HAVE_LFS 0
if {[opt-bool largefile]} {
@@ -417,6 +426,13 @@ proc sqlite-configure-finalize {} {
sqlite-handle-math
sqlite-handle-icu
sqlite-handle-env-quirks
sqlite-handle-common-feature-flags
sqlite-finalize-feature-flags
########################################################################
# When cross-compiling, we have to avoid using the -s flag to
# /usr/bin/install:
# https://sqlite.org/forum/forumpost/9a67df63eda9925c
define IS_CROSS_COMPILING $::sqliteConfig(is-cross-compiling)
sqlite-process-dot-in-files
sqlite-post-config-validation
sqlite-dump-defines
@@ -433,12 +449,10 @@ proc sqlite-post-options-init {} {
define PACKAGE_URL {https://sqlite.org}
define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum
define PACKAGE_STRING "[get-define PACKAGE_NAME] [get-define PACKAGE_VERSION]"
#
# Carry values from hidden --flag aliases over to their canonical
# flag forms. This list must include only options which are common
# to both the top-level auto.def and autoconf/auto.def.
#
proj-xfer-options-aliases {
# Carry values from hidden --flag aliases over to their canonical
# flag forms. This list must include only options which are common
# to all build modes supported by [sqlite-configure].
with-readline-inc => with-readline-cflags
with-readline-lib => with-readline-ldflags
with-debug => debug
@@ -468,11 +482,9 @@ proc msg-debug {msg} {
########################################################################
# Sets up the SQLITE_AUTORECONFIG define.
proc sqlite-autoreconfig {} {
#
# SQLITE_AUTORECONFIG contains make target rules for re-running the
# configure script with the same arguments it was initially invoked
# with. This can be used to automatically reconfigure
#
# with. This can be used to automatically reconfigure.
set squote {{arg} {
# Wrap $arg in single-quotes if it looks like it might need that
# to avoid mis-handling as a shell argument. We assume that $arg
@@ -507,6 +519,8 @@ proc sqlite-add-feature-flag {args} {
define-append OPT_FEATURE_FLAGS {*}$args
}
}
########################################################################
# Appends $args, if not empty, to OPT_SHELL.
proc sqlite-add-shell-opt {args} {
if {"" ne $args} {
@@ -545,13 +559,11 @@ proc sqlite-check-common-bins {} {
# Run checks for system-level includes and libs which are common to
# both the canonical build and the "autoconf" bundle.
proc sqlite-check-common-system-deps {} {
#
# Check for needed/wanted data types
cc-with {-includes stdint.h} \
{cc-check-types int8_t int16_t int32_t int64_t intptr_t \
uint8_t uint16_t uint32_t uint64_t uintptr_t}
#
# Check for needed/wanted functions
cc-check-functions gmtime_r isnan localtime_r localtime_s \
malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
@@ -566,7 +578,6 @@ proc sqlite-check-common-system-deps {} {
}
define LDFLAGS_RT [join [lsort -unique $ldrt] ""]
#
# Check for needed/wanted headers
cc-check-includes \
sys/types.h sys/stat.h dlfcn.h unistd.h \
@@ -588,7 +599,6 @@ proc sqlite-check-common-system-deps {} {
########################################################################
# Move -DSQLITE_OMIT... and -DSQLITE_ENABLE... flags from CFLAGS and
# CPPFLAGS to OPT_FEATURE_FLAGS and remove them from BUILD_CFLAGS.
# This is derived from the legacy build but is still practical.
proc sqlite-munge-cflags {} {
# Move CFLAGS and CPPFLAGS entries matching -DSQLITE_OMIT* and
# -DSQLITE_ENABLE* to OPT_FEATURE_FLAGS. This behavior is derived
@@ -735,6 +745,10 @@ proc sqlite-finalize-feature-flags {} {
define OPT_SHELL [lsort -unique $oFF]
msg-result "Shell options: [get-define OPT_SHELL]"
}
if {"" ne [set extraSrc [get-define AMALGAMATION_EXTRA_SRC ""]]} {
proj-assert {"canonical" eq $::sqliteConfig(build-mode)}
msg-result "Appending source files to amalgamation: $extraSrc"
}
}
########################################################################
@@ -1557,21 +1571,6 @@ proc sqlite-handle-env-quirks {} {
# Perform some late-stage work and generate the configure-process
# output file(s).
proc sqlite-process-dot-in-files {} {
########################################################################
# When cross-compiling, we have to avoid using the -s flag to
# /usr/bin/install:
# https://sqlite.org/forum/forumpost/9a67df63eda9925c
define IS_CROSS_COMPILING $::sqliteConfig(is-cross-compiling)
# Finish up handling of the various feature flags here because it's
# convenient for both the canonical build and autoconf bundles that
# it be done here.
sqlite-handle-common-feature-flags
sqlite-finalize-feature-flags
if {"" ne [set extraSrc [get-define AMALGAMATION_EXTRA_SRC ""]]} {
msg-result "Appending source files to amalgamation: $extraSrc"
}
########################################################################
# "Re-export" the autoconf-conventional --XYZdir flags into something
# which is more easily overridable from a make invocation. See the docs
+1 -1
View File
@@ -1107,7 +1107,7 @@ sqlite3.h: $(MAKE_SANITY_CHECK) $(TOP)/src/sqlite.h.in \
$(B.tclsh) $(TOP)/tool/mksqlite3h.tcl $(TOP) -o sqlite3.h
sqlite3.c: .target_source sqlite3.h $(TOP)/tool/mksqlite3c.tcl src-verify$(B.exe) \
$(B.tclsh)
$(B.tclsh) $(EXTRA_SRC)
$(B.tclsh) $(TOP)/tool/mksqlite3c.tcl $(AMALGAMATION_GEN_FLAGS) $(EXTRA_SRC)
cp tsrc/sqlite3ext.h .
cp $(TOP)/ext/session/sqlite3session.h .
+9 -9
View File
@@ -1,5 +1,5 @@
C Fix\san\sinternal\sdoc\stypo\sreported\sin\s[forum:e25e581f917|forum\spost\se25e581f917].
D 2025-03-14T12:37:36.487
C Configure-internal\sbuild\scleanups\s(no\sfunctional\schanges).\sAdd\sEXTRA_SRC\sto\sthe\sdeps\sof\ssqlite3.c.
D 2025-03-15T15:19:42.945
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -14,7 +14,7 @@ F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F art/sqlite370.svg 40b7e2fe8aac3add5d56dd86ab8d427a4eca5bcb3fe4f8946cb3794e1821d531
F auto.def 0612f87776956cff7ba1585ad3ca7ab7d2e88735da0e9b4321dbacb05479cb94
F auto.def 16e64dacd2c556b67df0c33fa08d564224bdb3137756679f39c45ed389b5a07b
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
F autoconf/Makefile.in 6c98c82f52aa27a5c586080cf7c61c811174c2b6d8b8de33fd657d78d541dd7d
F autoconf/Makefile.msc 5bc67d3912444c40c6f96d003e5c90663e51abb83d204a520110b1b2038dcd8b
@@ -49,8 +49,8 @@ F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1d
F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e45f
F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl e69b91f814ea510057ce7663845de703c3746d71cff9a0db6b2563ee3e7fd25e
F autosetup/sqlite-config.tcl 831985320d98002fcd5ea064cae8a49f8afcd9685d83178ef1ebb79189b5045c
F autosetup/proj.tcl f8b5402faf3ee3fe9b10b946a085fc826184d26df1c17b5380e90edf89ea5fb6
F autosetup/sqlite-config.tcl a7f4d093d63bc1da9ec3d44f392f377ce4c86aa7e48532ae51619e55558f5fbe
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl eb4c6578e08dd353263958da0dc620f8400b869a50d06e271ab0be85a51a08d3
@@ -705,7 +705,7 @@ F ext/wasm/tests/opfs/sahpool/sahpool-pausing.js f264925cfc82155de38cecb3d204c36
F ext/wasm/tests/opfs/sahpool/sahpool-worker.js bd25a43fc2ab2d1bafd8f2854ad3943ef673f7c3be03e95ecf1612ff6e8e2a61
F ext/wasm/wasmfs.make 68999f5bd8c489239592d59a420f8c627c99169bbd6fa16a404751f757b9f702
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
F main.mk f2f6af216cf14ec010d317e2f75ed5dc2134a2f9d6be7df3a96ee11149598ca1
F main.mk 88af9562d8f4d921e37ffa4d18f59d6d3749f357c7b876393d37298ec78f8110
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -2213,8 +2213,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P f786de8d1873cd27b1bf83273a1e100e9d481144674888ccf65974e003a3caad
R d7baa5b59cd39b651d61c163fdc55c15
P fa6f6ccdffc50024624306900efd2538c7415d8bdd0f02835b2e9c05adab3cf1
R fa3f42bd795b87d6c693892aa92ef559
U stephan
Z bd2d36d9f3639b6b3b36c30d817df77d
Z 60eb85208863d91adaf5e3aa8394c9ef
# Remove this line to create a well-formed Fossil manifest.
+1 -1
View File
@@ -1 +1 @@
fa6f6ccdffc50024624306900efd2538c7415d8bdd0f02835b2e9c05adab3cf1
8afb8bbce8654d6f76207fb136e79dc52b6724a71eae82a4c098690a68eb75a1