8 # The first argument is the output filename.
15 # The second argument is the directory in which the source files live.
21 # All subsequent arguments are the files to scan.
24 echo '/* Do not modify this file. */' >${outfile}-tmp
25 echo '/* It is created automatically by the Makefile. */' >>${outfile}-tmp
26 echo '#include "register.h"' >>${outfile}-tmp
29 # Build code to call all the tap listener registration routines.
31 echo 'void register_all_tap_listeners(void){' >>${outfile}-tmp
32 echo '' >>${outfile}-tmp
41 grep '^register_tap_listener_[a-z_0-9A-Z]* *(' $srcfile 2>/dev
/null |
grep -v ';' |
sed -e 's/(.*//'
42 done |
while read func
; do
43 echo " { extern void $func(void);" >>${outfile}-tmp
44 echo " $func();}" >>${outfile}-tmp
46 echo '}' >>${outfile}-tmp
47 echo '' >>${outfile}-tmp
49 mv ${outfile}-tmp ${outfile}