[gnome-builder] libidemm: add gen scripts



commit d69f86328114c01ab4f2c140ed42bf85df5630c5
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Sat Apr 2 12:35:58 2016 +0200

    libidemm: add gen scripts

 libidemm/tools/gen_scripts/generate_docs.sh       |   18 ++++++++++++++++++
 libidemm/tools/gen_scripts/generate_enums.sh      |   16 ++++++++++++++++
 libidemm/tools/gen_scripts/generate_extra_defs.sh |   11 +++++++++++
 libidemm/tools/gen_scripts/generate_methods.sh    |   18 ++++++++++++++++++
 4 files changed, 63 insertions(+), 0 deletions(-)
---
diff --git a/libidemm/tools/gen_scripts/generate_docs.sh b/libidemm/tools/gen_scripts/generate_docs.sh
new file mode 100755
index 0000000..76cdcfe
--- /dev/null
+++ b/libidemm/tools/gen_scripts/generate_docs.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Note that JHBUILD_SOURCES should be defined to contain the path to the root
+# of the jhbuild sources.  Also this script assumes that it resides in the
+# tools/gen_scripts directory and the XML file will be placed in
+# libidemm/src.
+
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain path to jhbuild sources."
+  exit 1;
+fi
+
+OUT_DIR="$(dirname "$0")/../../src"
+
+PARAMS="-s $JHBUILD_SOURCES/gnome-builder/libide/"
+
+DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py"
+$DOCEXTRACT_TO_XML_PY --no-since $PARAMS > "$OUT_DIR/libide_docs.xml"
diff --git a/libidemm/tools/gen_scripts/generate_enums.sh b/libidemm/tools/gen_scripts/generate_enums.sh
new file mode 100755
index 0000000..5695962
--- /dev/null
+++ b/libidemm/tools/gen_scripts/generate_enums.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Note that JHBUILD_SOURCES should be defined to contain the path to the root
+# of the jhbuild sources.  Also this script assumes that it resides in the
+# tools/gen_scripts directory and the defs file will be placed in
+# libidemm/src.
+
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
+  exit 1;
+fi
+
+OUT_DIR="$(dirname "$0")/../../src"
+
+ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl"
+$ENUM_PL "$JHBUILD_SOURCES"/gnome-builder/libide/*.h "$OUT_DIR/libide_enums.defs"
diff --git a/libidemm/tools/gen_scripts/generate_extra_defs.sh 
b/libidemm/tools/gen_scripts/generate_extra_defs.sh
new file mode 100755
index 0000000..d62956c
--- /dev/null
+++ b/libidemm/tools/gen_scripts/generate_extra_defs.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Note that script assumes it resides in the tools/gen_scripts directory and
+# the defs file will be placed in libidemm/src.
+
+ROOT_DIR="$(dirname "$0")/../.."
+GEN_DIR="$ROOT_DIR/tools/extra_defs_gen"
+OUT_DIR="$ROOT_DIR/src"
+
+"$GEN_DIR"/generate_defs_libide > "$OUT_DIR"/libide_signals.defs
+
diff --git a/libidemm/tools/gen_scripts/generate_methods.sh b/libidemm/tools/gen_scripts/generate_methods.sh
new file mode 100755
index 0000000..ed7769f
--- /dev/null
+++ b/libidemm/tools/gen_scripts/generate_methods.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Note that JHBUILD_SOURCES should be defined to contain the path to the root
+# of the jhbuild sources.  Also this script assumes that it resides in the
+# tools/gen_script directory and the defs file will be placed in
+# libidemm/src.
+
+if [ -z "$JHBUILD_SOURCES" -a ! -x "`which h2def.py`" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
+  exit 1;
+fi
+
+OUT_DIR="$(dirname "$0")/../../src"
+
+H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
+
+$H2DEF_PY "$JHBUILD_SOURCES/gnome-builder"/libide/*.h > "$OUT_DIR/libide_methods.defs"
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]