summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-04-29 16:10:14 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-04-29 16:10:14 +0200
commit19b9118fccb1766fa55fd920853c7e2767816969 (patch)
tree44a7516b3e1f1f2155dc05f18d5667a7e2c9b561 /tools
parent0a14d053cb6aba117243b5fbdb3af1c8b84ed2d4 (diff)
parent2dee77f043a66caefe9ee33b351a7dfe4a1cef13 (diff)
downloadffi-efl-19b9118fccb1766fa55fd920853c7e2767816969.zip
ffi-efl-19b9118fccb1766fa55fd920853c7e2767816969.tar.gz
Merge branch 'master' of github.com:jeremyz/ffi-efl
Diffstat (limited to 'tools')
-rwxr-xr-xtools/extract-api.sh5
-rwxr-xr-xtools/genruby.rb6
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 29844aa..254a693 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -37,6 +37,11 @@ for header in \
"${INCLUDE}/elementary-0/Elementary.h" \
; do
#
+ if [ ! -e "$header" ]; then
+ echo "$header not found, we won't generate bindings for this header."
+ continue
+ fi
+ #
DIR=$(dirname $header)
FILE=$(basename $header)
#
diff --git a/tools/genruby.rb b/tools/genruby.rb
index fafa6a9..4177447 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -157,7 +157,7 @@ def gen_enums path, indent
r = []
open(path+'-enums','r').readlines.each do |l|
l.strip!
- if not l=~/(typedef enum(?: \w+)?) {([A-Z0-9_ (\s*=\s*-?[\d+]),]+)} (\w+);/
+ if not l=~/(typedef enum(?: \w+)?) \{([-A-Z0-9_=, ]+)\} (\w+);/
r << indent+"# #{l}\n#{indent}# FIXME"
next
end
@@ -239,12 +239,12 @@ def gen_functions path, indent
r
end
#
-Dir.mkdir lib_path unless Dir.exists? lib_path
+Dir.mkdir lib_path unless (File.exists? lib_path)
#
libraries.collect do |header,module_name,fct_prefix,lib, output|
base = File.join path, 'api', header
output = File.join lib_path, output
- Dir.mkdir File.dirname output unless Dir.exists? File.dirname output
+ Dir.mkdir File.dirname(output) unless File.exists? File.dirname(output)
printf "%-60s", "parse #{base}-*"
r = [lib, output, module_name, fct_prefix ]
print "enums, "