[glibmm/glibmm-2-32] Simplify the gen_scripts slightly.



commit 7b0c5df8f65dab1b3cda0a66494ed45ddac9629d
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jun 13 10:54:17 2012 +0200

    Simplify the gen_scripts slightly.
    
    	* tools/gen_scripts/gio_generate_docs.sh:
    	* tools/gen_scripts/gio_generate_enums.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_methods.sh:
    	Do not require changes to PATH.

 ChangeLog                                  |   12 ++++++++++++
 tools/gen_scripts/gio_generate_docs.sh     |   13 ++++++-------
 tools/gen_scripts/gio_generate_enums.sh    |   13 ++++++-------
 tools/gen_scripts/gio_generate_methods.sh  |   13 ++++++-------
 tools/gen_scripts/glib_generate_docs.sh    |   13 ++++++-------
 tools/gen_scripts/glib_generate_enums.sh   |   14 +++++++-------
 tools/gen_scripts/glib_generate_methods.sh |   17 ++++++++---------
 7 files changed, 51 insertions(+), 44 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7ac365c..db97023 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-06-13  Murray Cumming  <murrayc murrayc com>
+
+	Simplify the gen_scripts slightly.
+
+	* tools/gen_scripts/gio_generate_docs.sh:
+	* tools/gen_scripts/gio_generate_enums.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_methods.sh:
+	Do not require changes to PATH.
+
 2012-06-08  MichaÅ WrÃbel  <michal wrobel flytronic pl>
 
 	Thread::RecMutex: Don't initialize this as a GStaticMutex.
diff --git a/tools/gen_scripts/gio_generate_docs.sh b/tools/gen_scripts/gio_generate_docs.sh
index 190163a..edad682 100755
--- a/tools/gen_scripts/gio_generate_docs.sh
+++ b/tools/gen_scripts/gio_generate_docs.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# Note that docextract_to_xml.py should be in PATH for this script to work and
+# 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 XML file will be placed in gio/src.
+# jhbuild sources. The XML files 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 \
-docextract_to_xml.py\nneeds to be executable and in PATH."
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
   exit 1;
 fi
 
@@ -19,4 +17,5 @@ for dir in "$PREFIX"/glib/gio; do
   PARAMS="$PARAMS -s $dir"
 done
 
-docextract_to_xml.py $PARAMS > "$OUT_DIR"/gio_docs.xml
+DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py"
+$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR"/gio_docs.xml
diff --git a/tools/gen_scripts/gio_generate_enums.sh b/tools/gen_scripts/gio_generate_enums.sh
index d8c6f6d..dd6d2a4 100755
--- a/tools/gen_scripts/gio_generate_enums.sh
+++ b/tools/gen_scripts/gio_generate_enums.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# Note that enum.pl should be in PATH for this script to work and
+# 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 gio/src.
+# jhbuild sources. 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 \
-enum.pl\nneeds to be executable and in PATH."
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
   exit 1;
 fi
 
@@ -15,5 +13,6 @@ PREFIX="$JHBUILD_SOURCES/glib"
 ROOT_DIR="$(dirname "$0")/../.."
 OUT_DIR="$ROOT_DIR/gio/src"
 
-enum.pl "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_enums.defs
+ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl"
+$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_methods.sh b/tools/gen_scripts/gio_generate_methods.sh
index 29add54..711c9c5 100755
--- a/tools/gen_scripts/gio_generate_methods.sh
+++ b/tools/gen_scripts/gio_generate_methods.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# Note that h2def.py should be in PATH for this script to work and
+# 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 gio/src.
+# jhbuild sources. 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 \
-h2def.py\nneeds to be executable and in PATH."
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
   exit 1;
 fi
 
@@ -15,5 +13,6 @@ PREFIX="$JHBUILD_SOURCES/glib"
 ROOT_DIR="$(dirname "$0")/../.."
 OUT_DIR="$ROOT_DIR/gio/src"
 
-h2def.py "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_methods.defs
+H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
+$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 3f23190..cb841cb 100755
--- a/tools/gen_scripts/glib_generate_docs.sh
+++ b/tools/gen_scripts/glib_generate_docs.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# Note that docextract_to_xml.py should be in PATH for this script to work and
+# 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 XML file will be placed in glib/src.
+# jhbuild sources. The XML files 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 \
-docextract_to_xml.py\nneeds to be executable and in PATH."
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
   exit 1;
 fi
 
@@ -19,4 +17,5 @@ for dir in "$PREFIX"/glib/{glib,gmodule,gobject,gthread}; do
   PARAMS="$PARAMS -s $dir"
 done
 
-docextract_to_xml.py $PARAMS > "$OUT_DIR/glib_docs.xml"
+DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py"
+$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR/glib_docs.xml"
diff --git a/tools/gen_scripts/glib_generate_enums.sh b/tools/gen_scripts/glib_generate_enums.sh
index 9cd99ee..c7bca21 100755
--- a/tools/gen_scripts/glib_generate_enums.sh
+++ b/tools/gen_scripts/glib_generate_enums.sh
@@ -1,13 +1,12 @@
 #!/bin/bash
 
-# Note that enum.pl should be in PATH for this script to work and
+# 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 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 \
-enum.pl\nneeds to be executable and in PATH."
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
   exit 1;
 fi
 
@@ -15,8 +14,9 @@ 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
+ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl"
+$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
 
-enum.pl "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_enums.defs
-enum.pl "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_enums.defs
+$ENUM_PL "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_enums.defs
+$ENUM_PL "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_enums.defs
diff --git a/tools/gen_scripts/glib_generate_methods.sh b/tools/gen_scripts/glib_generate_methods.sh
index 32f2680..e585b45 100755
--- a/tools/gen_scripts/glib_generate_methods.sh
+++ b/tools/gen_scripts/glib_generate_methods.sh
@@ -1,13 +1,11 @@
 #!/bin/bash
 
-# Note that h2def.py should be in PATH for this script to work and
+# 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 glib/src.
+# jhbuild sources. 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 \
-h2def.py\nneeds to be executable and in PATH."
+if [ -z "$JHBUILD_SOURCES" ]; then
+  echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
   exit 1;
 fi
 
@@ -15,8 +13,9 @@ PREFIX="$JHBUILD_SOURCES/glib"
 ROOT_DIR="$(dirname "$0")/../.."
 OUT_DIR="$ROOT_DIR/glib/src"
 
-h2def.py "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_functions.defs
+H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
+$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
 
-h2def.py "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_functions.defs
-h2def.py "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_functions.defs
+$H2DEF_PY "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_functions.defs
+$H2DEF_PY "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_functions.defs



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