Changeset 1110 in kBuild
- Timestamp:
- Sep 25, 2007 3:04:41 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/remake.c
r1021 r1110 450 450 this_mtime = file_mtime (file); 451 451 f3 = file; 452 for (f2 = file->multi_next; 453 f2 != NULL && this_mtime != NONEXISTENT_MTIME; 452 for (f2 = file->multi_next; 453 f2 != NULL && this_mtime != NONEXISTENT_MTIME; 454 454 f2 = f2->multi_next) 455 455 if (!f2->multi_maybe) … … 539 539 continue; 540 540 } 541 #endif 541 #endif 542 542 543 543 error (NILF, _("Circular %s <- %s dependency dropped."), … … 546 546 #else 547 547 file->name, d->file->name); 548 #endif 548 #endif 549 549 /* We cannot free D here because our the caller will still have 550 550 a reference to it when we were called recursively via … … 555 555 #else 556 556 file->deps = d->next; 557 #endif 557 #endif 558 558 else 559 559 lastd->next = d->next; … … 566 566 #else 567 567 d->file->parent = file; 568 #endif 568 #endif 569 569 maybe_make = must_make; 570 570 … … 617 617 break; 618 618 } 619 #endif 619 #endif 620 620 621 621 /* Now we know whether this target needs updating. … … 640 640 #else 641 641 d->file->parent = file; 642 #endif 642 #endif 643 643 644 644 /* Inherit dontcare flag from our parent. */ … … 679 679 #else 680 680 d->changed = ((file->phony && file->cmds != 0) 681 #endif 681 #endif 682 682 || file_mtime (d->file) != mtime); 683 683 } … … 739 739 if (d->file == file && f2->multi_maybe) 740 740 continue; 741 #endif 741 #endif 742 742 check_renamed (d->file); 743 743 … … 891 891 notice_finished_file (struct file *file) 892 892 { 893 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 894 struct file *f2; 895 #endif 893 896 struct dep *d; 894 897 int ran = file->command_state == cs_running; … … 898 901 file->command_state = cs_finished; 899 902 file->updated = 1; 903 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 904 if (file->multi_head) 905 { 906 assert (file == file->multi_head); 907 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 908 { 909 f2->command_state = cs_finished; 910 f2->updated = 1; 911 } 912 } 913 #endif 900 914 901 915 #ifdef CONFIG_WITH_EXTENDED_NOTPARALLEL … … 934 948 have_nonrecursing: 935 949 if (file->phony) 950 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 951 { 952 file->update_status = 0; 953 if (file->multi_head) 954 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 955 f2->update_status = 0; 956 } 957 #else 936 958 file->update_status = 0; 959 #endif 937 960 /* According to POSIX, -t doesn't affect targets with no cmds. */ 938 961 else if (file->cmds != 0) … … 940 963 /* Should set file's modification date and do nothing else. */ 941 964 file->update_status = touch_file (file); 965 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 966 if (file->multi_head) 967 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 968 { 969 /* figure out this, touch if it exist ignore otherwise? */ 970 } 971 #endif 942 972 943 973 /* Pretend we ran a real touch command, to suppress the … … 956 986 if (file->mtime_before_update == UNKNOWN_MTIME) 957 987 file->mtime_before_update = file->last_mtime; 988 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 989 if (file->multi_head) 990 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 991 if (f2->mtime_before_update == UNKNOWN_MTIME) 992 f2->mtime_before_update = f2->last_mtime; 993 #endif 958 994 959 995 if ((ran && !file->phony) || touched) … … 978 1014 979 1015 file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME; 1016 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 1017 if (file->multi_head) 1018 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 1019 file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME; /*??*/ 1020 #endif 980 1021 } 981 1022 … … 1032 1073 /* Same as above but for explicit multi target rules. */ 1033 1074 if (file->multi_head) 1034 { 1035 struct file *f2; 1036 assert (file == file->multi_head); 1037 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 1038 { 1039 f2->command_state = cs_finished; 1040 f2->updated = 1; 1041 f2->update_status = file->update_status; 1042 1043 if (!f2->phony) 1044 f_mtime (f2, 0); 1045 } 1046 } 1075 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 1076 { 1077 f2->update_status = file->update_status; 1078 if (!f2->phony) 1079 f_mtime (f2, 0); 1080 } 1047 1081 } 1048 1082 #endif 1049 1083 else if (file->update_status == -1) 1084 #ifdef CONFIG_WITH_EXPLICIT_MULTITARGET 1085 { 1086 /* Nothing was done for FILE, but it needed nothing done. 1087 So mark it now as "succeeded". */ 1088 file->update_status = 0; 1089 if (file->multi_head) 1090 for (f2 = file->multi_next; f2 != 0; f2 = f2->multi_next) 1091 f2->update_status = 0; 1092 } 1093 #else 1050 1094 /* Nothing was done for FILE, but it needed nothing done. 1051 1095 So mark it now as "succeeded". */ 1052 1096 file->update_status = 0; 1097 #endif 1053 1098 } 1054 1099
Note:
See TracChangeset
for help on using the changeset viewer.