aboutsummaryrefslogtreecommitdiff
path: root/src/lua_build.c
blob: f99a341c364daa7ddcb6fa038110e73c69eca257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <stdbool.h>

#include "lua_build.h"
#include "lua_state.h"
#include "vars.h"

bool lua_build(const char *repository, const char *target, const char *path) {
    if (is_verbose) printf("%sattempting to use build function specified in 'repositories.%s'...\n",
           print_pkgit, repository);

    if (repo_build(repository)) {
        return true;
    }

    if (is_verbose) printf("%sattempting to use build function specified in 'bldit.lua'...\n", print_pkgit);
    if (bldit(target)) {
        return true;
    }

    if (is_verbose) printf("%sattempting to use build functions specified in 'build_systems'...\n", print_pkgit);
    if (config_build(path)) {
        return true;
    }

    return false;
}