1 # Based on apr's make_export.awk, which is
2 # based on Ryan Bloom's make_export.pl
4 /^
#[ \t]*if(def)? (AP[RUI]?_|!?defined).*/ {
5 if (old_filename
!= FILENAME) {
6 if (old_filename
!= "") printf("%s", line
)
10 old_filename =
FILENAME
13 macro_stack
[macro_no
++] = macro
14 macro =
substr($
0, length($
1)+2)
16 line = line
"#ifdef " macro
"\n"
23 line = line
"#endif /* " macro
" */\n"
24 macro = macro_stack
[--macro_no
]
35 function add_symbol
(sym_name
) {
39 for (i =
0; i
< count
; i
++) {
42 line = line sym_name
"\n"
50 /^
[ \t]*(extern
[ \t]+)?AP
[RUI
]?_DECLARE_DATA .
*;$
/ {
52 gsub( /[*;]/, "", varname
);
53 gsub( /\
[.
*\
]/, "", varname
);