- Timestamp:
- Sep 8, 2012 11:50:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/file.c
r2591 r2634 673 673 #ifdef CONFIG_WITH_INCLUDEDEP 674 674 /* Dependencies loaded by includedep are ready for use and we skip 675 the expensive parsing and globbing for them. To avoid wasting 676 lots of time walking the f->deps chain, we will advance D and 677 process all subsequent includedep records. */ 675 the expensive parsing and globbing for them. */ 678 676 679 677 if (d->includedep) 680 678 { 681 struct dep *d1 = new = alloc_dep(); 682 d1->staticpattern = 0; 683 d1->need_2nd_expansion = 0; 684 d1->includedep = 1; 685 d1->file = lookup_file (d->name); 686 if (d1->file == 0) 687 d1->file = enter_file (d->name); 688 689 while (d->next && d->next->includedep) 690 { 691 d = d->next; 692 d1 = d1->next = alloc_dep(); 693 d1->staticpattern = 0; 694 d1->need_2nd_expansion = 0; 695 d1->includedep = 1; 696 d1->file = lookup_file (d->name); 697 if (d1->file == 0) 698 d1->file = enter_file (d->name); 699 } 679 d->need_2nd_expansion = 0; 680 d->file = lookup_file (name); 681 if (d->file == 0) 682 d->file = enter_file (name); 683 d->name = 0; 684 free(name); 685 686 dp = &d->next; 687 d = d->next; 688 continue; 700 689 } 701 else702 {703 690 #endif /* CONFIG_WITH_INCLUDEDEP */ 704 691 … … 711 698 o = subst_expand (o, name, "%", "$*", 1, 2, 0); 712 699 *o = '\0'; 700 #ifndef CONFIG_WITH_STRCACHE2 713 701 free (name); 714 #ifndef CONFIG_WITH_STRCACHE2715 702 d->name = name = xstrdup (variable_buffer); /* bird not d->name, can be reallocated */ 716 703 #else … … 758 745 } 759 746 760 #ifdef CONFIG_WITH_INCLUDEDEP761 }762 #endif763 764 747 /* Add newly parsed prerequisites. */ 765 748 next = d->next; 749 #ifdef KMK /* bird: memory leak */ 750 assert(new != d); 751 free_dep (d); 752 #endif 766 753 *dp = new; 767 754 for (dp = &new->next, d = new->next; d != 0; dp = &d->next, d = d->next)
Note:
See TracChangeset
for help on using the changeset viewer.