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/lua_build.cc | |
| parent | 2a6b92ed130ade1ea7542ee210e6957427a0aa81 (diff) | |
countless changes
Diffstat (limited to 'src/lua_build.cc')
| -rw-r--r-- | src/lua_build.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua_build.cc b/src/lua_build.cc index b75e2f3..7d89450 100644 --- a/src/lua_build.cc +++ b/src/lua_build.cc @@ -5,11 +5,12 @@ #include <lua5.1/lauxlib.h> #include <lua5.1/lualib.h> -#include "vars.cc" +#include "lua_build.hh" +#include "vars.hh" std::map<std::string, int> build_files; -void lua_build (const char *path) { +bool lua_build(const char *path) { lua_State *L = lua_open(); luaL_openlibs(L); @@ -47,12 +48,11 @@ void lua_build (const char *path) { std::cout << "calling lua build function according to key filename '"<< key << "'...\n"; if (lua_pcall(L, 1, 0, 0) != 0) { std::cout << print_error << "lua build function failed to run\n"; + break; } if (build_found) { break; } } lua_pop(L, 1); } - if (!build_found) { - std::cout << print_error << "no usable build system was found\n"; - } + return build_found; } |
