0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-11-21 19:29:09 +01:00

Add -trim flag to proj-file-content.

FossilOrigin-Name: babf66f5c7074c24ca8ae898cd850964e99cef41fd1395a0d6c582cab75ae3bf
This commit is contained in:
stephan 2024-10-31 08:12:48 +00:00
parent ec04c41be6
commit 98eb4ad6ee
4 changed files with 20 additions and 11 deletions

View File

@ -309,7 +309,7 @@ if {"" eq [proj-bin-define install]} {
# cross-compiling.
set defaultCFlags {-g -O2}
if {[file exists .default-CFLAGS]} {
set defaultCFlags [string trim [proj-file-content .default-CFLAGS]]
set defaultCFlags [proj-file-content -trim .default-CFLAGS]
}
define CFLAGS [get-env CFLAGS $defaultCFlags]
unset defaultCFlags

View File

@ -466,11 +466,20 @@ proc proj-no-check-module-loader {} {
}
########################################################################
# Opens the given file, reads all of its content, and returns it.
proc proj-file-content {fname} {
# Opens the given file, reads all of its content, and returns it. If
# the first arg is -trim, the contents of the file named by the second
# argument are trimmed before returning them.
proc proj-file-content {args} {
set trim 0
set fname $args
if {"-trim" eq [lindex $args 0]} {
set trim 1
lassign $args - fname
}
set fp [open $fname r]
set rc [read $fp]
close $fp
if {$trim} { return [string trim $rc] }
return $rc
}

View File

@ -1,5 +1,5 @@
C Remove\ssome\sproj-assert\schecks\swhich\sare\snot\svalid\son\sOpenBSD.\sEnsure\sthat\squeued\sup\snotices\sabout\sTCL\swarnings\sare\sdisplayed\sbefore\sleaving\ssqlite-check-tcl.
D 2024-10-31T08:03:35.227
C Add\s-trim\sflag\sto\sproj-file-content.
D 2024-10-31T08:12:48.543
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md c5b4009dca54d127d2d6033c22fd9cc34f53bedb6ef12c7cbaa468381c74ab28
@ -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 4df2b29cfabce9e64992b557e58e6b69405c58d2dcac071b70e0ddbad24a3c11
F auto.def cf1acfbbe13d6d041f5a50c8f0db43eb598754081f8f93a7724abfa4a065bf7d
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@ -49,7 +49,7 @@ F autosetup/cc.tcl 7e2fe943ae9d45cf39e9f5b05b6230df8e719415edea5af06c30eb68680bd
F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82
F autosetup/jimsh0.c 27ea5f221359ef6c58780fc6c185aadbf8d3bee9a021331a3e5de0eba0dc6de6
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl 1e9262757c39afe996a4866fb81c4619d4822b2de09952132d362271f4e069c5
F autosetup/proj.tcl 44bc14f956bd2ca0d906ce1ff520504d93400800ab52dd413428f0679a458c59
F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb
F autosetup/tmake.auto eaebc74ad538dfdd3c817c27eefc31930c20510c4f3a3704071f6cb0629ed71f
F autosetup/tmake.tcl a275793ec1b6f8708179af0acef1f6f10d46c2920739743f7a8720c6d700c7a9
@ -2198,8 +2198,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 a62a5171ace53b79feda93701f90d6d6f88eb5542bd35ac76f962745c58588b0
R 541059fa6d4b4792ae313ac1b77e951c
P 3447308f3f66046ffedd502161757211bef0384d7a735ff675c06c04fbc22655
R d554c551215eb4af094319247cb3122a
U stephan
Z 68b7c1ee23dc2d6c759433af0943e546
Z b13c2c59ce3f6c90d0aa0b5e69353220
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
3447308f3f66046ffedd502161757211bef0384d7a735ff675c06c04fbc22655
babf66f5c7074c24ca8ae898cd850964e99cef41fd1395a0d6c582cab75ae3bf