2008-01-16 08:06:59 +01:00
|
|
|
#!/bin/sh
|
2008-01-25 11:49:14 +01:00
|
|
|
top_srcdir="${1-.}"
|
2008-06-08 09:35:41 +02:00
|
|
|
echo "/* This file is autogenerated by" `basename $0` "*/"
|
2008-01-16 08:06:59 +01:00
|
|
|
echo
|
|
|
|
echo "const name_func_link_t WidgetList[] ="
|
|
|
|
echo "{"
|
2008-01-25 11:49:14 +01:00
|
|
|
for file in ${top_srcdir}/widget.h
|
2008-01-16 08:06:59 +01:00
|
|
|
do
|
|
|
|
echo " /* $file */"
|
2008-01-25 11:49:14 +01:00
|
|
|
grep '^WidgetConstructor ' "$file" | cut -d' ' -f2 | cut -d\; -f1 | while read widget
|
2008-01-16 08:06:59 +01:00
|
|
|
do
|
2008-06-08 09:35:41 +02:00
|
|
|
shortname=`echo $widget | cut -d_ -f1`
|
2008-01-16 08:06:59 +01:00
|
|
|
echo " {\"$shortname\", $widget},"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
echo " {NULL, NULL}"
|
|
|
|
echo "};"
|