VirtualBox

Changeset 1693 in kBuild


Ignore:
Timestamp:
Aug 31, 2008 7:35:37 PM (17 years ago)
Author:
bird
Message:

includedep: expand variabels when present. Fixes #38.

File:
1 edited

Legend:

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

    r1503 r1693  
    13291329      if (word1eq ("includedep"))
    13301330        {
    1331             /* We have found an `includedep' line specifying a single nested
    1332                makefile to be read at this point. This include variation
    1333                does not globbing and doesn't support multiple names. It's
    1334                trying to save time by being dead simple. */
    1335             char *name = p2;
    1336             char *end = strchr(name, '\0');
    1337             char saved;
    1338 
    1339             while (end > name && isspace ((unsigned char)end[-1]))
    1340               --end;
    1341 
    1342             saved = *end; /* not sure if this is required... */
    1343             *end = '\0';
    1344             eval_include_dep (name, fstart);
    1345             *end = saved;
    1346 
    1347             goto rule_complete;
    1348           }
     1331          /* We have found an `includedep' line specifying a single makefile
     1332             to be read at this point. This include variation does no
     1333             globbing and do not support multiple names. It's trying to save
     1334             time by being dead simple as well as ignoring errors. */
     1335          char *free_me = NULL;
     1336          char *name = p2;
     1337          char *end = strchr (name, '\0');
     1338          char saved;
     1339          if (memchr (name, '$', end - name))
     1340            {
     1341              free_me = name = allocated_variable_expand (name);
     1342              while (isspace ((unsigned char)*name))
     1343                ++name;
     1344              end = strchr (name, '\0');
     1345            }
     1346
     1347          while (end > name && isspace ((unsigned char)end[-1]))
     1348            --end;
     1349
     1350          saved = *end; /* not sure if this is required... */
     1351          *end = '\0';
     1352          eval_include_dep (name, fstart);
     1353          *end = saved;
     1354
     1355          if (free_me)
     1356            free (free_me);
     1357          goto rule_complete;
     1358        }
    13491359#endif /* CONFIG_WITH_INCLUDEDEP */
    13501360
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