aboutsummaryrefslogtreecommitdiff
path: root/src/build.cc
diff options
context:
space:
mode:
authordacctal <120422854+dacctal@users.noreply.github.com>2026-03-14 12:11:52 +0000
committerdacctal <120422854+dacctal@users.noreply.github.com>2026-03-14 12:11:52 +0000
commit2a6b92ed130ade1ea7542ee210e6957427a0aa81 (patch)
tree1e235b2116feddd3dcde0db9135ce9871801e2f3 /src/build.cc
parent97d70a6f8252b15928ca7f51386df791dedf0067 (diff)
lua build system integration
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/build.cc b/src/build.cc
new file mode 100644
index 0000000..0195412
--- /dev/null
+++ b/src/build.cc
@@ -0,0 +1,13 @@
+#include <filesystem>
+
+#include "lua_build.cc"
+
+void build(std::filesystem::path build_dir) {
+ if (build_dir != std::filesystem::current_path().string()) {
+ std::filesystem::current_path(build_dir);
+ }
+ for (auto const &dir_entry : std::filesystem::directory_iterator(fs::current_path().string())) {
+ if (dir_entry.path().filename() == "bldit") { system("./bldit"); }
+ else { lua_build(build_dir.c_str()); }
+ }
+}