4 # The first argument is the output filename.
11 # The second argument is the directory in which the source files live.
17 # All subsequent arguments are the files to scan.
20 echo '/* Do not modify this file. */' >${outfile}-tmp
21 echo '/* It is created automatically by the Makefile. */'>>${outfile}-tmp
24 # Build code to call all the tap listener registration routines.
26 echo 'void register_all_tap_listeners(void) {' >>${outfile}-tmp
35 grep '^register_tap_listener_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' | sed -e 's/(.*//'
36 done | while read func; do
37 echo " { extern void $func (void);" >>${outfile}-tmp
38 echo " $func ();}" >>${outfile}-tmp
40 echo '}' >>${outfile}-tmp
43 # Build code to call all the tap listener menu item registration routines.
45 echo 'void register_all_tap_menus(void) {' >>${outfile}-tmp
54 grep '^register_tap_menu_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' | sed -e 's/(.*//'
55 done | while read func; do
56 echo " { extern void $func (void);" >>${outfile}-tmp
57 echo " $func ();}" >>${outfile}-tmp
59 echo '}' >>${outfile}-tmp
61 mv ${outfile}-tmp ${outfile}