Remake
|
Functions | |
static void | complete_job (int job_id, bool success) |
static std::string | prepare_script (rule_t const &rule) |
static bool | run_script (int job_id, rule_t const &rule) |
static bool | start (std::string const &target, client_list::iterator ¤t) |
static void | complete_request (client_t &client, bool success) |
static bool | has_free_slots () |
static bool | handle_clients () |
static void | create_server () |
void | accept_client () |
void | finalize_job (pid_t pid, bool res) |
void | server_loop () |
void | server_mode (std::string const &remakefile, string_list const &targets) |
void accept_client | ( | ) |
Accept a connection from a client, get the job it spawned from, get the targets, and mark them as dependencies of the job targets.
Definition at line 2419 of file remake.cpp.
Referenced by server_loop().
|
static |
Handle job completion.
Definition at line 1915 of file remake.cpp.
Referenced by complete_request(), finalize_job(), and run_script().
|
static |
Send a reply to a client then remove it. If the client was a dependency client, start the actual script.
Definition at line 2185 of file remake.cpp.
Referenced by handle_clients().
|
static |
Create a named unix socket that listens for build requests. Also set the REMAKE_SOCKET environment variable that will be inherited by all the job scripts.
Definition at line 2339 of file remake.cpp.
Referenced by server_mode().
void finalize_job | ( | pid_t | pid, |
bool | res | ||
) |
Handle child process exit status.
Definition at line 2504 of file remake.cpp.
Referenced by server_loop().
|
static |
Handle client requests:
Definition at line 2235 of file remake.cpp.
Referenced by server_loop().
|
static |
Return whether there are slots for starting new jobs.
Definition at line 2218 of file remake.cpp.
Referenced by handle_clients().
|
static |
Return the script obtained by substituting variables.
Definition at line 1948 of file remake.cpp.
Referenced by run_script().
|
static |
Execute the script from rule.
Definition at line 2031 of file remake.cpp.
Referenced by complete_request(), and start().
void server_loop | ( | ) |
Loop until all the jobs have finished.
Definition at line 2519 of file remake.cpp.
Referenced by server_mode().
void server_mode | ( | std::string const & | remakefile, |
string_list const & | targets | ||
) |
Load dependencies and rules, listen to client requests, and loop until all the requests have completed. If Remakefile is obsolete, perform a first run with it only, then reload the rules, and perform a second with the original clients.
Definition at line 2580 of file remake.cpp.
Referenced by main().
|
static |
Create a job for target according to the loaded rules. Mark all the targets from the rule as running and reset their dependencies. If the rule has dependencies, create a new client to build them just before current, and change current so that it points to it.
Definition at line 2152 of file remake.cpp.
Referenced by handle_clients().