Using Kdevelop and CORBA
W. Tasin
tasin at e-technik.fh-muenchen.de
Sat Feb 26 18:02:07 GMT 2000
Marcus Gruendler wrote:
>
> Hi there,
>
> Some days ago someone asked about how to cope with CORBA specifics in Kdevelop.
> There was a short response that one should add the IDL compiler line to the
> Makefile.am. But i think this is not enough.
>
> Unfortunately i am not so familiar with automake details though i have some
> knowledge about it. There are some points which i can't manage.
>
> * Assume i have a test.idl file. After invocation of the IDL compiler like
> idl test.idl
> i have two further files: test.cc and test.h. The problem is that the file
> test.cc has to be compiled by the c++ compiler and then linked to my
> application. But how could this be done in Kdevelop? Kdevelop doesn't know
> anything about test.cc and since it is a generated file, i can not add it to
> my project by hand.
>
> * I have tried to manage the problem by adding this to the Makefile.am:
>
> ####### kdevelop will overwrite this part!!! (begin)##########
> bin_PROGRAMS = myapp
> boersenmarkt_SOURCES = main.cpp
> boersenmarkt_LDADD = -lmico2.3.0
>
> SUBDIRS = docs
>
> EXTRA_DIST = main.cpp test.idl
>
> ####### kdevelop will overwrite this part!!! (end)############
> bin_PROGRAMS = myapp
> IDLCOMILER = idl
> IDLFLAGS =
>
> test.cc test.h: test.idl
> $(IDLCOMPILER) $(IDLARGS) $<
>
> but you can see the problem - if i had more than one *.idl file i would have
> to add a line for each idl file. Is there a better way? Is it possible to add
> the test.cc file to the myapp_SOURCES variable? You can not do it like that:
> myapp_SOURCES = $(myapp_SOURCES) test.cc since this produces a cyclic
> inclusion of the sources: myapp_SOURCES = main.cpp test.cc main.cpp test.cc
> main.cpp test.cc ....
>
> Does anybody have an idea how to solve this problem easily, or do we have to
> extend Kdevelop fo this?
>
> Bye, Marcus
Hi Marcus,
try this:
after the kdevelop specific part
---------- snip ------------
IDLSOURCES = $(wildcard *.idl)
EXTRA_DIST = $(wildcard *.cpp) $(IDLSOURCES)
boersenmarkt_SOURCES = $(wildcard *.cpp) $(patsubst %.cc, %.idl,
$(IDLSOURCES))
%.cc %.h: %.idl
$(IDLCOMPILER) $(IDLARGS) $<
---------- snip ------------
It should work...
Bye
Walter
--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB 04,
FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>
More information about the KDevelop
mailing list