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

Function headers

v2/engine/headers.c:54–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

make1cFunction · 0.85
make0Function · 0.85

Calls 15

var_getFunction · 0.85
root_moduleFunction · 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
headers1Function · 0.85

Tested by

no test coverage detected