VirtualBox

Changeset 1975 in kBuild for trunk/src/kmk


Ignore:
Timestamp:
Oct 26, 2008 10:48:35 PM (16 years ago)
Author:
bird
Message:

kmk: cleaning up some CONFIG_WITH_STRCACHE2 mess.

Location:
trunk/src/kmk
Files:
6 edited

Legend:

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

    r1932 r1975  
    831831
    832832
    833 #ifdef CONFIG_WITH_COMMANDS_FUNC
     833#if defined (CONFIG_WITH_VALUE_LENGTH) || defined (CONFIG_WITH_COMMANDS_FUNC)
    834834/* Expand LINE for FILE.  Error messages refer to the file and line where
    835835   FILE's commands were found.  Expansion uses FILE's variable set list.
     
    875875
    876876
    877 #endif /* CONFIG_WITH_COMMANDS_FUNC */
     877#endif /* CONFIG_WITH_VALUE_LENGTH || CONFIG_WITH_COMMANDS_FUNC */
    878878/* Like allocated_variable_expand, but for += target-specific variables.
    879879   First recursively construct the variable value from its appended parts in
  • trunk/src/kmk/file.c

    r1959 r1975  
    8383*/
    8484
    85 #ifndef KMK
     85#ifndef CONFIG_WITH_STRCACHE2
    8686struct file *
    8787lookup_file (const char *name)
    88 #else  /* KMK */
     88#else  /* CONFIG_WITH_STRCACHE2 */
    8989MY_INLINE struct file *
    9090lookup_file_common (const char *name, int cached)
    91 #endif /* KMK */
     91#endif /* CONFIG_WITH_STRCACHE2 */
    9292{
    9393  struct file *f;
     
    164164}
    165165
    166 #ifdef KMK
     166#ifdef CONFIG_WITH_STRCACHE2
    167167/* Given a name, return the struct file * for that name,
    168168  or nil if there is none. */
     
    182182  return lookup_file_common (name, 1 /* cached */);
    183183}
    184 #endif /* KMK */
     184#endif /* CONFIG_WITH_STRCACHE2 */
    185185
    186186
     
    582582      struct dep *new, *d1;
    583583      char *p;
    584 #ifdef CONFIG_WITH_VALUE_LENGTH
     584#ifdef CONFIG_WITH_STRCACHE2
    585585      unsigned int len;
    586586#endif
     
    669669          set_file_variables (f);
    670670
    671 #ifndef CONFIG_WITH_STRCACHE2
     671#if !defined (CONFIG_WITH_VALUE_LENGTH) || !defined (CONFIG_WITH_STRCACHE2)
    672672          p = variable_expand_for_file (d->name, f);
    673673#else
  • trunk/src/kmk/filedef.h

    r1934 r1975  
    126126
    127127struct file *lookup_file (const char *name);
    128 #ifdef KMK
     128#ifdef CONFIG_WITH_STRCACHE2
    129129struct file *lookup_file_cached (const char *name);
    130130#endif
  • trunk/src/kmk/make.h

    r1971 r1975  
    165165#endif
    166166
    167 #if defined (KMK) || defined (CONFIG_WITH_VALUE_LENGTH)
     167#if defined (KMK) || defined (CONFIG_WITH_VALUE_LENGTH) \
     168 || defined (CONFIG_WITH_STRCACHE2)
    168169# ifdef _MSC_VER
    169170#  define MY_DBGBREAK   __debugbreak()
  • trunk/src/kmk/read.c

    r1947 r1975  
    445445  deps->next = read_makefiles;
    446446  read_makefiles = deps;
    447 #ifndef KMK
     447#ifndef CONFIG_WITH_STRCACHE2
    448448  deps->file = lookup_file (filename);
    449449#else
     
    24072407             new entry if the file is a double-colon, which we don't want in
    24082408             this situation.  */
    2409 #ifndef KMK
     2409#ifndef CONFIG_WITH_STRCACHE2
    24102410          f = lookup_file (name);
    24112411          if (!f)
    24122412            f = enter_file (strcache_add (name));
    2413 #else  /* KMK */
     2413#else  /* CONFIG_WITH_STRCACHE2 */
    24142414           /* XXX: this is probably already a cached string. */
    24152415          fname = strcache_add (name);
     
    24172417          if (!f)
    24182418            f = enter_file (fname);
    2419 #endif
     2419#endif /* CONFIG_WITH_STRCACHE2 */
    24202420          else if (f->double_colon)
    24212421            f = f->double_colon;
     
    27802780        {
    27812781          /* Double-colon.  Make a new record even if there already is one.  */
    2782 #ifndef KMK
     2782#ifndef CONFIG_WITH_STRCACHE2
    27832783          f = lookup_file (name);
    2784 #else  /* KMK - the name is already in the cache, don't waste time.  */
     2784#else  /* CONFIG_WITH_STRCACHE2 - the name is already in the cache, don't waste time.  */
    27852785          f = lookup_file_cached (name);
    2786 #endif
     2786#endif /* CONFIG_WITH_STRCACHE2 */
    27872787
    27882788          /* Check for both : and :: rules.  Check is_target so
  • trunk/src/kmk/variable.h

    r1946 r1975  
    184184char *variable_expand (const char *line);
    185185char *variable_expand_for_file (const char *line, struct file *file);
    186 #ifdef CONFIG_WITH_COMMANDS_FUNC
     186#if defined (CONFIG_WITH_VALUE_LENGTH) || defined (CONFIG_WITH_COMMANDS_FUNC)
    187187char *variable_expand_for_file_2 (char *o, const char *line, unsigned int lenght,
    188188                                  struct file *file, unsigned int *value_lenp);
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