Changeset 280 in kBuild for branches/GNU/src/gmake/variable.c
- Timestamp:
- May 16, 2005 4:54:02 PM (20 years ago)
- Location:
- branches/GNU/src/gmake
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gmake
- Property svn:ignore
-
old new 34 34 README.DOS 35 35 README.W32 36 README.OS2 36 37 aclocal.m4 37 38 autom4te.cache
-
- Property svn:ignore
-
branches/GNU/src/gmake/variable.c
r54 r280 500 500 501 501 do 502 /* We found one, so insert it into the set. */ 503 do_variable_definition (&p->variable.fileinfo, p->variable.name, 504 p->variable.value, p->variable.origin, 505 p->variable.flavor, 1); 502 { 503 /* We found one, so insert it into the set. */ 504 505 struct variable *v; 506 507 if (p->variable.flavor == f_simple) 508 { 509 v = define_variable_loc ( 510 p->variable.name, strlen (p->variable.name), 511 p->variable.value, p->variable.origin, 512 0, &p->variable.fileinfo); 513 514 v->flavor = f_simple; 515 } 516 else 517 { 518 v = do_variable_definition ( 519 &p->variable.fileinfo, p->variable.name, 520 p->variable.value, p->variable.origin, 521 p->variable.flavor, 1); 522 } 523 524 /* Also mark it as a per-target and copy export status. */ 525 v->per_target = p->variable.per_target; 526 v->export = p->variable.export; 527 } 506 528 while ((p = lookup_pattern_var (p, file->name)) != 0); 507 529 … … 727 749 #endif 728 750 729 /* This won't override any definition, but it 730 will provide one if thereisn't one there. */751 /* This won't override any definition, but it will provide one if there 752 isn't one there. */ 731 753 v = define_variable ("SHELL", 5, default_shell, o_default, 0); 732 v->export = v_export; /* Always export SHELL. */ 733 734 /* On MSDOS we do use SHELL from environment, since 735 it isn't a standard environment variable on MSDOS, 736 so whoever sets it, does that on purpose. 737 On OS/2 we do not use SHELL from environment but 738 we have already handled that problem above. */ 754 755 /* On MSDOS we do use SHELL from environment, since it isn't a standard 756 environment variable on MSDOS, so whoever sets it, does that on purpose. 757 On OS/2 we do not use SHELL from environment but we have already handled 758 that problem above. */ 739 759 #if !defined(__MSDOS__) && !defined(__EMX__) 740 760 /* Don't let SHELL come from the environment. */ … … 854 874 855 875 case v_noexport: 856 continue; 876 /* If this is the SHELL variable and it's not exported, then 877 add the value from our original environment. */ 878 if (streq (v->name, "SHELL")) 879 { 880 extern struct variable shell_var; 881 v = &shell_var; 882 break; 883 } 884 continue; 857 885 858 886 case v_ifset: … … 969 997 v = lookup_variable_in_set (varname, strlen (varname), 970 998 current_variable_set_list->set); 999 1000 /* Don't append from the global set if a previous non-appending 1001 target-specific variable definition exists. */ 1002 if (v && !v->append) 1003 append = 0; 971 1004 } 972 1005 else … … 1027 1060 && strcmp (varname, "SHELL") == 0) 1028 1061 { 1029 char shellpath[PATH_MAX];1062 PATH_VAR (shellpath); 1030 1063 extern char * __dosexec_find_on_path (const char *, char *[], char *); 1031 1064 … … 1412 1445 sync_Path_environment (void) 1413 1446 { 1414 char *path = allocated_variable_expand ("$(P ath)");1447 char *path = allocated_variable_expand ("$(PATH)"); 1415 1448 static char *environ_path = NULL; 1416 1449 … … 1429 1462 */ 1430 1463 convert_Path_to_windows32 (path, ';'); 1431 environ_path = concat ("P ath", "=", path);1464 environ_path = concat ("PATH", "=", path); 1432 1465 putenv (environ_path); 1433 1466 free (path);
Note:
See TracChangeset
for help on using the changeset viewer.