summaryrefslogtreecommitdiff
path: root/tools/gen_scripts
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2012-03-01 12:02:33 -0500
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2012-03-01 12:02:33 -0500
commite4ee6d194bdf77d90fc8ad50b9c8e632115b427f (patch)
tree8cc7242a8920f323555e95c77ee047971089333b /tools/gen_scripts
parentca35e1732e1c0fd0e49e86594113215660009510 (diff)
downloadglibmm-e4ee6d194bdf77d90fc8ad50b9c8e632115b427f.tar.gz
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.
Diffstat (limited to 'tools/gen_scripts')
-rwxr-xr-xtools/gen_scripts/gio_generate_docs.sh7
-rwxr-xr-xtools/gen_scripts/gio_generate_enums.sh8
-rwxr-xr-xtools/gen_scripts/gio_generate_extra_defs.sh9
-rwxr-xr-xtools/gen_scripts/gio_generate_methods.sh7
-rwxr-xr-xtools/gen_scripts/glib_generate_docs.sh7
-rwxr-xr-xtools/gen_scripts/glib_generate_enums.sh7
-rwxr-xr-xtools/gen_scripts/glib_generate_extra_defs.sh9
-rwxr-xr-xtools/gen_scripts/glib_generate_methods.sh7
8 files changed, 35 insertions, 26 deletions
diff --git a/tools/gen_scripts/gio_generate_docs.sh b/tools/gen_scripts/gio_generate_docs.sh
index 831c8cd0..190163a0 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 c7080468..d8c6f6d8 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 778cf4a7..b57683bf 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 230d7172..29add54e 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 7b146954..3f231909 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 f297266d..9cd99eef 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 23a47101..37296b0f 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 ed52e722..32f26806 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