summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-12-20 16:16:09 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-12-20 16:16:09 +0100
commit821a1acdb583b2727717a6d3360c49f7a3489d52 (patch)
treece9e3bfe19642df1d8fec2d02241d3dd284d50f2 /tools
parent4a2c039c135aabac55b2d88a5f5548d52d7a3cdf (diff)
downloadffi-efl-master.zip
ffi-efl-master.tar.gz
wip-worktree-stateHEADmaster
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check_loading6
-rwxr-xr-xtools/extract-api.sh58
-rwxr-xr-xtools/genruby.rb25
3 files changed, 42 insertions, 47 deletions
diff --git a/tools/check_loading b/tools/check_loading
index 0d082ed..5cd31dd 100755
--- a/tools/check_loading
+++ b/tools/check_loading
@@ -30,7 +30,7 @@ function each () {
RUBY=/usr/bin/ruby
time each
echo
-RUBY=/opt/ruby1.8/bin/ruby
-time each
-echo
+# RUBY=/opt/ruby1.8/bin/ruby
+# time each
+# echo
#
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
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 4404b89..3cfa2f1 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -7,16 +7,16 @@ WRAP_LEN=150
#
def set_type t, sym
return ETYPES['Eina_Bool'] if t=='Eina_Bool'
+# v = ( ETYPES[sym].nil? ? ( TYPES[sym].nil? ? ':'+sym.downcase : TYPES[sym] ) : ETYPES[sym] )
+ v = ( TYPES[sym].nil? ? ':'+sym.downcase : TYPES[sym] )
if ETYPES[t].nil?
-# v = ( ETYPES[sym].nil? ? ( TYPES[sym].nil? ? ':'+sym.downcase : TYPES[sym] ) : ETYPES[sym] )
- v = ( TYPES[sym].nil? ? ':'+sym.downcase : TYPES[sym] )
ETYPES[t] = v
printf "\033[0;35m%40s\033[0m => \033[0;36m%s\033[0m\n",t,v
- return v
else
printf "\033[0;31mERROR type #{t} => #{sym} already exists!\033[0m\n"
- # exit 1
+ exit 1 if ETYPES[t] != v
end
+ return v
end
#
def get_type t
@@ -128,6 +128,12 @@ def gen_typedefs path, indent
next
end
tsym = set_type t, sym
+ if tsym.nil?
+ puts l
+ puts t
+ puts sym
+ exit 1
+ end
r << indent+"# #{l}"
r << indent+"typedef #{tsym}, :#{t.downcase}"
end
@@ -291,10 +297,12 @@ libs << efl_h('eina'+SO_MAJ,'eina_list.h','EinaList')
libs << efl_h('eina'+SO_MAJ,'eina_hash.h','EinaHash')
libs << efl_h('eina'+SO_MAJ,'eina_file.h','EinaFile')
libs << efl_h('eet'+SO_MAJ,'Eet.h','Eet',nil,nil,["#{NATIVE}/eina_xattr","#{NATIVE}/eina_list"])
+libs << efl_h('evas'+SO_MAJ,'Evas_Loader.h','Evas_Loader',nil,nil)
libs << efl_h('evas'+SO_MAJ,'Evas.h','Evas',nil,nil,["#{NATIVE}/eina_list"],['EVAS_LAYER_MIN','EVAS_LAYER_MAX'])
libs << efl_h('ecore'+SO_MAJ,'Ecore.h','Ecore')
libs << efl_h('ecore_input'+SO_MAJ,'Ecore_Input.h','EcoreInput','ecore_event',nil,["#{NATIVE}/eina_list"])
libs << efl_h('ecore'+SO_MAJ,'Ecore_Getopt.h','EcoreGetopt',nil,nil,["#{NATIVE}/eina_list"])
+libs << efl_h('ecore_evas'+SO_MAJ,'Ecore_Evas_Types.h','EcoreEvasTypes',nil,nil)
libs << efl_h('ecore_evas'+SO_MAJ,'Ecore_Evas.h','EcoreEvas',nil,nil,["#{NATIVE}/ecore_getopt","#{NATIVE}/evas"])
libs << efl_h('eio'+SO_MAJ,'Eio.h','Eio',nil,nil,["#{NATIVE}/eina_file","#{NATIVE}/eet"])
libs << efl_h('embryo'+SO_MAJ,'Embryo.h','Embryo')
@@ -309,21 +317,12 @@ libs << efl_h('efreet'+SO_MAJ,'efreet_ini.h','EfreetIni','efreet_ini')
libs << efl_h('efreet'+SO_MAJ,'efreet_utils.h','EfreetUtils','efreet_utils',nil,["#{NATIVE}/efreet_desktop"])
libs << efl_h('efreet_mime'+SO_MAJ,'Efreet_Mime.h','EfreetMime')
libs << efl_h('efreet_trash'+SO_MAJ,'Efreet_Trash.h','EfreetTrash',nil,nil,["#{NATIVE}/eina_list","#{NATIVE}/efreet_uri"])
-libs << efl_h('edbus'+SO_MAJ,'E_DBus.h','Edbus',nil,'edbus.rb',["#{NATIVE}/eina_list"])
-libs << efl_h('enotify'+SO_MAJ,'E_Notify.h','Enotify','e_notification','enotify.rb',["#{NATIVE}/evas","#{NATIVE}/edbus"])
-libs << efl_h('enotify'+SO_MAJ,'E_Notification_Daemon.h','EnotificationDaemon','e_notification_daemon','enotification_daemon.rb',["#{NATIVE}/enotify"])
-libs << efl_h('ebluez'+SO_MAJ,'E_Bluez.h','Ebluez','e_bluez','ebluez.rb',["#{NATIVE}/edbus"])
-libs << efl_h('eofono'+SO_MAJ,'E_Ofono.h','Eofono','e_ofono','eofono.rb',["#{NATIVE}/edbus"])
-libs << efl_h('eukit'+SO_MAJ,'E_Ukit.h','Eukit','e_ukit','eukit.rb',["#{NATIVE}/edbus"])
-libs << efl_h('ehal'+SO_MAJ,'E_Hal.h','Ehal','e_hal','ehal.rb',["#{NATIVE}/edbus"])
-libs << efl_h('econnman0_7x'+SO_MAJ,'E_Connman.h','EConnman','e_connman','econnman.rb',["#{NATIVE}/edbus"])
libs << efl_h('eeze'+SO_MAJ,'Eeze.h','Eeze',nil,nil,["#{NATIVE}/eina_list"])
libs << efl_h('eeze'+SO_MAJ,'Eeze_Disk.h','EezeDisk')
libs << efl_h('eeze'+SO_MAJ,'Eeze_Net.h','EezeNet',nil,nil,["#{NATIVE}/eina_list"])
libs << efl_h('emotion'+SO_MAJ,'Emotion.h','Emotion',nil,nil,["#{NATIVE}/evas"])
libs << efl_h('ethumb'+SO_MAJ,'Ethumb.h','Ethumb')
libs << efl_h('ethumb_client'+SO_MAJ,'Ethumb_Client.h','EthumbClient',nil,nil,["#{NATIVE}/ethumb"])
-libs << efl_h('ethumb'+SO_MAJ,'Ethumb_Plugin.h','EthumbPlugin',nil,nil,["#{NATIVE}/evas","#{NATIVE}/ecore_evas","#{NATIVE}/ethumb"])
#
ELM_LIB='elementary'+SO_MAJ
#