summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-11-15 16:30:37 -0300
committerEuAndreh <eu@euandre.org>2023-11-15 16:30:39 -0300
commit41e968a217e820615a90262491e6e438780560c6 (patch)
treead0786ca4dc78222093632f07d70e625797c596f
parentTODOs.md: Add relevant quote on software correctness and discipline (diff)
downloadpapod-41e968a217e820615a90262491e6e438780560c6.tar.gz
papod-41e968a217e820615a90262491e6e438780560c6.tar.xz
Makefile, mkdeps.sh: Enforce JS->native dependency
Assert that we'll always have the `src/napi-sqlite.node` binary ready by the time we get to any JavaScript file.
-rw-r--r--Makefile1
-rw-r--r--deps.mk5
-rwxr-xr-xmkdeps.sh3
3 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bc36ce2..cbb92d5 100644
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,7 @@ $(sources.o) $(sources.lo) $(sources.to): src/config.h Makefile deps.mk
tests/tests-lib.o: tests/tests-lib.h src/config.h Makefile deps.mk
$(sources.to): tests/tests-lib.h
$(sources.ta): tests/tests-lib.o
+$(sources.js) $(tests.js): src/napi-sqlite.node
src/index.js:
ln -fs api.js $@
diff --git a/deps.mk b/deps.mk
index 2fb63c8..3ab1669 100644
--- a/deps.mk
+++ b/deps.mk
@@ -35,3 +35,8 @@ src/logerr.o src/logerr.lo src/logerr.to: src/../tests/slurp.h
src/catalog.ta: src/logerr.o src/../tests/slurp.o
src/i18n.ta: src/logerr.o src/catalog.o
src/logerr.ta: src/../tests/slurp.o
+
+tests/js/db.js-t: tests/js/db.js
+tests/js/ircd.js-t: tests/js/ircd.js
+tests/js/utils.js-t: tests/js/utils.js
+tests/js/web.js-t: tests/js/web.js
diff --git a/mkdeps.sh b/mkdeps.sh
index 12d10f0..1f63dbd 100755
--- a/mkdeps.sh
+++ b/mkdeps.sh
@@ -13,3 +13,6 @@ find src/*.js -not -name index.js | sort | varlist 'sources.js'
find tests/js/*.js | sort | varlist 'tests.js'
sh tools/cdeps.sh `find src/*.c -not -name napi-sqlite.c | sort`
+
+printf '\n'
+find tests/js/*.js | sort | sed 's|^\(.*\)$|\1-t: \1|'