r17742 - gnucash/branches/2.2 - [r17720] Bug #548218: Unify command substitution shell pattern
Christian Stimming
cstim at cvs.gnucash.org
Thu Nov 27 06:57:44 EST 2008
Author: cstim
Date: 2008-11-27 06:57:44 -0500 (Thu, 27 Nov 2008)
New Revision: 17742
Trac: http://svn.gnucash.org/trac/changeset/17742
Modified:
gnucash/branches/2.2/configure.in
gnucash/branches/2.2/macros/as-scrub-include.m4
Log:
[r17720] Bug #548218: Unify command substitution shell pattern
The command substiturion by $(expression) causes configure error on solaris.
Command substitution via $() is even part of
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
, which I regard as POSIX definition of a shell, i.e. the absolute minimum I
think a shell should be able to do. From that document, backticks are
"just as standarized" as the $() form. In that sense, this patch is simply
unifying the command substitution pattern in our scripts.
Patch by Halton Huo.
Modified: gnucash/branches/2.2/configure.in
===================================================================
--- gnucash/branches/2.2/configure.in 2008-11-27 11:57:36 UTC (rev 17741)
+++ gnucash/branches/2.2/configure.in 2008-11-27 11:57:44 UTC (rev 17742)
@@ -37,8 +37,9 @@
# --enable-debug:
USER_OPTIMIZATION=""
for flag in $CFLAGS; do
- if test -z $(echo $flag | sed -e 's,-O.,,'); then
- USER_OPTIMIZATION="$USER_OPTIMIZATION ${flag}"
+ tmp_flag=`echo $flag | sed -e 's,-O.,,'`
+ if test -z "$tmp_flag"; then
+ USER_OPTIMIZATION="$USER_OPTIMIZATION ${tmp_flag}"
fi
done
@@ -656,13 +657,14 @@
AC_ARG_ENABLE( debug,
[ --enable-debug compile with debugging flags set],
+ [
# remove any optimization flags...
- CFLAGS=$(echo $CFLAGS | sed -e 's,-O.,,g')
+ CFLAGS=`echo ${CFLAGS} | sed -e 's,-O.,,g'`
# ...except for those the user wants.
CFLAGS="${CFLAGS} -g ${USER_OPTIMIZATION}"
LDFLAGS="${LDFLAGS} -g"
AC_DEFINE(DEBUG_MEMORY,1,Enable debug memory),
- AC_DEFINE(DEBUG_MEMORY,0,Enable debug memory) )
+ AC_DEFINE(DEBUG_MEMORY,0,Enable debug memory)])
AC_ARG_ENABLE( profile,
[ --enable-profile compile with profiling set],
@@ -1224,8 +1226,8 @@
dnl GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
case $host_os in
darwin*)
- GTKHTML_CFLAGS=$(echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include ;;" | ${SED} -e "s;-I/sw/include$;;")
- GTKHTML_CFLAGS=$(echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include/gtkhtml ;;" | ${SED} -e "s;-I/sw/includ/gtkhtmle$;;")
+ GTKHTML_CFLAGS=`echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include ;;" | ${SED} -e "s;-I/sw/include$;;"`
+ GTKHTML_CFLAGS=`echo $GTKHTML_CFLAGS | ${SED} -e "s;-I/sw/include/gtkhtml ;;" | ${SED} -e "s;-I/sw/includ/gtkhtmle$;;"`
;;
esac
AC_SUBST(GTKHTML_CFLAGS)
Modified: gnucash/branches/2.2/macros/as-scrub-include.m4
===================================================================
--- gnucash/branches/2.2/macros/as-scrub-include.m4 2008-11-27 11:57:36 UTC (rev 17741)
+++ gnucash/branches/2.2/macros/as-scrub-include.m4 2008-11-27 11:57:44 UTC (rev 17742)
@@ -26,7 +26,7 @@
dnl line
INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'`
for dir in $INCLUDE_DIRS; do
- GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I$dir ;;" | sed -e "s;-I$dir$;;")
+ GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | sed -e "s;-I$dir ;;" | sed -e "s;-I$dir$;;"`
done
[$1]=$GIVEN_CFLAGS
])
More information about the gnucash-changes
mailing list