Error running gda-buildclient (with patch)




I tried to run gda-buildclient, but ran into a few problems with the
following test case:

export prefix=/usr 
export CC=gcc 
gda-buildclient --f gda-client-test12.c --o gda-client-test12

Here are the problems:

   * The following error message occurs when I use it:

     /usr/bin/gda-buildclient: test: o: integer expression expected
     /usr/bin/gda-buildclient: test: =: unary operator expected

   * It assumes that $CC and $prefix are set without checking them.
 
   * It does not have a complete list of includes necessary to build an
     app (my test case was gda-client-test12.c)

   * -lgda-clnt should be -lgda-client

   * if --o is unspecified, it overwrites the input file

   * test for $target fails with:

      ./gda-buildclient: test: =: unary operator expected
      ./gda-buildclient: test: =: unary operator expected

I've included a patch that corrects these problems:
12c12
< Usage: gda-buildclient [OPTIONS] --o target -f object_files [--l libraries]
---
> Usage: gda-buildclient [OPTIONS] --o target --f input_files [--l libraries]
20a21,34
> # Make sure CC is set.
> #
> if test "$CC" = ""; then
>     echo "\$CC not set... exiting."
>     exit 
> fi
> 
> # Make sure prefix is set.
> #
> if test "$prefix" = ""; then
>     echo "\$prefix not set... exiting."
>     exit 
> fi
> 
27c41
< while test $# -gt o; do
---
> while test $# -gt 0; do
57c71,76
< if test ${target:no} = "no"
---
> if test "${target}" = ""
> then
> 	usage 1 1>&2
> fi
> 
> if test "${obj_files}" = ""
63,64c82,85
< INCLUDE_FLAGS=-I${prefix}/include/gda
< LIBS_FLAGS="-L${prefix}/lib -lgda-clnt -lxml"
---
> INCLUDE_FLAGS="-I${prefix}/include/gda \
>                -I${prefix}/lib/glib/include/ \
>                -I${prefix}/lib/gnome-libs/include/"
> LIBS_FLAGS="-L${prefix}/lib -lgda-client -lxml"
71c92
< if `$CC -o $target $obj_files $LIBS_FLAGS`
---
> if `$CC $INCLUDE_FLAGS -o $target $obj_files $LIBS_FLAGS`



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