Changeset 536 for trunk/src/gmake


Ignore:
Timestamp:
Sep 19, 2006, 6:44:57 AM (19 years ago)
Author:
bird
Message:

Fixed missing expansion in kbuild_lookup_variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/kbuild.c

    r534 r536  
    106106}
    107107
     108/**
     109 * Converts the specified variable into a 'simple' one.
     110 * @returns pVar.
     111 * @param   pVar        The variable.
     112 */
     113static struct variable *
     114kbuild_simplify_variable(struct variable *pVar)
     115{
     116    if (memchr(pVar->value, '$', pVar->value_length))
     117    {
     118        char *pszExpanded = allocated_variable_expand(pVar->value);
     119        free(pVar->value);
     120        pVar->value = pszExpanded;
     121        pVar->value_length = strlen(pVar->value);
     122        pVar->value_alloc_len = pVar->value_length + 1;
     123    }
     124    pVar->recursive = 0;
     125}
    108126
    109127/**
     
    131149        }
    132150#endif
     151        /* Make sure the variable is simple, convert it if necessary. */
     152        if (pVar->recursive)
     153            kbuild_simplify_variable(pVar);
    133154    }
    134155    return pVar;
Note: See TracChangeset for help on using the changeset viewer.