Changeset 3140 for trunk/src/kmk/filedef.h
- Timestamp:
- Mar 14, 2018, 10:28:10 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/filedef.h
r2788 r3140 1 1 /* Definition of target file data structures for GNU Make. 2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 4 2010 Free Software Foundation, Inc. 2 Copyright (C) 1988-2016 Free Software Foundation, Inc. 5 3 This file is part of GNU Make. 6 4 … … 20 18 /* Structure that represents the info on one file 21 19 that the makefile says how to make. 22 All of these are chained together through `next'. */20 All of these are chained together through 'next'. */ 23 21 24 22 #include "hash.h" … … 34 32 demaned by func_deps. */ 35 33 #endif 36 struct commands *cmds; /* Commands to execute for this target. */ 37 int command_flags; /* Flags OR'd in for cmds; see commands.h. */ 38 const char *stem; /* Implicit stem, if an implicit 34 struct commands *cmds; /* Commands to execute for this target. */ 35 const char *stem; /* Implicit stem, if an implicit 39 36 rule has been used */ 40 struct dep *also_make; /* Targets that are made by making this. */ 41 FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */ 42 FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating 43 has been performed. */ 44 struct file *prev; /* Previous entry for same file name; 45 used when there are multiple double-colon 46 entries for the same file. */ 37 struct dep *also_make; /* Targets that are made by making this. */ 38 struct file *prev; /* Previous entry for same file name; 39 used when there are multiple double-colon 40 entries for the same file. */ 47 41 struct file *last; /* Last entry for the same file name. */ 48 42 49 43 /* File that this file was renamed to. After any time that a 50 file could be renamed, call `check_renamed' (below). */44 file could be renamed, call 'check_renamed' (below). */ 51 45 struct file *renamed; 52 46 … … 78 72 #endif 79 73 80 short int update_status; /* Status of the last attempt to update, 81 or -1 if none has been made. */ 82 83 enum cmd_state /* State of the commands. */ 84 { /* Note: It is important that cs_not_started be zero. */ 85 cs_not_started, /* Not yet started. */ 86 cs_deps_running, /* Dep commands running. */ 87 cs_running, /* Commands running. */ 88 cs_finished /* Commands finished. */ 74 FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */ 75 FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating 76 has been performed. */ 77 unsigned int considered; /* equal to 'considered' if file has been 78 considered on current scan of goal chain */ 79 int command_flags; /* Flags OR'd in for cmds; see commands.h. */ 80 enum update_status /* Status of the last attempt to update. */ 81 { 82 us_success = 0, /* Successfully updated. Must be 0! */ 83 us_none, /* No attempt to update has been made. */ 84 us_question, /* Needs to be updated (-q is is set). */ 85 us_failed /* Update failed. */ 86 } update_status ENUM_BITFIELD (2); 87 enum cmd_state /* State of the commands. */ 88 { 89 cs_not_started = 0, /* Not yet started. Must be 0! */ 90 cs_deps_running, /* Dep commands running. */ 91 cs_running, /* Commands running. */ 92 cs_finished /* Commands finished. */ 89 93 } command_state ENUM_BITFIELD (2); 90 94 91 unsigned int precious:1; /* Non-0 means don't delete file on quit */ 92 unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp 93 has only one-second resolution. */ 95 unsigned int builtin:1; /* True if the file is a builtin rule. */ 96 unsigned int precious:1; /* Non-0 means don't delete file on quit */ 97 unsigned int loaded:1; /* True if the file is a loaded object. */ 98 unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp 99 has only one-second resolution. */ 94 100 unsigned int tried_implicit:1; /* Nonzero if have searched 95 96 97 unsigned int updating:1; 98 unsigned int updated:1; 99 unsigned int is_target:1; 100 unsigned int cmd_target:1; 101 unsigned int phony:1; 102 101 for implicit rule for making 102 this file; don't search again. */ 103 unsigned int updating:1; /* Nonzero while updating deps of this file */ 104 unsigned int updated:1; /* Nonzero if this file has been remade. */ 105 unsigned int is_target:1; /* Nonzero if file is described as target. */ 106 unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */ 107 unsigned int phony:1; /* Nonzero if this is a phony file 108 i.e., a prerequisite of .PHONY. */ 103 109 unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */ 104 110 unsigned int secondary:1; /* Nonzero means remove_intermediates should 105 111 not delete it. */ 106 unsigned int dontcare:1; 107 112 unsigned int dontcare:1; /* Nonzero if no complaint is to be made if 113 this target cannot be remade. */ 108 114 unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */ 109 115 unsigned int pat_searched:1;/* Nonzero if we already searched for 110 116 pattern-specific variables. */ 111 unsigned int considered:1; /* equal to 'considered' if file has been112 considered on current scan of goal chain */113 117 unsigned int no_diag:1; /* True if the file failed to update and no 114 118 diagnostics has been issued (dontcare). */ … … 130 134 131 135 132 extern struct file * suffix_file, *default_file;136 extern struct file *default_file; 133 137 134 138 … … 147 151 void notice_finished_file (struct file *file); 148 152 void init_hash_files (void); 153 void verify_file_data_base (void); 149 154 char *build_target_list (char *old_list); 150 155 void print_prereqs (const struct dep *deps); 151 156 void print_file_data_base (void); 157 int try_implicit_rule (struct file *file, unsigned int depth); 158 int stemlen_compare (const void *v1, const void *v2); 152 159 153 160 #if FILE_TIMESTAMP_HI_RES 154 161 # define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \ 155 file_timestamp_cons (fname, (st).st_mtime, (st). st_mtim.ST_MTIM_NSEC)162 file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC) 156 163 #else 157 164 # define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \ … … 168 175 169 176 #define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \ 170 177 >> FILE_TIMESTAMP_LO_BITS) 171 178 #define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \ 172 179 & ((1 << FILE_TIMESTAMP_LO_BITS) - 1))) 173 180 174 181 /* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN" 175 representing a file timestamp. The upper bound is not necessarily 19,182 representing a file timestamp. The upper bound is not necessarily 29, 176 183 since the year might be less than -999 or greater than 9999. 177 184 … … 190 197 + 1 + 1 + 4 + 25) 191 198 192 FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, int);199 FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, long int); 193 200 FILE_TIMESTAMP file_timestamp_now (int *); 194 201 void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts); … … 225 232 #else 226 233 #define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \ 227 228 229 #endif 230 231 /* Modtime value to use for `infinitely new'. We used to get the current time232 from the system and use that whenever we wanted `new'. But that causes234 << FILE_TIMESTAMP_LO_BITS) \ 235 + ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1) 236 #endif 237 238 /* Modtime value to use for 'infinitely new'. We used to get the current time 239 from the system and use that whenever we wanted 'new'. But that causes 233 240 trouble when the machine running make and the machine holding a file have 234 different ideas about what time it is; and can also lose for `force'241 different ideas about what time it is; and can also lose for 'force' 235 242 targets, which need to be considered newer than anything that depends on 236 243 them, even if said dependents' modtimes are in the future. */
Note:
See TracChangeset
for help on using the changeset viewer.