grim/guifications3

d6cf6829b037
Parents 46362f805c3d
Children d50957f500a3
some more updates from Ethan Blanton for the list library (linsert and lsearch)
added a new "add_default_library_commands" that adds gtkdocize in the right place
removed adding gtkdocize from autogen.sh since it's in the wrong place and causes autogen to fail
--- a/gflib/autogen.sh Thu Sep 10 22:01:02 2009 -0500
+++ b/gflib/autogen.sh Thu Sep 10 22:23:16 2009 -0500
@@ -20,8 +20,7 @@
# we source this without a path because we always want to use the in tree copy
. ./gflib-autogen.sh
-add_default_commands
-add_command "gtkdocize" "--copy"
+add_default_library_commands
autogen
--- a/gflib/gflib-autogen.sh Thu Sep 10 22:01:02 2009 -0500
+++ b/gflib/gflib-autogen.sh Thu Sep 10 22:23:16 2009 -0500
@@ -71,6 +71,21 @@
$__listvalue'\`"
}
+linsert() {
+ __listname=$1
+ __listindex=$2
+ __listvalue=$3
+ eval "$__listname=\`catlist $__listname | sed -e '${__listindex}i\\\\
+$__listvalue'\`"
+}
+
+lsearch() {
+ catlist $1 | sed -n "/$2/{
+=
+q
+}"
+}
+
###############################################################################
# Some helper functions
###############################################################################
@@ -180,9 +195,18 @@
add_command "autoconf" "-f"
}
+add_default_library_commands () {
+ add_default_commands
+
+ INDEX=`lsearch COMMANDS aclocal`
+
+ linsert COMMANDS ${INDEX} "gtkdocize"
+ linsert FLAGS ${INDEX} "--copy"
+}
+
find_command () {
CMD=${1}
- for i in `${SEQ_COMMAND} 0 $(( ${#COMMANDS[*]} - 1 ))` ; do
+ for i in `${SEQ_COMMAND} 1 $(( ${#COMMANDS[*]} - 1 ))` ; do
if test "x${COMMANDS[${i}]}" = "x${CMD}" ; then
echo ${i}
return