1 #include "config.h" 2 #include "defines.h" 3 #include "compat.h" 4 #include "make.h" 5 6 struct engine { 7 void (*run_list)(Lst, bool *, bool *); 8 void (*node_updated)(GNode *); 9 void (*init)(void); 10 } 11 compat_engine = { Compat_Run, Compat_Update, Compat_Init }, 12 parallel_engine = { Make_Run, Make_Update, Make_Init }, 13 *engine; 14 15 void 16 choose_engine(bool compat) 17 { 18 engine = compat ? &compat_engine: ¶llel_engine; 19 engine->init(); 20 } 21 22 void 23 engine_run_list(Lst l, bool *has_errors, bool *out_of_date) 24 { 25 engine->run_list(l, has_errors, out_of_date); 26 } 27 28 void 29 engine_node_updated(GNode *gn) 30 { 31 engine->node_updated(gn); 32 } 33