Changeset 1503 for trunk/src/kmk/main.c
- Timestamp:
- Apr 9, 2008, 1:16:53 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/main.c
r1461 r1503 1294 1294 argv[0] = ""; 1295 1295 if (argv[0][0] == '\0') 1296 #ifdef KMK 1297 program = "kmk"; 1298 #else 1296 1299 program = "make"; 1300 #endif 1297 1301 else 1298 1302 { … … 1499 1503 1500 1504 #ifdef KMK 1501 decode_env_switches (STRING_SIZE_TUPLE ("KMK FLAGS"));1502 #e ndif1505 decode_env_switches (STRING_SIZE_TUPLE ("KMK_FLAGS")); 1506 #else /* !KMK */ 1503 1507 decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS")); 1504 1508 #if 0 … … 1508 1512 decode_env_switches (STRING_SIZE_TUPLE ("MFLAGS")); 1509 1513 #endif 1514 #endif /* !KMK */ 1510 1515 decode_switches (argc, argv, 0); 1511 1516 #ifdef WINDOWS32 … … 1643 1648 allow the user's setting of MAKEOVERRIDES to affect MAKEFLAGS, so 1644 1649 a reference to this hidden variable is written instead. */ 1650 #ifdef KMK 1651 (void) define_variable ("KMK_OVERRIDES", 13, 1652 #else 1645 1653 (void) define_variable ("MAKEOVERRIDES", 13, 1654 #endif 1646 1655 "${-*-command-variables-*-}", o_env, 1); 1647 1656 } … … 1753 1762 { 1754 1763 extern char *default_shell; 1755 const char *bin = get_ path_kbuild_bin();1764 const char *bin = get_kbuild_bin_path(); 1756 1765 size_t len = strlen (bin); 1757 1766 default_shell = xmalloc (len + sizeof("/kmk_ash.exe")); … … 1994 2003 /* Decode switches again, in case the variables were set by the makefile. */ 1995 2004 #ifdef KMK 1996 decode_env_switches (STRING_SIZE_TUPLE ("KMK FLAGS"));1997 #e ndif2005 decode_env_switches (STRING_SIZE_TUPLE ("KMK_FLAGS")); 2006 #else /* !KMK */ 1998 2007 decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS")); 1999 2008 #if 0 2000 2009 decode_env_switches (STRING_SIZE_TUPLE ("MFLAGS")); 2001 2010 #endif 2011 #endif /* !KMK */ 2002 2012 2003 2013 #if defined (__MSDOS__) || defined (__EMX__) … … 2766 2776 if (!remote_description || *remote_description == '\0') 2767 2777 printf (_("\nThis program is built for %s/%s/%s [" __DATE__ " " __TIME__ "]\n"), 2768 BUILD_PLATFORM, BUILD_PLATFORM_ARCH, BUILD_PLATFORM_CPU, remote_description);2778 KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU, remote_description); 2769 2779 else 2770 2780 printf (_("\nThis program is built for %s/%s/%s (%s) [" __DATE__ " " __TIME__ "]\n"), 2771 BUILD_PLATFORM, BUILD_PLATFORM_ARCH, BUILD_PLATFORM_CPU, remote_description);2781 KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU, remote_description); 2772 2782 #else /* !KMK */ 2773 2783 if (!remote_description || *remote_description == '\0') … … 3051 3061 define_makeflags (int all, int makefile) 3052 3062 { 3063 #ifdef KMK 3064 static const char ref[] = "$(KMK_OVERRIDES)"; 3065 #else 3053 3066 static const char ref[] = "$(MAKEOVERRIDES)"; 3067 #endif 3054 3068 static const char posixref[] = "$(-*-command-variables-*-)"; 3055 3069 register const struct command_switch *cs; … … 3241 3255 *p = '\0'; 3242 3256 3257 #ifdef KMK 3243 3258 /* Since MFLAGS is not parsed for flags, there is no reason to 3244 3259 override any makefile redefinition. */ 3245 3260 (void) define_variable ("MFLAGS", 6, flagstring, o_env, 1); 3261 #endif /* !KMK */ 3246 3262 3247 3263 if (all && command_variables != 0) … … 3290 3306 *p = '\0'; 3291 3307 3308 #ifdef KMK 3309 v = define_variable ("KMK_FLAGS", 9, 3310 #else 3292 3311 v = define_variable ("MAKEFLAGS", 9, 3312 #endif 3293 3313 /* If there are switches, omit the leading dash 3294 3314 unless it is a single long option with two … … 3381 3401 3382 3402 #ifdef KMK 3383 # ifdef PATH_KBUILD3403 # ifdef KBUILD_PATH 3384 3404 printf (_("%s\n\ 3385 %s PATH_KBUILD: '%s' (default '%s')\n\3386 %s PATH_KBUILD_BIN: '%s' (default '%s')\n"),3405 %sKBUILD_PATH: '%s' (default '%s')\n\ 3406 %sKBUILD_BIN_PATH: '%s' (default '%s')\n"), 3387 3407 precede, 3388 precede, get_ path_kbuild(), PATH_KBUILD,3389 precede, get_ path_kbuild_bin(), PATH_KBUILD_BIN);3390 # else /* ! PATH_KBUILD*/3408 precede, get_kbuild_path(), KBUILD_PATH, 3409 precede, get_kbuild_bin_path(), KBUILD_BIN_PATH); 3410 # else /* !KBUILD_PATH */ 3391 3411 printf (_("%s\n\ 3392 %s PATH_KBUILD: '%s'\n\3393 %s PATH_KBUILD_BIN: '%s'\n"),3412 %sKBUILD_PATH: '%s'\n\ 3413 %sKBUILD_BIN_PATH: '%s'\n"), 3394 3414 precede, 3395 precede, get_ path_kbuild(),3396 precede, get_ path_kbuild_bin());3397 # endif /* ! PATH_KBUILD*/3415 precede, get_kbuild_path(), 3416 precede, get_kbuild_bin_path()); 3417 # endif /* !KBUILD_PATH */ 3398 3418 if (!remote_description || *remote_description == '\0') 3399 3419 printf (_("\n%sThis program is built for %s/%s/%s [" __DATE__ " " __TIME__ "]\n"), 3400 precede, BUILD_PLATFORM, BUILD_PLATFORM_ARCH, BUILD_PLATFORM_CPU, remote_description);3420 precede, KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU, remote_description); 3401 3421 else 3402 3422 printf (_("\n%sThis program is built for %s/%s/%s (%s) [" __DATE__ " " __TIME__ "]\n"), 3403 precede, BUILD_PLATFORM, BUILD_PLATFORM_ARCH, BUILD_PLATFORM_CPU, remote_description);3423 precede, KBUILD_HOST, KBUILD_HOST_ARCH, KBUILD_HOST_CPU, remote_description); 3404 3424 #else 3405 3425 if (!remote_description || *remote_description == '\0')
Note:
See TracChangeset
for help on using the changeset viewer.