MCPcopy Create free account
hub / github.com/boostorg/build / headers

Function headers

src/engine/headers.c:55–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53#define MAXINC 10
54
55void headers( TARGET * t )
56{
57 LIST * hdrscan;
58 LIST * hdrrule;
59 #ifndef OPT_HEADER_CACHE_EXT
60 LIST * headlist = L0;
61 #endif
62 regexp * re[ MAXINC ];
63 int rec = 0;
64 LISTITER iter;
65 LISTITER end;
66
67 hdrscan = var_get( root_module(), constant_HDRSCAN );
68 if ( list_empty( hdrscan ) )
69 return;
70
71 hdrrule = var_get( root_module(), constant_HDRRULE );
72 if ( list_empty( hdrrule ) )
73 return;
74
75 if ( DEBUG_HEADER )
76 out_printf( "header scan %s\n", object_str( t->name ) );
77
78 /* Compile all regular expressions in HDRSCAN */
79 iter = list_begin( hdrscan );
80 end = list_end( hdrscan );
81 for ( ; ( rec < MAXINC ) && iter != end; iter = list_next( iter ) )
82 {
83 re[ rec++ ] = regex_compile( list_item( iter ) );
84 }
85
86 /* Doctor up call to HDRRULE rule */
87 /* Call headers1() to get LIST of included files. */
88 {
89 FRAME frame[ 1 ];
90 frame_init( frame );
91 lol_add( frame->args, list_new( object_copy( t->name ) ) );
92#ifdef OPT_HEADER_CACHE_EXT
93 lol_add( frame->args, hcache( t, rec, re, hdrscan ) );
94#else
95 lol_add( frame->args, headers1( headlist, t->boundname, rec, re ) );
96#endif
97
98 if ( lol_get( frame->args, 1 ) )
99 {
100 OBJECT * rulename = list_front( hdrrule );
101 /* The third argument to HDRRULE is the bound name of $(<). */
102 lol_add( frame->args, list_new( object_copy( t->boundname ) ) );
103 list_free( evaluate_rule( bindrule( rulename, frame->module ), rulename, frame ) );
104 }
105
106 /* Clean up. */
107 frame_free( frame );
108 }
109}
110
111
112/*

Callers 2

make1cFunction · 0.85
make0Function · 0.85

Calls 15

var_getFunction · 0.85
root_moduleFunction · 0.85
out_printfFunction · 0.85
object_strFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
regex_compileFunction · 0.85
frame_initFunction · 0.85
lol_addFunction · 0.85
list_newFunction · 0.85
object_copyFunction · 0.85
hcacheFunction · 0.85

Tested by

no test coverage detected