Changeset 2549 in kBuild for trunk/src/kmk/variable.c
- Timestamp:
- Nov 9, 2011 1:22:04 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/variable.c
r2548 r2549 215 215 struct variable var_key; 216 216 217 #ifndef KMK 217 218 if (set == NULL) 218 219 set = &global_variable_set; 220 #else 221 if (set == NULL) 222 { 223 /* underscore prefixed variables are automatically local in 224 kBuild-define-* scopes. They also get a global definition with 225 the current scope prefix. */ 226 if (g_pTopKbDef && length > 0 && name[0] == '_') 227 { 228 char *prefixed_nm; 229 unsigned int prefixed_nm_len; 230 231 set = get_top_kbuild_variable_set(); 232 v = define_variable_in_set(name, length, value, value_len, 233 1 /* duplicate_value */, 234 origin, recursive, set, flocp); 235 236 prefixed_nm_len = length; 237 prefixed_nm = kbuild_prefix_variable(name, &prefixed_nm_len); 238 define_variable_in_set(prefixed_nm, prefixed_nm_len, 239 value, value_len, duplicate_value, 240 origin, recursive, &global_variable_set, 241 flocp); 242 free(prefixed_nm); 243 return v; 244 } 245 set = &global_variable_set; 246 } 247 #endif 219 248 220 249 #ifndef CONFIG_WITH_STRCACHE2
Note:
See TracChangeset
for help on using the changeset viewer.