[glibmm] Generation Scripts: Don't assume the root directory is glibmm.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Generation Scripts: Don't assume the root directory is glibmm.
- Date: Thu, 1 Mar 2012 21:54:54 +0000 (UTC)
commit e4ee6d194bdf77d90fc8ad50b9c8e632115b427f
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Thu Mar 1 12:02:33 2012 -0500
Generation Scripts: Don't assume the root directory is glibmm.
* tools/gen_scripts/gio_generate_docs.sh:
* tools/gen_scripts/gio_generate_enums.sh:
* tools/gen_scripts/gio_generate_extra_defs.sh:
* tools/gen_scripts/gio_generate_methods.sh:
* tools/gen_scripts/glib_generate_docs.sh:
* tools/gen_scripts/glib_generate_enums.sh:
* tools/gen_scripts/glib_generate_extra_defs.sh:
* tools/gen_scripts/glib_generate_methods.sh: Modify them so that they
assume that they reside in the tools/gen_scripts directory and find
the root of glibmm based on that instead of assuming that the name of
the root directory is glibmm.
* gio/src/gio_enums.defs.patch: Add this patch file to streamline the
enum generation so that keeping the custom Gio::HOST_WAS_NOT_FOUND
enum value is easier.
ChangeLog | 20 ++++++++++++++++++++
tools/gen_scripts/gio_generate_docs.sh | 7 ++++---
tools/gen_scripts/gio_generate_enums.sh | 8 +++++---
tools/gen_scripts/gio_generate_extra_defs.sh | 9 +++++----
tools/gen_scripts/gio_generate_methods.sh | 7 ++++---
tools/gen_scripts/glib_generate_docs.sh | 7 ++++---
tools/gen_scripts/glib_generate_enums.sh | 7 ++++---
tools/gen_scripts/glib_generate_extra_defs.sh | 9 +++++----
tools/gen_scripts/glib_generate_methods.sh | 7 ++++---
9 files changed, 55 insertions(+), 26 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d3d96bd..4cf1742 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2012-02-29 Josà Alburquerque <jaalburquerque gmail com>
+
+ Generation Scripts: Don't assume the root directory is glibmm.
+
+ * tools/gen_scripts/gio_generate_docs.sh:
+ * tools/gen_scripts/gio_generate_enums.sh:
+ * tools/gen_scripts/gio_generate_extra_defs.sh:
+ * tools/gen_scripts/gio_generate_methods.sh:
+ * tools/gen_scripts/glib_generate_docs.sh:
+ * tools/gen_scripts/glib_generate_enums.sh:
+ * tools/gen_scripts/glib_generate_extra_defs.sh:
+ * tools/gen_scripts/glib_generate_methods.sh: Modify them so that they
+ assume that they reside in the tools/gen_scripts directory and find
+ the root of glibmm based on that instead of assuming that the name of
+ the root directory is glibmm.
+
+ * gio/src/gio_enums.defs.patch: Add this patch file to streamline the
+ enum generation so that keeping the custom Gio::HOST_WAS_NOT_FOUND
+ enum value is easier.
+
2012-02-29 Murray Cumming <murrayc murrayc com>
Add back our custom Gio::HOST_WAS_NOT_FOUND enum value.
diff --git a/tools/gen_scripts/gio_generate_docs.sh b/tools/gen_scripts/gio_generate_docs.sh
index 831c8cd..190163a 100755
--- a/tools/gen_scripts/gio_generate_docs.sh
+++ b/tools/gen_scripts/gio_generate_docs.sh
@@ -2,8 +2,8 @@
# 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 XML file will be placed in
-# $JHBUILD_SOURCES/glibmm/gio/src.
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the XML file will be placed in gio/src.
if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then
echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \
@@ -12,7 +12,8 @@ docextract_to_xml.py\nneeds to be executable and in PATH."
fi
PREFIX="$JHBUILD_SOURCES"
-OUT_DIR="$JHBUILD_SOURCES/glibmm/gio/src"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gio/src"
for dir in "$PREFIX"/glib/gio; do
PARAMS="$PARAMS -s $dir"
diff --git a/tools/gen_scripts/gio_generate_enums.sh b/tools/gen_scripts/gio_generate_enums.sh
index c708046..d8c6f6d 100755
--- a/tools/gen_scripts/gio_generate_enums.sh
+++ b/tools/gen_scripts/gio_generate_enums.sh
@@ -2,8 +2,8 @@
# 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 defs files will be placed in
-# $JHBUILD_SOURCES/glibmm/gio/src.
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in gio/src.
if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then
echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
@@ -11,7 +11,9 @@ enum.pl\nneeds to be executable and in PATH."
exit 1;
fi
-OUT_DIR="$JHBUILD_SOURCES/glibmm/gio/src"
PREFIX="$JHBUILD_SOURCES/glib"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gio/src"
enum.pl "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_enums.defs
+patch "$OUT_DIR"/gio_enums.defs "$OUT_DIR"/gio_enums.defs.patch
diff --git a/tools/gen_scripts/gio_generate_extra_defs.sh b/tools/gen_scripts/gio_generate_extra_defs.sh
index 778cf4a..b57683b 100755
--- a/tools/gen_scripts/gio_generate_extra_defs.sh
+++ b/tools/gen_scripts/gio_generate_extra_defs.sh
@@ -1,11 +1,12 @@
#!/bin/bash
# Note that JHBUILD_SOURCES should be defined to contain the path to the root
-# of the jhbuild sources. The defs files will be placed in
-# $JHBUILD_SOURCES/glibmm/gio/src.
+# of the jhbuild sources. The script assumes that it resides in the
+# tools/gen_scripts directory and the defs files will be placed in gio/src.
-GEN_DIR="$JHBUILD_SOURCES/glibmm/tools/extra_defs_gen"
-OUT_DIR="$JHBUILD_SOURCES/glibmm/gio/src"
+ROOT_DIR="$(dirname "$0")/../.."
+GEN_DIR="$ROOT_DIR/tools/extra_defs_gen"
+OUT_DIR="$ROOT_DIR/gio/src"
"$GEN_DIR"/generate_defs_gio > "$OUT_DIR"/gio_signals.defs
patch "$OUT_DIR"/gio_signals.defs "$OUT_DIR"/gio_signals.defs.patch
diff --git a/tools/gen_scripts/gio_generate_methods.sh b/tools/gen_scripts/gio_generate_methods.sh
index 230d717..29add54 100755
--- a/tools/gen_scripts/gio_generate_methods.sh
+++ b/tools/gen_scripts/gio_generate_methods.sh
@@ -2,8 +2,8 @@
# 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 defs files will be placed in
-# $JHBUILD_SOURCES/glibmm/gio/src.
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in gio/src.
if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then
echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
@@ -12,7 +12,8 @@ h2def.py\nneeds to be executable and in PATH."
fi
PREFIX="$JHBUILD_SOURCES/glib"
-OUT_DIR="$JHBUILD_SOURCES/glibmm/gio/src"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/gio/src"
h2def.py "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_methods.defs
#patch "$OUT_DIR"/gio_methods.defs "$OUT_DIR"/gio_methods.defs.patch
diff --git a/tools/gen_scripts/glib_generate_docs.sh b/tools/gen_scripts/glib_generate_docs.sh
index 7b14695..3f23190 100755
--- a/tools/gen_scripts/glib_generate_docs.sh
+++ b/tools/gen_scripts/glib_generate_docs.sh
@@ -2,8 +2,8 @@
# 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 XML file will be placed in
-# $JHBUILD_SOURCES/glibmm/glib/src.
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the XML file will be placed in glib/src.
if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then
echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \
@@ -12,7 +12,8 @@ docextract_to_xml.py\nneeds to be executable and in PATH."
fi
PREFIX="$JHBUILD_SOURCES"
-OUT_DIR="$JHBUILD_SOURCES/glibmm/glib/src"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/glib/src"
for dir in "$PREFIX"/glib/{glib,gmodule,gobject,gthread}; do
PARAMS="$PARAMS -s $dir"
diff --git a/tools/gen_scripts/glib_generate_enums.sh b/tools/gen_scripts/glib_generate_enums.sh
index f297266..9cd99ee 100755
--- a/tools/gen_scripts/glib_generate_enums.sh
+++ b/tools/gen_scripts/glib_generate_enums.sh
@@ -2,8 +2,8 @@
# 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 defs files will be placed in
-# $JHBUILD_SOURCES/glibmm/glib/src.
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in glib/src.
if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then
echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
@@ -11,8 +11,9 @@ enum.pl\nneeds to be executable and in PATH."
exit 1;
fi
-OUT_DIR="$JHBUILD_SOURCES/glibmm/glib/src"
PREFIX="$JHBUILD_SOURCES/glib"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/glib/src"
enum.pl "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_enums.defs
patch "$OUT_DIR"/glib_enums.defs "$OUT_DIR"/glib_enums.defs.patch
diff --git a/tools/gen_scripts/glib_generate_extra_defs.sh b/tools/gen_scripts/glib_generate_extra_defs.sh
index 23a4710..37296b0 100755
--- a/tools/gen_scripts/glib_generate_extra_defs.sh
+++ b/tools/gen_scripts/glib_generate_extra_defs.sh
@@ -1,10 +1,11 @@
#!/bin/bash
# Note that JHBUILD_SOURCES should be defined to contain the path to the root
-# of the jhbuild sources. The defs files will be placed in
-# $JHBUILD_SOURCES/glibmm/glib/src.
+# of the jhbuild sources. The script assumes that it resides in the
+# tools/gen_scripts directory and the defs files will be placed in glib/src.
-GEN_DIR="$JHBUILD_SOURCES/glibmm/tools/extra_defs_gen"
-OUT_DIR="$JHBUILD_SOURCES/glibmm/glib/src"
+ROOT_DIR="$(dirname "$0")/../.."
+GEN_DIR="$ROOT_DIR/tools/extra_defs_gen"
+OUT_DIR="$ROOT_DIR/glib/src"
"$GEN_DIR"/../extra_defs_gen/generate_defs_glib > "$OUT_DIR"/glib_signals.defs
diff --git a/tools/gen_scripts/glib_generate_methods.sh b/tools/gen_scripts/glib_generate_methods.sh
index ed52e72..32f2680 100755
--- a/tools/gen_scripts/glib_generate_methods.sh
+++ b/tools/gen_scripts/glib_generate_methods.sh
@@ -2,8 +2,8 @@
# 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 defs files will be placed in
-# $JHBUILD_SOURCES/glibmm/glib/src.
+# jhbuild sources. The script assumes that it resides in the tools/gen_scripts
+# directory and the defs files will be placed in glib/src.
if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then
echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \
@@ -12,7 +12,8 @@ h2def.py\nneeds to be executable and in PATH."
fi
PREFIX="$JHBUILD_SOURCES/glib"
-OUT_DIR="$JHBUILD_SOURCES/glibmm/glib/src"
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/glib/src"
h2def.py "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_functions.defs
patch "$OUT_DIR"/glib_functions.defs "$OUT_DIR"/glib_functions.defs.patch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]