Re: [Anjuta-list] preprocessor



Thank you.

I am having some weird results though. (have never before edited these files though)

I did this, to src/Makefile.am

----------
ECPG = /usr/local/pgsql/bin/ecpg

preproc_FILES = \
	dbinit.pgc

dbinit.c:
	$(ECPG) $(preproc_FILES)

bin_PROGRAMS = agenda

agenda_SOURCES = \
	callbacks.c\
	callbacks.h\
	dbinit.c\
	interface.c\
	interface.h\
	main.c\
	support.c\
	support.h
----------

But when i run autogen (from the Anjuta menu), it generates an empy dbinit.c file on the main directory.

Also, How can i be sure that when i type "make", it will fist do dbinit.c and then agenda (do i need to overwrite agenda: on the Makefile.am?)
Again, thank you.

On 26 Feb 2002 10:25:43 +0530
Biswapesh Chattopadhyay <biswapesh_chatterjee tcscal co in> wrote:

> On Tue, 2002-02-26 at 10:03, anjuta-list-admin lists sourceforge net
> wrote:
> > 
> > 
> > I hope this is the right list to ask this.
> > I am making a small program with gtk, that uses postgreSQL.
> > I thought of doing it with its embedded sql implementation ecpg.
> > ecpg preprocess a .pgc file (which is c)  name.pgc and outputs name.c
> > 
> > How can i add both, name.pgc and name.c to a project, but tell it that .pgc
> > files
> > must only be preprocessed with epgc, and not compiled with gcc? (also,
> > before anyother file)
> 
> Well, I faced a similar situation (using PRO *C - the Oracle
> pre-compiler) and my solution was not to add the .c file to the project
> at all, but just the .pc file (equivalent to the .pgc probably). Then
> simply add a rule in Makefile.am like so:
> .pc.c:
> 	proc <Options>....
> 
> This should do the trick. (I'm assuming here that you're using
> autoconf/automake, the basic idea should remain the same anyway.
> 
> Rgds,
> Biswa.
> 
> > 
> > Thank you.
> > 
> > 
> > --
> > ICQ: 15605359 Bicho
> >                                   =^..^=
> > First, they ignore you. Then they laugh at you. Then they fight you. Then
> > you win. Mahatma Gandhi.
> > ------------------------------------
> > 
> > 
> > _______________________________________________
> > Anjuta-list mailing list
> > Anjuta-list lists sourceforge net
> > https://lists.sourceforge.net/lists/listinfo/anjuta-list
> > 
> 


-- 
ICQ: 15605359 Bicho
                                  =^..^=
First, they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Gandhi.
-------------------------------気検体の一致------------------------------------
暑さ寒さも彼岸まで。
恋にししょうなし。恋はしあんの他。
アン アン アン とっても大好き





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