Re: gda-buildserver
- From: Brian Jepson <bjepson jepstone net>
- To: Rodrigo Moya <rodrigo linuxave net>
- Cc: gnome-db-list gnome org
- Subject: Re: gda-buildserver
- Date: Thu, 24 Aug 2000 13:58:45 -0700 (PDT)
On Wed, 28 Jun 2000, Rodrigo Moya wrote:
> Hi!
>
> I've been reading carefully your message, and...
>
> There are some details I didn't mention:
> * you should remove the ${GENERATED*FILES} variables, since now, with
> the new libgda-server, there is no need for generating the C files from
> the IDL files. Also, all the commands to compile them, and the call to
> orbit-idl, since it's that one which generated those files.
> * Also, the S{TMPL*FILES} are wrong. You should delete the
> TMPL_FIXED_FILES (no need for them), and the other two should change to:
> TMPL_C_FILES="gda-srv-command.c gda-srv-connection.c
> gda-srv-recordset.c main-srv.c"
> TMPL_H_FILES="gda-srv.h"
>
> > * -p flag (example: -p MY_PROVIDER --skels) now replaces provider
> > name in source code. I don't think there's anything that forces
> > you to use this flag, but unpredictable things will happen if
> > you don't use it with --skels.
> >
> In this, you should change the names of the template files being
> generated, from gda-srv-* to gda-MY_PROVIDER-*. So, also, I would use
> lowercase for the provider's name (my_provider), but of course, this is
> optional.
>
I've made these changes in my local version, and they seem to work OK.
> > Then I tried compiling my empty skeletons with:
> >
> > gda-buildserver -o foo -f main-srv.c
> >
> Here, you should pass all the template files generated.
>
I tried making a skeletal server and compiling it with these commands:
gda-buildserver -p my_provider --skels
gda-buildserver -o my_provider -f *.c
But I got errors about gda-server-impl-factory.h,
gda-server-impl-connection.h, gda-server-impl-command.h, and
gda-server-impl-recordset.h.
So, I copied these into /usr/include/gda:
cp ~/Projects/gnome/gnome-db/gda-srv/*-impl-*.h /usr/include/gda/
Should these be installed by default? In any case, after this copy is
done, the only error I get is this:
main-srv.c: In function `main':
main-srv.c:64: `VERSION' undeclared (first use in this function)
main-srv.c:64: (Each undeclared identifier is reported only once
main-srv.c:64: for each function it appears in.)
So, that's doesn't look too bad, but does someone want to look this over
before I check it in (a patch is attached)?
--
Brian Jepson * (bjepson@jepstone.net) * http://www.jepstone.net/
Index: gda-buildserver.in
===================================================================
RCS file: /cvs/gnome/gnome-db/gda-dev/gda-buildserver.in,v
retrieving revision 1.8
diff -c -r1.8 gda-buildserver.in
*** gda-buildserver.in 2000/07/28 14:02:13 1.8
--- gda-buildserver.in 2000/08/24 20:58:22
***************
*** 9,17 ****
GNOME_CONFIG=@GNOME_CONFIG@
TEMPLATES_DIR="${datadir}/gnome-db/templates"
! TMPL_C_FILES="gda-srv-command.c gda-srv-connection.c gda-srv-error.c gda-srv-field.c gda-srv-recordset.c main-srv.c"
! TMPL_H_FILES="gda-srv-command.h gda-srv-connection.h gda-srv-error.h gda-srv-field.h gda-srv-recordset.h"
! TMPL_FIXED_FILES="gda-srv.c gda-srv.h"
usage()
{
--- 9,16 ----
GNOME_CONFIG=@GNOME_CONFIG@
TEMPLATES_DIR="${datadir}/gnome-db/templates"
! TMPL_C_FILES="gda-srv-command.c gda-srv-connection.c gda-srv-recordset.c main-srv.c"
! TMPL_H_FILES="gda-srv.h"
usage()
{
***************
*** 35,42 ****
exit 1
fi
done
echo The following files have been created:
! echo ${TMPL_C_FILES} ${TMPL_H_FILES}
echo
echo Now fill the gaps commented on these files
}
--- 34,43 ----
exit 1
fi
done
+ mv gda-srv.h gda-${ARG_PROVIDER}.h
+
echo The following files have been created:
! echo ${TMPL_C_FILES} gda-${ARG_PROVIDER}.h
echo
echo Now fill the gaps commented on these files
}
***************
*** 91,119 ****
# Set variables
INCLUDE_FLAGS="-I${prefix}/include/gda @GNOME_INCLUDEDIR@"
- IDL_FLAGS=`${GNOME_CONFIG} --cflags idl`
LIBS_FLAGS="@GNORBA_LIBS@ @INTLLIBS@ -L${prefix}/lib -lgda-server -lgda-common"
- GENERATED_C_FILES="gda-skels.c gda-common.c"
- GENERATED_O_FILES="gda-skels.o gda-common.o"
- GENERATED_FILES="$GENERATED_C_FILES gda-stubs.c gda.h"
-
- # Generate and compile ORBit files
- if ! `orbit-idl -I${datadir}/idl ${IDL_FLAGS} ${datadir}/idl/gda.idl`
- then
- echo "$0: error compiling IDL files"
- exit 1
- fi
- for f in ${GENERATED_C_FILES}
- do
- if ! `$CC ${INCLUDE_FLAGS} -c $f`
- then
- echo "$0: error compiling $f"
- exit 1
- fi
- done
# Build the server
! if ! `$CC -o ${target} ${obj_files} ${GENERATED_O_FILES} ${files} ${LIBS_FLAGS}`
then
echo "$0: error running $_"
exit 1
--- 92,103 ----
# Set variables
INCLUDE_FLAGS="-I${prefix}/include/gda @GNOME_INCLUDEDIR@"
LIBS_FLAGS="@GNORBA_LIBS@ @INTLLIBS@ -L${prefix}/lib -lgda-server -lgda-common"
# Build the server
! cmd="$CC ${INCLUDE_FLAGS} -o ${target} ${obj_files} ${files} ${LIBS_FLAGS}"
! echo $cmd
! if ! `$cmd`
then
echo "$0: error running $_"
exit 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]