forked from OctaForge/OctaBuild
update naming
parent
3115e5591b
commit
18e35cb054
24
main.cc
24
main.cc
|
@ -21,12 +21,12 @@
|
||||||
using ostd::ConstCharRange;
|
using ostd::ConstCharRange;
|
||||||
using ostd::slice_until;
|
using ostd::slice_until;
|
||||||
|
|
||||||
using cscript::CsState;
|
using cscript::cs_state;
|
||||||
using cscript::CsValueRange;
|
using cscript::cs_value_r;
|
||||||
using cscript::CsValue;
|
using cscript::cs_value;
|
||||||
using cscript::CsStackedValue;
|
using cscript::cs_stacked_value;
|
||||||
using cscript::CsBytecodeRef;
|
using cscript::cs_bcode_ref;
|
||||||
using cscript::CsBytecode;
|
using cscript::cs_bcode;
|
||||||
|
|
||||||
/* glob matching code */
|
/* glob matching code */
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ static ConstCharRange ob_compare_subst(
|
||||||
return expanded;
|
return expanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ObState: CsState {
|
struct ObState: cs_state {
|
||||||
ConstCharRange progname;
|
ConstCharRange progname;
|
||||||
bool ignore_env = false;
|
bool ignore_env = false;
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ struct ObState: CsState {
|
||||||
struct Rule {
|
struct Rule {
|
||||||
std::string target;
|
std::string target;
|
||||||
std::vector<std::string> deps;
|
std::vector<std::string> deps;
|
||||||
CsBytecodeRef func;
|
cs_bcode_ref func;
|
||||||
bool action;
|
bool action;
|
||||||
|
|
||||||
Rule(): target(), deps(), func(), action(false) {}
|
Rule(): target(), deps(), func(), action(false) {}
|
||||||
|
@ -380,7 +380,7 @@ struct ObState: CsState {
|
||||||
int ret = wait_result([&rlist, &subdeps, &tname, this]() {
|
int ret = wait_result([&rlist, &subdeps, &tname, this]() {
|
||||||
return exec_list(rlist, subdeps, tname);
|
return exec_list(rlist, subdeps, tname);
|
||||||
});
|
});
|
||||||
CsBytecodeRef *func = nullptr;
|
cs_bcode_ref *func = nullptr;
|
||||||
bool act = false;
|
bool act = false;
|
||||||
for (auto &sr: rlist) {
|
for (auto &sr: rlist) {
|
||||||
if (sr.rule->func) {
|
if (sr.rule->func) {
|
||||||
|
@ -390,7 +390,7 @@ struct ObState: CsState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((!ret && (act || ob_check_exec(tname, subdeps))) && func) {
|
if ((!ret && (act || ob_check_exec(tname, subdeps))) && func) {
|
||||||
CsStackedValue targetv, sourcev, sourcesv;
|
cs_stacked_value targetv, sourcev, sourcesv;
|
||||||
|
|
||||||
if (!targetv.set_alias(new_ident("target"))) {
|
if (!targetv.set_alias(new_ident("target"))) {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -501,7 +501,7 @@ struct ObState: CsState {
|
||||||
}
|
}
|
||||||
|
|
||||||
void rule_add(
|
void rule_add(
|
||||||
CsState &cs, ConstCharRange tgt, ConstCharRange dep, CsBytecode *body,
|
cs_state &cs, ConstCharRange tgt, ConstCharRange dep, cs_bcode *body,
|
||||||
bool action = false
|
bool action = false
|
||||||
) {
|
) {
|
||||||
cscript::util::ListParser p{cs, tgt};
|
cscript::util::ListParser p{cs, tgt};
|
||||||
|
@ -519,7 +519,7 @@ struct ObState: CsState {
|
||||||
}
|
}
|
||||||
|
|
||||||
void rule_dup(
|
void rule_dup(
|
||||||
CsState &cs, ConstCharRange tgt, ConstCharRange ptgt,
|
cs_state &cs, ConstCharRange tgt, ConstCharRange ptgt,
|
||||||
ConstCharRange dep, bool inherit_deps
|
ConstCharRange dep, bool inherit_deps
|
||||||
) {
|
) {
|
||||||
Rule *oldr = nullptr;
|
Rule *oldr = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue