diff options
| author | dacctal <dacctalyt@gmail.com> | 2026-04-03 14:56:05 +0000 |
|---|---|---|
| committer | dacctal <dacctalyt@gmail.com> | 2026-04-03 14:56:05 +0000 |
| commit | ed78991edc4755c0276dcb4eb454b43fa38296fc (patch) | |
| tree | 460da5399e34e1dce7a293cb22578da15977d895 /src/build.cc | |
| parent | 2a6b92ed130ade1ea7542ee210e6957427a0aa81 (diff) | |
countless changes
Diffstat (limited to 'src/build.cc')
| -rw-r--r-- | src/build.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/build.cc b/src/build.cc index 0195412..c378dda 100644 --- a/src/build.cc +++ b/src/build.cc @@ -1,13 +1,19 @@ #include <filesystem> +#include <iostream> -#include "lua_build.cc" +#include "build.hh" +#include "lua_build.hh" +#include "vars.hh" 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()); } + for (auto const &dir_entry : std::filesystem::directory_iterator(std::filesystem::current_path().string())) { + if (dir_entry.path().filename() == "bldit") { system("./bldit"); return; } } + for (auto const &dir_entry : std::filesystem::directory_iterator(std::filesystem::current_path().string())) { + if (lua_build(build_dir.c_str())) { return; } + } + std::cout << print_error << "no usable build system was found\n"; } |
