Lines Matching defs:target

56 extern	Doname		find_suffix_rule(Name target, Name target_body, Name target_suffix, Property *command, Boolean rechecking);
57 extern Doname find_ar_suffix_rule(register Name target, Name true_target, Property *command, Boolean rechecking);
58 extern Doname find_double_suffix_rule(register Name target, Property *command, Boolean rechecking);
60 extern Doname find_percent_rule(register Name target, Property *command, Boolean rechecking);
61 static void create_target_group_and_dependencies_list(Name target, Percent pat_rule, String percent);
62 static Boolean match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t *percent_buf);
64 static Boolean dependency_exists(Name target, Property line);
66 extern void add_target_to_chain(Name target, Chain * query);
69 * find_suffix_rule(target, target_body, target_suffix, command, rechecking)
73 * for the given target.
75 * exists. This is done by concatenating the body of the target name
76 * (target name less target suffix) and the source suffix and checking
83 * target The target we need a rule for
84 * target_body The target name without the suffix
85 * target_suffix The suffix of the target
87 * rechecking true if we are rechecking target which depends
109 find_suffix_rule(Name target, Name target_body, Name target_suffix, Property *command, Boolean rechecking)
112 Name true_target = target;
133 * If the target is a constructed one for a "::" target,
136 if (target->has_target_prop) {
137 true_target = get_prop(target->prop,
138 target_prop)->body.target.target;
155 * Enter all names from the directory where the target lives as
160 /* Cache the suffixes for this target suffix if not done. */
164 /* Preload the sourcename vector with the head of the target name. */
172 /* Scan the suffix list for the target if one exists. */
216 ** target ends with a ~ character, there wont be any
219 ** execute all the rules for the ~ target.
284 get_prop(target->prop,
330 line = maybe_append_prop(target, line_prop);
332 line->body.line.target = true_target;
358 target->depends_on_conditional = true;
361 * Since it is possible that the same target is built several times during
362 * the make run, we have to patch the target with all information we found
363 * here. Thus, the target will have an explicit rule the next time around.
365 line = maybe_append_prop(target, line_prop);
384 * target out of date.
390 if (target->is_member) {
391 out_of_date = (Boolean) OUT_OF_DATE_SEC(target->stat.time,
394 out_of_date = (Boolean) OUT_OF_DATE(target->stat.time,
412 * Add the implicit rule as the target's explicit
425 line->body.line.target = true_target;
466 /* Return here in case no rule matched the target */
471 * find_ar_suffix_rule(target, true_target, command, rechecking)
474 * to find a suffix on it that matches the tail of the target member name.
476 * a rule for the target using the suffix ".a".
482 * target The target we need a rule for
485 * rechecking true if we are rechecking target which depends
495 find_ar_suffix_rule(register Name target, Name true_target, Property *command, Boolean rechecking)
514 * We compare the tail of the target name with the suffixes
524 * Scan the .SUFFIXES list to see if the target matches any of
537 * The target tail matched a suffix from the .SUFFIXES list.
540 target->suffix_scan_done = false;
545 switch (find_suffix_rule(target,
551 line = get_prop(target->prop, line_prop);
559 * if it matches the target tail, and so on.
560 * Go here if the suffix did not match the target tail.
568 * find_double_suffix_rule(target, command, rechecking)
571 * to find a suffix on it that matches the tail of the target name.
573 * a rule for the target.
579 * target Target we need a rule for
581 * rechecking true if we are rechecking target which depends
590 find_double_suffix_rule(register Name target, Property *command, Boolean rechecking)
592 Name true_target = target;
604 * If the target is a constructed one for a "::" target,
607 if (target->has_target_prop) {
608 true_target = get_prop(target->prop,
609 target_prop)->body.target.target;
614 * We compare the tail of the target name with the
625 * Scan the .SUFFIXES list to see if the target matches
629 target->suffix_scan_done = false;
643 * The target tail matched a suffix from the .SUFFIXES list.
651 switch (find_suffix_rule(target,
666 * if it matches the target tail. And so on.
667 * Go here if the suffix did not match the target tail.
680 * which suffixes this target can be derived from.
681 * The target itself is not know here, we just know the suffix of the
682 * target. For each suffix on the list the target can be derived iff
683 * a rule exists for the name "<suffix-on-list><target-suffix>".
685 * each, and tacked to the target suffix nameblock.
694 * working_on_targets Indicates that this is a real target
716 /* Mark the target suffix saying we cashed its list */
723 * Build the name "<suffix-on-list><target-suffix>".
753 * Add the suffix property to the target suffix
770 * find_percent_rule(target, command, rechecking)
773 * It scans the list attempting to match the target.
774 * For each target match it checks if the corresponding source exists.
783 * target The target we need a rule for
785 * rechecking true if we are rechecking target which depends
795 find_percent_rule(register Name target, Property *command, Boolean rechecking)
805 Name true_target = target;
814 /* If the target is constructed for a "::" target we consider that */
815 if (target->has_target_prop) {
816 true_target = get_prop(target->prop,
817 target_prop)->body.target.target;
819 if (target->has_long_member_name) {
820 true_target = get_prop(target->prop,
919 get_prop(target->prop,
998 target->string_mb);
1037 /* create deppendency list and target group from matched pattern rule */
1038 create_target_group_and_dependencies_list(target, pat_rule, &percent);
1041 line = get_prop(target->prop, line_prop);
1083 /* determine whether this dependency made target out of date */
1085 if (target->is_member || depe->name->is_member) {
1086 out_of_date = (Boolean) OUT_OF_DATE_SEC(target->stat.time, depe->name->stat.time);
1088 out_of_date = (Boolean) OUT_OF_DATE(target->stat.time, depe->name->stat.time);
1126 (target->stat.time > file_doesnt_exist) ?
1139 line->body.line.target = true_target;
1165 * ( target, pat_rule, percent, percent_buf)
1167 * matches "target->string" with a % pattern.
1174 * target The target we're trying to match
1182 match_found_with_pattern(Name target, Percent pat_rule, String percent, wchar_t *percent_buf) {
1190 Wstring targ_string(target);
1222 if(suffix_length > target->hash.length) {
1225 if (!targ_string.equal(string.buffer.start, target->hash.length - suffix_length)) {
1230 if(suffix_length > target->hash.length) {
1233 if (!targ_string.equal(&suf_string, target->hash.length - suffix_length)) {
1239 int percent_length = target->hash.length - prefix_length - suffix_length;
1271 * (target, pat_rule, percent)
1273 * constructs dependency list and a target group from pattern.
1280 * construct a target group that looks like this:
1290 * target The target we are building, in the previous
1292 * pat_rule the % pattern that matched "target", here %/%.a
1300 create_target_group_and_dependencies_list(Name target, Percent pat_rule, String percent) {
1305 Property line = maybe_append_prop(target, line_prop);
1330 /* if matched pattern is a group member, create new target group */
1360 /* now we gathered all dependencies and created target group */
1365 if (group_member->name != target) {
1366 group_member->name->prop = target->prop;
1367 group_member->name->conditional_cnt = target->conditional_cnt;
1376 * after pattern matched a target this routine is called to construct targets and dependencies
1416 * dependency_exists(target, line)
1418 * Returns true if the target exists in the
1422 * True if target is on dependency list
1425 * target Target we scan for
1431 dependency_exists(Name target, Property line)
1439 if (dp->name == target) {
1447 add_target_to_chain(Name target, Chain * query)
1449 if (target->is_member && (get_prop(target->prop, member_prop) != NULL)) {
1450 target = get_prop(target->prop, member_prop)->body.member.member;
1454 if ((*query_tail)->name == target) {
1459 (*query_tail)->name = target;