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_systems.cc | |
| parent | 2a6b92ed130ade1ea7542ee210e6957427a0aa81 (diff) | |
countless changes
Diffstat (limited to 'src/build_systems.cc')
| -rw-r--r-- | src/build_systems.cc | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/src/build_systems.cc b/src/build_systems.cc deleted file mode 100644 index a6364ec..0000000 --- a/src/build_systems.cc +++ /dev/null @@ -1,111 +0,0 @@ -#include <filesystem> - -#include "../include/toml.hh" - -#include "vars.cc" - -void autogen_build() { - system("./autogen.sh"); - system("make"); -} - -void autotools_build() { - system("./configure"); - for (auto const& dir_entry : fs::directory_iterator(fs::current_path().string())) { - if (dir_entry.path().filename() == "CMakeLists.txt") { - fs::create_directories("build"); - fs::current_path("build"); - system("cmake .."); - } - } - for (auto const& dir_entry : fs::directory_iterator(fs::current_path().string())) { - if (dir_entry.path().filename() == "Makefile") { - system("make"); - } - } -} - -void bldit_build() { - system("./bldit"); -} - -void buildsh_build() { - system("./build.sh"); -} - -void compilesh_build() { - system("./compile.sh"); -} - -void cargo_build() { - system("cargo build --release"); -} - -void cmake_build() { - fs::create_directories("build"); - fs::current_path("build"); - system("cmake .."); - system("make"); -} - -void go_build() { - for (auto const& dir_entry : fs::directory_iterator(fs::current_path().string())) { - if (dir_entry.path().filename() == "main.go") { - system("go build main.go"); - } - } -} - -void gradle_build() { - system("gradle build"); -} - -void make_build() { - for (auto const& dir_entry : fs::directory_iterator(fs::current_path().string())) { - if (dir_entry.path().filename() == "autogen.sh") { - autogen_build(); - return; - } - } - for (auto const& dir_entry : fs::directory_iterator(fs::current_path().string())) { - if (dir_entry.path().filename() == "configure.ac") { - autotools_build(); - return; - } - } - system("make"); -} - -void meson_build() { - system("meson setup --wipe build"); - system("meson compile -C build"); -} - -void ninja_build() { - system("ninja"); -} - -void nim_build() { - system("nimble build"); -} - -void pnpm_build() { - system("pnpm install"); - system("pnpm run build"); -} - -void python_build() { - toml::parse_result pyproject_toml = toml::parse_file("pyproject.toml"); - std::string pypkg = pyproject_toml["project"]["name"].ref<std::string>(); - std::string commands[] = { - "export PIPX_BIN_DIR=" + bin, - "pipx install " + pypkg - }; - for (int i = 0; i < sizeof(commands)/sizeof(commands[0]); i++) { - system(commands[i].c_str()); - } -} - -void zig_build() { - system("zig build"); -} |
