| 80 | */ |
| 81 | |
| 82 | static const char * cache_name( void ) |
| 83 | { |
| 84 | static OBJECT * name = 0; |
| 85 | if ( !name ) |
| 86 | { |
| 87 | LIST * const hcachevar = var_get( root_module(), constant_HCACHEFILE ); |
| 88 | |
| 89 | if ( !list_empty( hcachevar ) ) |
| 90 | { |
| 91 | TARGET * const t = bindtarget( list_front( hcachevar ) ); |
| 92 | |
| 93 | pushsettings( root_module(), t->settings ); |
| 94 | /* Do not expect the cache file to be generated, so pass 0 as the |
| 95 | * third argument to search. Expect the location to be specified via |
| 96 | * LOCATE, so pass 0 as the fourth argument. |
| 97 | */ |
| 98 | object_free( t->boundname ); |
| 99 | t->boundname = search( t->name, &t->time, 0, 0 ); |
| 100 | popsettings( root_module(), t->settings ); |
| 101 | |
| 102 | name = object_copy( t->boundname ); |
| 103 | } |
| 104 | } |
| 105 | return name ? object_str( name ) : 0; |
| 106 | } |
| 107 | |
| 108 | |
| 109 | /* |
no test coverage detected