Updating branch refs/heads/xfce-4.6
         to d3db0951fde4706e40df80a207f8d8a07cf752c9 (commit)
       from f3c8210ae056b2b3e6cec65182c828e1a58f7b85 (commit)

commit d3db0951fde4706e40df80a207f8d8a07cf752c9
Author: Nick Schermer <[email protected]>
Date:   Tue May 18 21:31:05 2010 +0200

    Automate the LINGUAS parsing.

 autogen.sh |   62 ++++++++++++++++++++++++++++++++++++-----------------------
 po/LINGUAS |    2 -
 2 files changed, 38 insertions(+), 26 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 2ce96ce..ba1a279 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,39 +1,39 @@
 #!/bin/sh
 #
-# $Id: autogen.sh 23241 2006-09-29 19:05:15Z kelnos $
-#
-# Copyright (c) 2002-2005
-#         The Xfce development team. All rights reserved.
-#
-# Written for Xfce by Benedikt Meurer <[email protected]>.
+# Copyright (c) 2002-2010 Xfce Development Team
 #
 
 (type xdt-autogen) >/dev/null 2>&1 || {
   cat >&2 <<EOF
 autogen.sh: You don't seem to have the Xfce development tools installed on
             your system, which are required to build this software.
-            Please install the xfce4-dev-tools package first, available from
-            http://xfce.org/~benny/projects/xfce4-dev-tools/.
+            Please install the xfce4-dev-tools package first, it is available
+            from http://www.xfce.org/.
 EOF
   exit 1
 }
 
-# verify that po/LINGUAS is present
-(test -f po/LINGUAS) >/dev/null 2>&1 || {
-  cat >&2 <<EOF
-autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
-            or try to checkout again.
-EOF
+# portability for awk
+awk_tests="gawk mawk nawk awk"
+if test -z "$AWK"; then
+  for a in $awk_tests; do
+    if type $a >/dev/null 2>&1; then
+      AWK=$a
+      break
+    fi
+  done
+else
+  if ! type $AWK >/dev/null 2>/dev/null; then
+    unset AWK
+  fi
+fi
+if test -z "$AWK"; then
+  echo "autogen.sh: The 'awk' program (one of $awk_tests) is" >&2
+  echo "            required, but cannot be found." >&2
   exit 1
-}
-
-echo 'dnl *** This file is automatically generated from configure.ac.in ***' \
-       >configure.ac
-echo 'dnl *** DO NOT EDIT! ***' >>configure.ac
-echo >>configure.ac
+fi
 
-# substitute revision and linguas
-linguas=$(sed -e '/^#/d' po/LINGUAS)
+# substitute revision
 if test -d .git/svn; then
     revision=`git svn find-rev trunk 2>/dev/null ||
               git svn find-rev origin/trunk 2>/dev/null ||
@@ -47,10 +47,24 @@ fi
 if test "x$revision" = "x"; then
     revision="UNKNOWN"
 fi
+
+# substitute the linguas
+linguas=`cd "po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; 
ORS=" " } { print $1 }'`
+if test "x$linguas" = "x"; then
+    echo "autogen.sh: No po files were found, aborting." >&2
+    exit 1
+fi
+
 sed -e "s/@LINGUAS@/${linguas}/g" \
     -e "s/@REVISION@/${revision}/g" \
-    < "configure.ac.in" >> "configure.ac"
+    < "configure.in.in" > "configure.in"
+
+exec xdt-autogen $@
 
-xdt-autogen $@
+# xdt-autogen clean does not remove all generated files
+(test x"clean" = x"$1") && {
+  rm -f configure.in
+  rm -f INSTALL
+} || true
 
 # vi:set ts=2 sw=2 et ai:
diff --git a/po/LINGUAS b/po/LINGUAS
deleted file mode 100644
index 9d1ef28..0000000
--- a/po/LINGUAS
+++ /dev/null
@@ -1,2 +0,0 @@
-# set of available languages (in alphabetic order)
-ast ca cs da de es eu fi fr gl hu id it ja lv nb nl pl pt_BR pt ro ru sv tr uk 
ur ur_PK zh_CN
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to