--- a/gflib/gflib-autogen.sh Sun Nov 08 16:02:11 2009 -0600
+++ b/gflib/gflib-autogen.sh Sun Nov 08 16:48:05 2009 -0600
@@ -126,37 +126,37 @@
###############################################################################
- lappend COMMANDS ${CMD}
+ lappend COMMANDS ${__cmd} + lappend FLAGS ${__flags}
- INDEX=`lsearch COMMANDS ${INSERT_POINT}`
- linsert COMMANDS ${INDEX} ${COMMAND}
- linsert FLAGS ${INDEX} ${ARGS}
+ __index=`lsearch COMMANDS ${__insert}` + linsert COMMANDS ${__index} ${__cmd} + linsert FLAGS ${__index} ${__flags}
- INDEX=`lsearch COMMANDS ${OLD_COMMAND}`
- test ${INDEX} -ne 0 || return
+ __index=`lsearch COMMANDS ${__old_command}` + test ${__index} -ne 0 || return - lreplace COMMANDS ${INDEX} ${NEW_COMMAND}
+ lreplace COMMANDS ${__index} ${__new_command} - test -z "${ARGS}" || lreplace FLAGS ${INDEX} ${ARGS}
+ test -z "${__flags}" || lreplace FLAGS ${__index} ${__flags} @@ -172,10 +172,10 @@
# dash will only source a file from a source file if it's in the path
# so we add . to the PATH for the source and then revert the path back
@@ -184,66 +184,66 @@
- printf "checking for ${CMD}... "
+ printf "checking for ${__cmd}... " - if [ x"${BIN}" = x"" ] ; then
+ if [ x"${__bin}" = x"" ] ; then - echo "${CMD} is required to build ${PACKAGE}!"
+ echo "${__cmd} is required to build ${PACKAGE}!"
- catlist COMMANDS | while read CMD; do
+ catlist COMMANDS | while read __cmd; do
# we need to make sure to use a six-character template because some versions
# of mktemp blow up on anything shorter or longer.
- OUTPUT=`mktemp autogen-XXXXXX`
+ __output=`mktemp autogen-XXXXXX` # we have to stash ${@} into a variable, otherwise printf has "issues" if
# ${@} was expanded from a variable. Fortunately, this lets us clean up
- if [ x"${ARGS}" != x"" ] ; then
+ if [ x"${__args}" != x"" ] ; then - printf "running '${CMD}${ARGS}' ... "
- ${CMD} ${@} >${OUTPUT} 2>&1
+ printf "running '${__cmd}${__args}' ... " + ${__cmd} ${@} >${__output} 2>&1
+ __len=`llength COMMANDS` - for i in `${SEQ_COMMAND} 1 ${LEN}` ; do
- CMD=`lindex COMMANDS ${i}`
- ARGS=`lindex FLAGS ${i}`
+ for i in `${SEQ_COMMAND} 1 ${__len}` ; do + __cmd=`lindex COMMANDS ${i}` + __flags=`lindex FLAGS ${i}` - run_command ${CMD} ${ARGS}
+ run_command ${__cmd} ${__flags} @@ -293,20 +293,20 @@
update_command libtoolize glibtoolize
# look for fink and add it's aclocal dir to the aclocal flags
if [ -d /sw/share/aclocal ] ; then
- FLAGS='-I /sw/share/aclocal'
+ __flags="${__flags} -I /sw/share/aclocal" - update_command aclocal aclocal ${FLAGS}
+ update_command aclocal aclocal ${__flags}
- printf "adjusting for platform '%s' ... " ${PLATFORM}
+ printf "adjusting for platform '%s' ... " ${__platform}