Changeset 1975 in kBuild for trunk/src/kmk
- Timestamp:
- Oct 26, 2008 10:48:35 PM (16 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/expand.c
r1932 r1975 831 831 832 832 833 #if def CONFIG_WITH_COMMANDS_FUNC833 #if defined (CONFIG_WITH_VALUE_LENGTH) || defined (CONFIG_WITH_COMMANDS_FUNC) 834 834 /* Expand LINE for FILE. Error messages refer to the file and line where 835 835 FILE's commands were found. Expansion uses FILE's variable set list. … … 875 875 876 876 877 #endif /* CONFIG_WITH_ COMMANDS_FUNC */877 #endif /* CONFIG_WITH_VALUE_LENGTH || CONFIG_WITH_COMMANDS_FUNC */ 878 878 /* Like allocated_variable_expand, but for += target-specific variables. 879 879 First recursively construct the variable value from its appended parts in -
trunk/src/kmk/file.c
r1959 r1975 83 83 */ 84 84 85 #ifndef KMK85 #ifndef CONFIG_WITH_STRCACHE2 86 86 struct file * 87 87 lookup_file (const char *name) 88 #else /* KMK*/88 #else /* CONFIG_WITH_STRCACHE2 */ 89 89 MY_INLINE struct file * 90 90 lookup_file_common (const char *name, int cached) 91 #endif /* KMK*/91 #endif /* CONFIG_WITH_STRCACHE2 */ 92 92 { 93 93 struct file *f; … … 164 164 } 165 165 166 #ifdef KMK166 #ifdef CONFIG_WITH_STRCACHE2 167 167 /* Given a name, return the struct file * for that name, 168 168 or nil if there is none. */ … … 182 182 return lookup_file_common (name, 1 /* cached */); 183 183 } 184 #endif /* KMK*/184 #endif /* CONFIG_WITH_STRCACHE2 */ 185 185 186 186 … … 582 582 struct dep *new, *d1; 583 583 char *p; 584 #ifdef CONFIG_WITH_ VALUE_LENGTH584 #ifdef CONFIG_WITH_STRCACHE2 585 585 unsigned int len; 586 586 #endif … … 669 669 set_file_variables (f); 670 670 671 #if ndef CONFIG_WITH_STRCACHE2671 #if !defined (CONFIG_WITH_VALUE_LENGTH) || !defined (CONFIG_WITH_STRCACHE2) 672 672 p = variable_expand_for_file (d->name, f); 673 673 #else -
trunk/src/kmk/filedef.h
r1934 r1975 126 126 127 127 struct file *lookup_file (const char *name); 128 #ifdef KMK128 #ifdef CONFIG_WITH_STRCACHE2 129 129 struct file *lookup_file_cached (const char *name); 130 130 #endif -
trunk/src/kmk/make.h
r1971 r1975 165 165 #endif 166 166 167 #if defined (KMK) || defined (CONFIG_WITH_VALUE_LENGTH) 167 #if defined (KMK) || defined (CONFIG_WITH_VALUE_LENGTH) \ 168 || defined (CONFIG_WITH_STRCACHE2) 168 169 # ifdef _MSC_VER 169 170 # define MY_DBGBREAK __debugbreak() -
trunk/src/kmk/read.c
r1947 r1975 445 445 deps->next = read_makefiles; 446 446 read_makefiles = deps; 447 #ifndef KMK447 #ifndef CONFIG_WITH_STRCACHE2 448 448 deps->file = lookup_file (filename); 449 449 #else … … 2407 2407 new entry if the file is a double-colon, which we don't want in 2408 2408 this situation. */ 2409 #ifndef KMK2409 #ifndef CONFIG_WITH_STRCACHE2 2410 2410 f = lookup_file (name); 2411 2411 if (!f) 2412 2412 f = enter_file (strcache_add (name)); 2413 #else /* KMK*/2413 #else /* CONFIG_WITH_STRCACHE2 */ 2414 2414 /* XXX: this is probably already a cached string. */ 2415 2415 fname = strcache_add (name); … … 2417 2417 if (!f) 2418 2418 f = enter_file (fname); 2419 #endif 2419 #endif /* CONFIG_WITH_STRCACHE2 */ 2420 2420 else if (f->double_colon) 2421 2421 f = f->double_colon; … … 2780 2780 { 2781 2781 /* Double-colon. Make a new record even if there already is one. */ 2782 #ifndef KMK2782 #ifndef CONFIG_WITH_STRCACHE2 2783 2783 f = lookup_file (name); 2784 #else /* KMK- the name is already in the cache, don't waste time. */2784 #else /* CONFIG_WITH_STRCACHE2 - the name is already in the cache, don't waste time. */ 2785 2785 f = lookup_file_cached (name); 2786 #endif 2786 #endif /* CONFIG_WITH_STRCACHE2 */ 2787 2787 2788 2788 /* Check for both : and :: rules. Check is_target so -
trunk/src/kmk/variable.h
r1946 r1975 184 184 char *variable_expand (const char *line); 185 185 char *variable_expand_for_file (const char *line, struct file *file); 186 #if def CONFIG_WITH_COMMANDS_FUNC186 #if defined (CONFIG_WITH_VALUE_LENGTH) || defined (CONFIG_WITH_COMMANDS_FUNC) 187 187 char *variable_expand_for_file_2 (char *o, const char *line, unsigned int lenght, 188 188 struct file *file, unsigned int *value_lenp);
Note:
See TracChangeset
for help on using the changeset viewer.