[pangomm] tools/gen_scripts/: Update for pango built with meson



commit cac4cde528c9d54930132fb67ffb725fd8fa491d
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Sep 5 08:42:19 2017 +0200

    tools/gen_scripts/: Update for pango built with meson
    
    When pango is built with meson instead of autotools, generated .h and .c
    files are stored in pango/build/pango. Files in that directory shall be read
    when pango_docs.xml and the .defs files are generated.
    
    Don't read private and internal .h files.

 tools/gen_scripts/pango_generate_docs.sh       |    7 +++++--
 tools/gen_scripts/pango_generate_enums.sh      |    5 ++++-
 tools/gen_scripts/pango_generate_extra_defs.sh |    2 +-
 tools/gen_scripts/pango_generate_methods.sh    |    5 ++++-
 4 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/tools/gen_scripts/pango_generate_docs.sh b/tools/gen_scripts/pango_generate_docs.sh
index a606cef..73c95cc 100755
--- a/tools/gen_scripts/pango_generate_docs.sh
+++ b/tools/gen_scripts/pango_generate_docs.sh
@@ -13,8 +13,11 @@ PREFIX="$JHBUILD_SOURCES"
 ROOT_DIR="$(dirname "$0")/../.."
 OUT_DIR="$ROOT_DIR/pango/src"
 
-for dir in "$PREFIX"/pango/pango; do
-  PARAMS="$PARAMS -s $dir"
+PARAMS="--with-properties --no-recursion"
+for dir in "$PREFIX"/pango/pango "$PREFIX"/pango/build/pango; do
+  if [ -d "$dir" ]; then
+    PARAMS="$PARAMS -s $dir"
+  fi
 done
 
 DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py"
diff --git a/tools/gen_scripts/pango_generate_enums.sh b/tools/gen_scripts/pango_generate_enums.sh
index b3e7d2e..9f2d65c 100755
--- a/tools/gen_scripts/pango_generate_enums.sh
+++ b/tools/gen_scripts/pango_generate_enums.sh
@@ -13,5 +13,8 @@ PREFIX="$JHBUILD_SOURCES/pango"
 ROOT_DIR="$(dirname "$0")/../.."
 OUT_DIR="$ROOT_DIR/pango/src"
 
+shopt -s extglob # Enable extended pattern matching
+shopt -s nullglob # Skip a filename pattern that matches no file
 ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl"
-$ENUM_PL "$PREFIX"/pango/*.h > "$OUT_DIR"/pango_enums.defs
+# Process files whose names end with .h, but not with private.h or internal.h.
+$ENUM_PL "$PREFIX"/pango/!(*private|*internal).h "$PREFIX"/build/pango/!(*private).h > 
"$OUT_DIR"/pango_enums.defs
diff --git a/tools/gen_scripts/pango_generate_extra_defs.sh b/tools/gen_scripts/pango_generate_extra_defs.sh
index 8e2dee1..fd001b8 100755
--- a/tools/gen_scripts/pango_generate_extra_defs.sh
+++ b/tools/gen_scripts/pango_generate_extra_defs.sh
@@ -30,7 +30,7 @@ then
   # patch $PATCH_OPTIONS "$OUT_DEFS_FILE" "$OUT_DEFS_FILE".patch
 elif [ "$1" = "--make-patch" ]
 then
-  diff --unified=10 "$OUT_DEFS_FILE".orig "$OUT_DEFS_FILE" > "$OUT_DEFS_FILE".patch
+  diff --unified=5 "$OUT_DEFS_FILE".orig "$OUT_DEFS_FILE" > "$OUT_DEFS_FILE".patch
 else
   echo "Usage: $0 [--make-patch]"
   exit 1
diff --git a/tools/gen_scripts/pango_generate_methods.sh b/tools/gen_scripts/pango_generate_methods.sh
index 3e9e517..37e70a8 100755
--- a/tools/gen_scripts/pango_generate_methods.sh
+++ b/tools/gen_scripts/pango_generate_methods.sh
@@ -13,5 +13,8 @@ PREFIX="$JHBUILD_SOURCES/pango"
 ROOT_DIR="$(dirname "$0")/../.."
 OUT_DIR="$ROOT_DIR/pango/src"
 
+shopt -s extglob # Enable extended pattern matching
+shopt -s nullglob # Skip a filename pattern that matches no file
 H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
-$H2DEF_PY "$PREFIX"/pango/*.h > "$OUT_DIR"/pango_methods.defs
+# Process files whose names end with .h, but not with private.h or internal.h.
+$H2DEF_PY "$PREFIX"/pango/!(*private|*internal).h "$PREFIX"/build/pango/!(*private).h > 
"$OUT_DIR"/pango_methods.defs


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