Changeset 2594 for trunk/src/kmk/commands.c
- Timestamp:
- Jun 18, 2012, 1:29:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/commands.c
r2591 r2594 116 116 117 117 #endif /* CONFIG_WITH_STRCACHE2 */ 118 119 #ifdef CONFIG_WITH_LAZY_DEPS_VARS 120 /* Create as copy of DEPS without duplicates, similar to what 121 set_file_variables does. Used by func_deps. */ 122 123 struct dep *create_uniqute_deps_chain (struct dep *deps) 124 { 125 struct dep *d; 126 struct dep *head = NULL; 127 struct dep **ppnext= &head; 128 struct hash_table dep_hash; 129 void **slot; 130 131 hash_init (&dep_hash, 500, dep_hash_1, dep_hash_2, dep_hash_cmp); 132 133 for (d = deps; d != 0; d = d->next) 134 { 135 if (d->need_2nd_expansion) 136 continue; 137 138 slot = hash_find_slot (&dep_hash, d); 139 if (HASH_VACANT (*slot)) 140 { 141 struct dep *n = alloc_dep(); 142 *n = *d; 143 n->next = NULL; 144 *ppnext = n; 145 ppnext = &n->next; 146 hash_insert_at (&dep_hash, n, slot); 147 } 148 else 149 { 150 /* Upgrade order only if a normal dep exists. 151 Note! Elected not to upgrade the original, only the sanitized 152 list, need to check that out later. FIXME TODO */ 153 struct dep *d2 = (struct dep *)*slot; 154 if (d->ignore_mtime != d2->ignore_mtime) 155 d->ignore_mtime = d2->ignore_mtime = 0; 156 } 157 } 158 159 return head; 160 } 161 #endif /* CONFIG_WITH_LAZY_DEPS_VARS */ 118 162 119 163 /* Set FILE's automatic variables up. */ … … 451 495 DEFINE_VARIABLE ("|", 1, bar_value); 452 496 } 453 #ifdef CONFIG_WITH_LAZY_DEPS_VARS454 else455 {456 /* Make a copy of the current dependency chain for later use in457 potential $(dep-pluss $@) calls. Then drop duplicate deps. */458 459 /* assert (file->org_deps == NULL); - FIXME? */460 free_dep_chain (file->org_deps);461 file->org_deps = copy_dep_chain (file->deps);462 463 /** @todo do uniquize_deps (file->deps); in the $(dep-* ) functions, it'll464 * save even more space that way. */465 }466 #endif /* CONFIG_WITH_LAZY_DEPS_VARS */467 497 #undef DEFINE_VARIABLE 468 498 }
Note:
See TracChangeset
for help on using the changeset viewer.