diff options
| author | dacctal <120422854+dacctal@users.noreply.github.com> | 2026-03-14 12:11:52 +0000 |
|---|---|---|
| committer | dacctal <120422854+dacctal@users.noreply.github.com> | 2026-03-14 12:11:52 +0000 |
| commit | 2a6b92ed130ade1ea7542ee210e6957427a0aa81 (patch) | |
| tree | 1e235b2116feddd3dcde0db9135ce9871801e2f3 /src/build_pkg.cc | |
| parent | 97d70a6f8252b15928ca7f51386df791dedf0067 (diff) | |
lua build system integration
Diffstat (limited to 'src/build_pkg.cc')
| -rw-r--r-- | src/build_pkg.cc | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/build_pkg.cc b/src/build_pkg.cc index 67c67b8..7627e16 100644 --- a/src/build_pkg.cc +++ b/src/build_pkg.cc @@ -1,36 +1,17 @@ #include <functional> -#include "build_systems.cc" - -const std::map<std::string, std::function<void()>> builds = { - {"bldit", bldit_build}, - {"compile.sh", compilesh_build}, - {"build.sh", buildsh_build}, - {"autogen.sh", autogen_build}, - {"configure", autotools_build}, - {"configure.ac", autotools_build}, - {"Makefile", make_build}, - {"Makefile.am", make_build}, - {"CMakeLists.txt", cmake_build}, - {"meson.build", meson_build}, - {"build.ninja", ninja_build}, - {"Cargo.toml", cargo_build}, - {"go.mod", go_build}, - {"gradle.build", gradle_build}, - {"pnpm-lock.yaml", pnpm_build}, - {"pyproject.toml", python_build}, - {"build.zig", zig_build} -}; +#include "build_map.cc" void build_pkg(std::filesystem::path build_dir) { if (build_dir != fs::current_path().string()) { fs::current_path(build_dir); } - for (auto const& dir_entry : fs::directory_iterator(fs::current_path().string())) { + for (auto const &dir_entry : + fs::directory_iterator(fs::current_path().string())) { for (auto build : builds) { if (dir_entry.path().filename() == build.first) { build.second(); } - } + } } } |
