// file : build/algorithm -*- C++ -*- // copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file #ifndef BUILD_ALGORITHM #define BUILD_ALGORITHM #include #include #include namespace build { class prerequisite; // The default prerequsite search implementation. It first calls the // target-type-specific search function. If that doesn't yeld anything, // it creates a new target. // target& search (prerequisite&); // Match a rule to the action/target with ambiguity detection. // void match (action, target&); // The default prerequisite search and match implementation. It calls // search() and then match() for each prerequisite in a loop. // void search_and_match (action, target&); // Execute the action on target, assuming a rule has been matched // and the recipe for this action has been set. // target_state execute (action, target&); // The default prerequisite execute implementation. It calls execute() // for each prerequisite in a loop. Returns target_state::changed // if any of them were changed and target_state::unchanged otherwise. // target_state execute_prerequisites (action, target&); // A version of the above that also determines whether the action // needs to be executed on the target based on the passed timestamp. // bool execute_prerequisites (action, target&, const timestamp&); // Another version of the above that does two extra things for the // caller: it determines whether the action needs to be executed on // the target based on the passed timestamp and, if so, finds a // prerequisite of the specified type (e.g., source file). // template T* execute_prerequisites (action, target&, const timestamp&); } #include #include #endif // BUILD_ALGORITHM