blob: 32ba04623e5d282a13018b48c8608d55afd960a4 (
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
28
29
30
31
32
|
#include "config.h"
#include "defines.h"
#include "compat.h"
#include "make.h"
struct engine {
void (*run_list)(Lst, bool *, bool *);
void (*node_updated)(GNode *);
void (*init)(void);
}
compat_engine = { Compat_Run, Compat_Update, Compat_Init },
parallel_engine = { Make_Run, Make_Update, Make_Init },
*engine;
void
choose_engine(bool compat)
{
engine = compat ? &compat_engine: ¶llel_engine;
engine->init();
}
void
engine_run_list(Lst l, bool *has_errors, bool *out_of_date)
{
engine->run_list(l, has_errors, out_of_date);
}
void
engine_node_updated(GNode *gn)
{
engine->node_updated(gn);
}
|