Changeset 1408 in kBuild for trunk/src/kmk
- Timestamp:
- Mar 17, 2008 10:21:36 PM (17 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/Makefile.am
r1340 r1408 100 100 -DCONFIG_WITH_EXPLICIT_MULTITARGET \ 101 101 -DCONFIG_WITH_PREPEND_ASSIGNMENT \ 102 -DCONFIG_WITH_LOCAL_VARIABLES \ 102 103 \ 103 104 -DKMK \ -
trunk/src/kmk/Makefile.kmk
r1340 r1408 100 100 CONFIG_WITH_EXPLICIT_MULTITARGET \ 101 101 CONFIG_WITH_PREPEND_ASSIGNMENT \ 102 CONFIG_WITH_LOCAL_VARIABLES \ 102 103 \ 103 104 KMK \ … … 430 431 $(MAKE) -f testcase-if1of.kmk 431 432 432 test_all: test_math test_stack test_shell test_if1of 433 433 test_local: 434 $(MAKE) -f testcase-local.kmk 435 436 test_all: test_math test_stack test_shell test_if1of test_local 437 -
trunk/src/kmk/function.c
r1387 r1408 62 62 #ifdef __OS2__ 63 63 # define CONFIG_WITH_OS2_LIBPATH 1 64 #endif 64 #endif 65 65 #ifdef CONFIG_WITH_OS2_LIBPATH 66 66 # define INCL_BASE … … 571 571 o = variable_buffer_output (o, "automatic", 9); 572 572 break; 573 #ifdef CONFIG_WITH_LOCAL_VARIABLES 574 case o_local: 575 o = variable_buffer_output (o, "local", 5); 576 break; 577 #endif 573 578 } 574 579 … … 3338 3343 /* Sets or gets the OS/2 libpath variables. 3339 3344 3340 The first argument indicates which variable - BEGINLIBPATH, 3341 ENDLIBPATH, LIBPATHSTRICT or LIBPATH. 3342 3343 The second indicates whether this is a get (not present) or 3345 The first argument indicates which variable - BEGINLIBPATH, 3346 ENDLIBPATH, LIBPATHSTRICT or LIBPATH. 3347 3348 The second indicates whether this is a get (not present) or 3344 3349 set (present) operation. When present it is the new value for 3345 3350 the variable. */ … … 3408 3413 if (len >= len_max) 3409 3414 { 3410 error (NILF, _("$(libpath): The new `%s' value is too long (%d bytes, max %d)"), 3415 error (NILF, _("$(libpath): The new `%s' value is too long (%d bytes, max %d)"), 3411 3416 argv[0], len, len_max); 3412 3417 return variable_buffer_output (o, "", 0); … … 3541 3546 #ifdef CONFIG_WITH_OS2_LIBPATH 3542 3547 { STRING_SIZE_TUPLE("libpath"), 1, 2, 1, func_os2_libpath}, 3543 #endif 3548 #endif 3544 3549 #ifdef KMK_HELPERS 3545 3550 { STRING_SIZE_TUPLE("kb-src-tool"), 1, 1, 0, func_kbuild_source_tool}, -
trunk/src/kmk/read.c
r1181 r1408 1168 1168 continue; 1169 1169 } 1170 #ifdef CONFIG_WITH_LOCAL_VARIABLES 1171 1172 if (word1eq ("local")) 1173 { 1174 if (*p2 == '\0') 1175 error (fstart, _("empty `local' directive")); 1176 1177 if (strneq (p2, "define", 6) 1178 && (isblank ((unsigned char)p2[6]) || p2[6] == '\0')) 1179 { 1180 if (ignoring) 1181 in_ignored_define = 1; 1182 else 1183 { 1184 p2 = next_token (p2 + 6); 1185 if (*p2 == '\0') 1186 fatal (fstart, _("empty variable name")); 1187 1188 /* Let the variable name be the whole rest of the line, 1189 with trailing blanks stripped (comments have already been 1190 removed), so it could be a complex variable/function 1191 reference that might contain blanks. */ 1192 p = strchr (p2, '\0'); 1193 while (isblank ((unsigned char)p[-1])) 1194 --p; 1195 do_define (p2, p - p2, o_local, ebuf); 1196 } 1197 } 1198 else if (!ignoring 1199 && !try_variable_definition (fstart, p2, o_local, 0)) 1200 error (fstart, _("invalid `local' directive")); 1201 1202 continue; 1203 } 1204 #endif /* CONFIG_WITH_LOCAL_VARIABLES */ 1170 1205 1171 1206 if (ignoring) -
trunk/src/kmk/variable.c
r1334 r1408 1536 1536 #endif 1537 1537 1538 #ifdef CONFIG_WITH_LOCAL_VARIABLES 1539 /* If we have += but we're in a target or local variable context, 1540 we want to append only with other variables in the context of 1541 this target. */ 1542 if (target_var || origin == o_local) 1543 #else 1538 1544 /* If we have += but we're in a target variable context, we want to 1539 1545 append only with other variables in the context of this target. */ 1540 1546 if (target_var) 1547 #endif 1541 1548 { 1542 1549 append = 1; … … 1734 1741 #endif 1735 1742 origin, flavor == f_recursive, 1743 #ifdef CONFIG_WITH_LOCAL_VARIABLES 1744 (target_var || origin == o_local 1745 #else 1736 1746 (target_var 1747 #endif 1737 1748 ? current_variable_set_list->set : NULL), 1738 1749 flocp); … … 1868 1879 /* Try to interpret LINE (a null-terminated string) as a variable definition. 1869 1880 1870 ORIGIN may be o_file, o_override, o_env, o_env_override, 1881 ORIGIN may be o_file, o_override, o_env, o_env_override, o_local, 1871 1882 or o_command specifying that the variable definition comes 1872 1883 from a makefile, an override directive, the environment with … … 1935 1946 origin = _("automatic"); 1936 1947 break; 1948 #ifdef CONFIG_WITH_LOCAL_VARIABLES 1949 case o_local: 1950 origin = _("`local' directive"); 1951 break; 1952 #endif 1937 1953 case o_invalid: 1938 1954 default: -
trunk/src/kmk/variable.h
r937 r1408 25 25 o_default, /* Variable from the default set. */ 26 26 o_env, /* Variable from environment. */ 27 #ifdef CONFIG_WITH_LOCAL_VARIABLES /** @todo Correct priority? */ 28 o_local, /* Variable from an 'local' directive. */ 29 #endif 27 30 o_file, /* Variable given in a makefile. */ 28 31 o_env_override, /* Variable from environment, if -e. */
Note:
See TracChangeset
for help on using the changeset viewer.