From 41e968a217e820615a90262491e6e438780560c6 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 15 Nov 2023 16:30:37 -0300 Subject: 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. --- Makefile | 1 + deps.mk | 5 +++++ mkdeps.sh | 3 +++ 3 files changed, 9 insertions(+) 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|' -- cgit v1.2.3