VirtualBox

Changeset 280 in kBuild for branches/GNU/src/gmake/variable.c


Ignore:
Timestamp:
May 16, 2005 4:54:02 PM (20 years ago)
Author:
bird
Message:

Current make snaphot, 2005-05-16.

Location:
branches/GNU/src/gmake
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gmake

    • Property svn:ignore
      •  

        old new  
        3434README.DOS
        3535README.W32
         36README.OS2
        3637aclocal.m4
        3738autom4te.cache
  • branches/GNU/src/gmake/variable.c

    r54 r280  
    500500
    501501          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            }
    506528          while ((p = lookup_pattern_var (p, file->name)) != 0);
    507529
     
    727749#endif
    728750
    729   /* This won't override any definition, but it
    730      will provide one if there isn't one there.  */
     751  /* This won't override any definition, but it will provide one if there
     752     isn't one there.  */
    731753  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. */
    739759#if !defined(__MSDOS__) && !defined(__EMX__)
    740760  /* Don't let SHELL come from the environment.  */
     
    854874
    855875              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;
    857885
    858886              case v_ifset:
     
    969997            v = lookup_variable_in_set (varname, strlen (varname),
    970998                                        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;
    9711004          }
    9721005        else
     
    10271060      && strcmp (varname, "SHELL") == 0)
    10281061    {
    1029       char shellpath[PATH_MAX];
     1062      PATH_VAR (shellpath);
    10301063      extern char * __dosexec_find_on_path (const char *, char *[], char *);
    10311064
     
    14121445sync_Path_environment (void)
    14131446{
    1414   char *path = allocated_variable_expand ("$(Path)");
     1447  char *path = allocated_variable_expand ("$(PATH)");
    14151448  static char *environ_path = NULL;
    14161449
     
    14291462   */
    14301463  convert_Path_to_windows32 (path, ';');
    1431   environ_path = concat ("Path", "=", path);
     1464  environ_path = concat ("PATH", "=", path);
    14321465  putenv (environ_path);
    14331466  free (path);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette