Ignore:
Timestamp:
Jan 30, 2015, 1:27:51 AM (10 years ago)
Author:
bird
Message:

Started on a make expression and string expansion 'compiler'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/expand.c

    r2591 r2765  
    2626#include "variable.h"
    2727#include "rule.h"
     28#ifdef CONFIG_WITH_COMPILER
     29# include "kmk_cc_exec.h"
     30#endif
    2831
    2932/* Initially, any errors reported when expanding strings will be reported
     
    248251  v->expanding = 1;
    249252  if (!v->append)
    250     /* Expand directly into the variable buffer.  */
    251     variable_expand_string_2 (o, v->value, v->value_length, &o);
     253    {
     254      /* Expand directly into the variable buffer.  */
     255# ifdef CONFIG_WITH_COMPILER
     256      v->expand_count++;
     257      if (   v->expandprog
     258          || (v->expand_count == 10 && kmk_cc_compile_variable_for_expand (v)) )
     259        o = kmk_exec_expand_to_var_buf (v, o);
     260      else
     261        variable_expand_string_2 (o, v->value, v->value_length, &o);
     262# else
     263      MAKE_STATS_2 (v->expand_count++);
     264      variable_expand_string_2 (o, v->value, v->value_length, &o);
     265# endif
     266    }
    252267  else
    253268    {
Note: See TracChangeset for help on using the changeset viewer.