-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Prevent make all
from thinking it needs to run twice
#443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,8 +149,10 @@ out/sqlite3.bc: sqlite-src/$(SQLITE_AMALGAMATION) | |
# Generate llvm bitcode | ||
$(EMCC) $(CFLAGS) -c sqlite-src/$(SQLITE_AMALGAMATION)/sqlite3.c -o $@ | ||
|
||
out/extension-functions.bc: sqlite-src/$(SQLITE_AMALGAMATION)/$(EXTENSION_FUNCTIONS) | ||
# Since the extension-functions.c includes other headers in the sqlite_amalgamation, we declare that this depends on more than just extension-functions.c | ||
out/extension-functions.bc: sqlite-src/$(SQLITE_AMALGAMATION) | ||
mkdir -p out | ||
# Generate llvm bitcode | ||
$(EMCC) $(CFLAGS) -s LINKABLE=1 -c sqlite-src/$(SQLITE_AMALGAMATION)/extension-functions.c -o $@ | ||
|
||
# TODO: This target appears to be unused. If we re-instatate it, we'll need to add more files inside of the JS folder | ||
|
@@ -168,18 +170,20 @@ cache/$(EXTENSION_FUNCTIONS): | |
|
||
## sqlite-src | ||
.PHONY: sqlite-src | ||
sqlite-src: sqlite-src/$(SQLITE_AMALGAMATION) sqlite-src/$(EXTENSION_FUNCTIONS) | ||
sqlite-src: sqlite-src/$(SQLITE_AMALGAMATION) sqlite-src/$(SQLITE_AMALGAMATION)/$(EXTENSION_FUNCTIONS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this was a bug previously, that it depended upon I think it was never noticed because we don't ever manually build the |
||
|
||
sqlite-src/$(SQLITE_AMALGAMATION): cache/$(SQLITE_AMALGAMATION).zip | ||
mkdir -p sqlite-src | ||
sqlite-src/$(SQLITE_AMALGAMATION): cache/$(SQLITE_AMALGAMATION).zip sqlite-src/$(SQLITE_AMALGAMATION)/$(EXTENSION_FUNCTIONS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm open to solving this a different way, but I'm basically saying, "you can't have a src amalgamation folder without the extension functions file too." |
||
mkdir -p sqlite-src/$(SQLITE_AMALGAMATION) | ||
echo '$(SQLITE_AMALGAMATION_ZIP_SHA1) ./cache/$(SQLITE_AMALGAMATION).zip' > cache/check.txt | ||
sha1sum -c cache/check.txt | ||
rm -rf $@ | ||
# We don't delete the sqlite_amalgamation folder. That's a job for clean | ||
# Also, the extension functions get copied here, and if we get the order of these steps wrong, | ||
# this step could remove the extension functions, and that's not what we want | ||
unzip -u 'cache/$(SQLITE_AMALGAMATION).zip' -d sqlite-src/ | ||
touch $@ | ||
|
||
sqlite-src/$(SQLITE_AMALGAMATION)/$(EXTENSION_FUNCTIONS): cache/$(EXTENSION_FUNCTIONS) | ||
mkdir -p sqlite-src | ||
mkdir -p sqlite-src/$(SQLITE_AMALGAMATION) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that this runs before the unzip above, we need to manually create the amalgamation folder |
||
echo '$(EXTENSION_FUNCTIONS_SHA1) ./cache/$(EXTENSION_FUNCTIONS)' > cache/check.txt | ||
sha1sum -c cache/check.txt | ||
cp 'cache/$(EXTENSION_FUNCTIONS)' $@ | ||
|
@@ -188,5 +192,4 @@ sqlite-src/$(SQLITE_AMALGAMATION)/$(EXTENSION_FUNCTIONS): cache/$(EXTENSION_FUNC | |
.PHONY: clean | ||
clean: | ||
rm -f out/* dist/* cache/* | ||
rm -rf sqlite-src/ c/ | ||
|
||
rm -rf sqlite-src/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is a more correct dependency declaration, and has the benefit of saying, "If you build either of these .bc files, you'll need to unpack the whole sqlite src amalgamation folder"