summaryrefslogtreecommitdiff
path: root/mkdeps.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-10-26 15:47:57 -0300
committerEuAndreh <eu@euandre.org>2024-10-26 16:47:14 -0300
commitda12c61343f988a6f19f65bf7be331298bc1cca8 (patch)
treed62b50894858e7099a68bf5de362a2c267b47bb9 /mkdeps.sh
parentMakefile: "var version" -> "const Version" (diff)
downloadpapod-da12c61343f988a6f19f65bf7be331298bc1cca8.tar.gz
papod-da12c61343f988a6f19f65bf7be331298bc1cca8.tar.xz
Big bundle commit: adjust build project skeleton; include uncommitted code
There was some code that was being slowly tweaked as I'd work or related things on other repositories that wasn't committed step by step, and that now I'd rather include all as a single changeset, single there weren't really separated stages on how it was developed. Other than that, this commit includes adjustments on dependencies API usage, as they changed during my work on them, and adjustments on the build and test system, as I improved how they worked also during work on other projects. As of this commit, the code compiles and the tests pass. I can't recall if this was true before this commit, but it is true now.
Diffstat (limited to 'mkdeps.sh')
-rwxr-xr-xmkdeps.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/mkdeps.sh b/mkdeps.sh
index e5606ff..b1c61b3 100755
--- a/mkdeps.sh
+++ b/mkdeps.sh
@@ -2,3 +2,28 @@
set -eu
export LANG=POSIX.UTF-8
+
+
+libs() {
+ find src tests -name '*.go' | grep -v '/main\.go$' |
+ grep -v '/version\.go$'
+}
+
+mains() {
+ find src tests -name '*.go' | grep '/main\.go$'
+}
+
+libs | varlist 'libs.go'
+mains | varlist 'mains.go'
+
+find tests/functional/*/*.go -not -name main.go | varlist 'functional-tests/libs.go'
+find tests/functional/*/main.go | varlist 'functional-tests/main.go'
+find tests/fuzz/*/*.go -not -name main.go | varlist 'fuzz-targets/lib.go'
+find tests/fuzz/*/main.go | varlist 'fuzz-targets/main.go'
+find tests/benchmarks/*/*.go -not -name main.go | varlist 'benchmarks/lib.go'
+find tests/benchmarks/*/main.go | varlist 'benchmarks/main.go'
+
+{ libs; mains; } | sort | sed 's/^\(.*\)\.go$/\1.a:\t\1.go/'
+mains | sort | sed 's/^\(.*\)\.go$/\1.bin:\t\1.a/'
+mains | sort | sed 's/^\(.*\)\.go$/\1.bin-check:\t\1.bin/'
+mains | sort | sed 's|^\(.*\)/main\.go$|\1/main.a:\t\1/$(NAME).a|'