diff options
Diffstat (limited to 'tools/extract-api.sh')
-rwxr-xr-x | tools/extract-api.sh | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/tools/extract-api.sh b/tools/extract-api.sh index c6033c9..e7dbdf7 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -23,6 +23,8 @@ else echo "new api will be stored in $NEXT" fi # +rm $NEXT/* +# ELM_INCLUDE_DIR=$(find ${INCLUDE} -name elementary-* | sort | tail -n1) # for header in \ @@ -35,14 +37,15 @@ for header in \ "${INCLUDE}/eina-1/eina/eina_file.h" \ "${INCLUDE}/eet-1/Eet.h" \ "${INCLUDE}/evas-1/Evas.h" \ + "${INCLUDE}/evas-1/Evas_Loader.h" \ "${INCLUDE}/evas-1/Evas_GL.h" \ "${INCLUDE}/ecore-1/Ecore.h" \ - "${INCLUDE}/ecore-1/Ecore_Con.h" \ - "${INCLUDE}/ecore-1/Ecore_Input.h" \ + "${INCLUDE}/ecore-con-1/Ecore_Con.h" \ + "${INCLUDE}/ecore-input-1/Ecore_Input.h" \ "${INCLUDE}/ecore-1/Ecore_Getopt.h" \ - "${INCLUDE}/ecore-1/Ecore_Evas.h" \ - "${INCLUDE}/ecore-1/Ecore_Fb.h" \ - "${INCLUDE}/ecore-1/Ecore_File.h" \ + "${INCLUDE}/ecore-evas-1/Ecore_Evas_Types.h" \ + "${INCLUDE}/ecore-evas-1/Ecore_Evas.h" \ + "${INCLUDE}/ecore-file-1/Ecore_File.h" \ "${INCLUDE}/eio-1/Eio.h" \ "${INCLUDE}/embryo-1/Embryo.h" \ "${INCLUDE}/edje-1/Edje.h" \ @@ -56,21 +59,12 @@ for header in \ "${INCLUDE}/efreet-1/efreet_utils.h" \ "${INCLUDE}/efreet-1/Efreet_Mime.h" \ "${INCLUDE}/efreet-1/Efreet_Trash.h" \ - "${INCLUDE}/e_dbus-1/E_DBus.h" \ - "${INCLUDE}/e_dbus-1/E_Notify.h" \ - "${INCLUDE}/e_dbus-1/E_Notification_Daemon.h" \ - "${INCLUDE}/e_dbus-1/E_Bluez.h" \ - "${INCLUDE}/e_dbus-1/E_Hal.h" \ - "${INCLUDE}/e_dbus-1/E_Ofono.h" \ - "${INCLUDE}/e_dbus-1/E_Ukit.h" \ - "${INCLUDE}/e_dbus-1/connman0_7x/E_Connman.h" \ "${INCLUDE}/eeze-1/Eeze.h" \ "${INCLUDE}/eeze-1/Eeze_Disk.h" \ "${INCLUDE}/eeze-1/Eeze_Net.h" \ "${INCLUDE}/emotion-1/Emotion.h" \ "${INCLUDE}/ethumb-1/Ethumb.h" \ - "${INCLUDE}/ethumb-1/Ethumb_Client.h" \ - "${INCLUDE}/ethumb-1/Ethumb_Plugin.h" \ + "${INCLUDE}/ethumb-client-1/Ethumb_Client.h" \ "${ELM_INCLUDE_DIR}/Elementary.h" \ "${ELM_INCLUDE_DIR}/elm_general.h" \ "${ELM_INCLUDE_DIR}/elm_tooltip.h" \ @@ -158,28 +152,30 @@ for header in \ "${ELM_INCLUDE_DIR}/elm_win.h" \ ; do # + DIR=$(dirname $header) + FILE=$(basename $header) + BASE=${header%.h} + # if [ ! -e "$header" ]; then echo "$header not found, we won't generate bindings for this header." continue - else - echo "extracting API from $header" fi # - DIR=$(dirname $header) - FILE=$(basename $header) - BASE=${header%.h} - # - for what in functions enums types callbacks variables; do - F=$FILE-$what - sed -r -n -f "$P/sed-$what" $header > $NEXT/$F - for more_header in "${BASE}_common.h" "${BASE}_legacy.h"; do - [ -e $more_header ] && sed -r -n -f "$P/sed-$what" $more_header >> $NEXT/$F + echo "extracting API from $header" + for header in "$header" "${BASE}_common.h" "${BASE}_legacy.h" "${BASE}_Common.h" "${BASE}_Legacy.h"; do + [ -f "$header" ] || continue + echo "extracting API from $header" + for what in functions enums types callbacks variables; do + prev="$NEXT/$FILE-$what" + next="$NEXT/$FILE-$what" + difff="$P/$FILE-$what-diff" + sed -r -n -f "$P/sed-$what" $header >> $next + if [ -f "$prev" ]; then + diff -u0 "$prev" "$next" > $difff + N=$(cat $difff | wc -l) + [ $N -eq 0 ] && rm $difff || echo "see $difff" + fi done - if [ -f $PREV/$F ]; then - diff -u0 $PREV/$F $NEXT/$F > $P/$F-diff - N=$(cat $P/$F-diff | wc -l) - [ $N -eq 0 ] && rm $P/$F-diff || echo "see $P/$F-diff" - fi done # done |