[gtkmm] tools: Add XML and defs generation scripts.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] tools: Add XML and defs generation scripts.
- Date: Thu, 1 Mar 2012 21:55:18 +0000 (UTC)
commit 0a08c228741f1ad490c3745641fcff6433cec3f5
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Thu Mar 1 12:05:19 2012 -0500
tools: Add XML and defs generation scripts.
* tools/gen_scripts/gdk_generate_docs.sh:
* tools/gen_scripts/gdk_generate_enums.sh:
* tools/gen_scripts/gdk_generate_methods.sh:
* tools/gen_scripts/gtk_generate_docs.sh:
* tools/gen_scripts/gtk_generate_enums.sh:
* tools/gen_scripts/gtk_generate_extra_defs.sh:
* tools/gen_scripts/gtk_generate_methods.sh: Add these scripts as in
glibmm to make the docs and defs file generation easier.
ChangeLog | 13 +++++++++++++
tools/gen_scripts/gdk_generate_docs.sh | 22 ++++++++++++++++++++++
tools/gen_scripts/gdk_generate_enums.sh | 18 ++++++++++++++++++
tools/gen_scripts/gdk_generate_methods.sh | 18 ++++++++++++++++++
tools/gen_scripts/gtk_generate_docs.sh | 22 ++++++++++++++++++++++
tools/gen_scripts/gtk_generate_enums.sh | 18 ++++++++++++++++++
tools/gen_scripts/gtk_generate_extra_defs.sh | 13 +++++++++++++
tools/gen_scripts/gtk_generate_methods.sh | 18 ++++++++++++++++++
8 files changed, 142 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index db80b1e..4ceb325 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-02-29 Josà Alburquerque <jaalburquerque gmail com>
+
+ tools: Add XML and defs generation scripts.
+
+ * tools/gen_scripts/gdk_generate_docs.sh:
+ * tools/gen_scripts/gdk_generate_enums.sh:
+ * tools/gen_scripts/gdk_generate_methods.sh:
+ * tools/gen_scripts/gtk_generate_docs.sh:
+ * tools/gen_scripts/gtk_generate_enums.sh:
+ * tools/gen_scripts/gtk_generate_extra_defs.sh:
+ * tools/gen_scripts/gtk_generate_methods.sh: Add these scripts as in
+ glibmm to make the docs and defs file generation easier.
+
2012-02-29 Murray Cumming <murrayc murrayc com>
Add ApplicationWindow.
diff --git a/tools/gen_scripts/gdk_generate_docs.sh b/tools/gen_scripts/gdk_generate_docs.sh
new file mode 100755
index 0000000..71b127f
--- /dev/null
+++ b/tools/gen_scripts/gdk_generate_docs.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Note that docextract_to_xml.py should be in PATH for this script to work and
+# JHBUILD_SOURCES should be defined to contain the path to the root of the
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the XML file will be placed in gdk/src.
+
+if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then
+ echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \
+docextract_to_xml.py\nneeds to be executable and in PATH."
+ exit 1;
+fi
+
+PREFIX="$JHBUILD_SOURCES"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gdk/src"
+
+for dir in "$PREFIX"/gtk+/gdk; do
+ PARAMS="$PARAMS -s $dir"
+done
+
+docextract_to_xml.py $PARAMS > "$OUT_DIR"/gdk_docs.xml
diff --git a/tools/gen_scripts/gdk_generate_enums.sh b/tools/gen_scripts/gdk_generate_enums.sh
new file mode 100755
index 0000000..281f40a
--- /dev/null
+++ b/tools/gen_scripts/gdk_generate_enums.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Note that enum.pl should be in PATH for this script to work and
+# JHBUILD_SOURCES should be defined to contain the path to the root of the
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in gdk/src.
+
+if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then
+ echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
+enum.pl\nneeds to be executable and in PATH."
+ exit 1;
+fi
+
+PREFIX="$JHBUILD_SOURCES/gtk+"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gdk/src"
+
+enum.pl "$PREFIX"/gdk/*.h > "$OUT_DIR"/gdk_enums.defs
diff --git a/tools/gen_scripts/gdk_generate_methods.sh b/tools/gen_scripts/gdk_generate_methods.sh
new file mode 100755
index 0000000..492da79
--- /dev/null
+++ b/tools/gen_scripts/gdk_generate_methods.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Note that h2def.py should be in PATH for this script to work and
+# JHBUILD_SOURCES should be defined to contain the path to the root of the
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in gdk/src.
+
+if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then
+ echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
+h2def.py\nneeds to be executable and in PATH."
+ exit 1;
+fi
+
+PREFIX="$JHBUILD_SOURCES/gtk+"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gdk/src"
+
+h2def.py "$PREFIX"/gdk/*.h > "$OUT_DIR"/gdk_methods.defs
diff --git a/tools/gen_scripts/gtk_generate_docs.sh b/tools/gen_scripts/gtk_generate_docs.sh
new file mode 100755
index 0000000..0f556e6
--- /dev/null
+++ b/tools/gen_scripts/gtk_generate_docs.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Note that docextract_to_xml.py should be in PATH for this script to work and
+# JHBUILD_SOURCES should be defined to contain the path to the root of the
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the XML file will be placed in gtk/src.
+
+if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then
+ echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \
+docextract_to_xml.py\nneeds to be executable and in PATH."
+ exit 1;
+fi
+
+PREFIX="$JHBUILD_SOURCES"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gtk/src"
+
+for dir in "$PREFIX"/gtk+/gtk; do
+ PARAMS="$PARAMS -s $dir"
+done
+
+docextract_to_xml.py $PARAMS > "$OUT_DIR/gtk_docs.xml"
diff --git a/tools/gen_scripts/gtk_generate_enums.sh b/tools/gen_scripts/gtk_generate_enums.sh
new file mode 100755
index 0000000..f8f2f3c
--- /dev/null
+++ b/tools/gen_scripts/gtk_generate_enums.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Note that enum.pl should be in PATH for this script to work and
+# JHBUILD_SOURCES should be defined to contain the path to the root of the
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in gtk/src.
+
+if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then
+ echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
+enum.pl\nneeds to be executable and in PATH."
+ exit 1;
+fi
+
+PREFIX="$JHBUILD_SOURCES/gtk+"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gtk/src"
+
+enum.pl "$PREFIX"/gtk/*.h "$PREFIX"/gtk/deprecated/*.h > "$OUT_DIR"/gtk_enums.defs
diff --git a/tools/gen_scripts/gtk_generate_extra_defs.sh b/tools/gen_scripts/gtk_generate_extra_defs.sh
new file mode 100755
index 0000000..394ba00
--- /dev/null
+++ b/tools/gen_scripts/gtk_generate_extra_defs.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Note that JHBUILD_SOURCES should be defined to contain the path to the root
+# of the jhbuild sources. The script assumes that it resides in the
+# tools/gen_scripts directory and the defs files will be placed in gtk/src.
+
+ROOT_DIR="$(dirname "$0")/../.."
+GEN_DIR="$ROOT_DIR/tools/extra_defs_gen"
+OUT_DIR="$ROOT_DIR/gtk/src"
+
+"$GEN_DIR"/../extra_defs_gen/generate_extra_defs > "$OUT_DIR"/gtk_signals.defs
+patch $OUT_DIR/gtk_signals.defs $OUT_DIR/gtk_signals.defs.patch
+
diff --git a/tools/gen_scripts/gtk_generate_methods.sh b/tools/gen_scripts/gtk_generate_methods.sh
new file mode 100755
index 0000000..c5b007f
--- /dev/null
+++ b/tools/gen_scripts/gtk_generate_methods.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Note that h2def.py should be in PATH for this script to work and
+# JHBUILD_SOURCES should be defined to contain the path to the root of the
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in gtk/src.
+
+if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then
+ echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
+h2def.py\nneeds to be executable and in PATH."
+ exit 1;
+fi
+
+PREFIX="$JHBUILD_SOURCES/gtk+"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gtk/src"
+
+h2def.py "$PREFIX"/gtk/*.h "$PREFIX"/gtk/deprecated/*.h > "$OUT_DIR"/gtk_methods.defs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]