Skip to content

Commit d19fd9b

Browse files
author
Christopher J. Brody
committed
customization: overridable SHA_SUM
1 parent 4ef712e commit d19fd9b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ EXTENSION_FUNCTIONS_URL = https://www.sqlite.org/contrib/download/extension-func
1616
EXTENSION_FUNCTIONS_SHA1 = c68fa706d6d9ff98608044c00212473f9c14892f
1717

1818
EMCC=emcc
19+
SHA_SUM=sha1sum # TODO submit to upstream sql-js version
1920

2021
CFLAGS = \
2122
-O2 \
@@ -178,15 +179,15 @@ sqlite-src: sqlite-src/$(SQLITE_AMALGAMATION) sqlite-src/$(EXTENSION_FUNCTIONS)
178179
sqlite-src/$(SQLITE_AMALGAMATION): cache/$(SQLITE_AMALGAMATION).zip
179180
mkdir -p sqlite-src
180181
echo '$(SQLITE_AMALGAMATION_ZIP_SHA1) ./cache/$(SQLITE_AMALGAMATION).zip' > cache/check.txt
181-
sha1sum -c cache/check.txt
182+
$(SHA_SUM) -c cache/check.txt
182183
rm -rf $@
183184
unzip -u 'cache/$(SQLITE_AMALGAMATION).zip' -d sqlite-src/
184185
touch $@
185186

186187
sqlite-src/$(SQLITE_AMALGAMATION)/$(EXTENSION_FUNCTIONS): cache/$(EXTENSION_FUNCTIONS)
187188
mkdir -p sqlite-src
188189
echo '$(EXTENSION_FUNCTIONS_SHA1) ./cache/$(EXTENSION_FUNCTIONS)' > cache/check.txt
189-
sha1sum -c cache/check.txt
190+
$(SHA_SUM) -c cache/check.txt
190191
cp 'cache/$(EXTENSION_FUNCTIONS)' $@
191192

192193

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Sql.js predates WebAssembly, and thus started as an [asm.js](https://en.wikipedi
2222
- remove extension-functions from build
2323
- enable FTS4
2424
- enable R-Tree
25+
- overridable `SHA_SUM` definition in Makefile
2526

2627
## Documentation
2728
A [full documentation](https://sql-js.github.io/sql.js/documentation/class/Database.html) generated from comments inside the source code, is available.

0 commit comments

Comments
 (0)