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

Function headers

src/engine/headers.cpp:58–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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