cleaning dependencies in makefile system

Prakash Punnoor prakashp at arcor.de
Sat Feb 12 12:24:04 UTC 2005


Hi,

I have been playing around with kdevelop and its build system. Though
configure offers some option to not build several langueage, project, etc
modules, the Makefile.am's as such are not very intelligently handling this.
Eg. if I only want cpp support, lib/antlr is still built, but needed nowhere.

So I am offering to clean this a bit up. In my eyes the best solution, but
probably not quite standrd waise, is to add the dependecies into each modules'
Makefile.am, by adding the lib into SUBDIR. Then we could delate eg antlr form
Makefile.am in lib/:

Eg Makefim.am in languages/ada would contain:

SUBDIRS = app_templates file_templates doc ../../lib/antlr

The positive effect is now, that even if nothing of the project is build yet,
one could go into languages/ada and type make and make would build the
necessary dependencies. (I come to libkdevelop.la later...)

Of course, I don't know if it is "legal" to add such a dir into the SUBDIRS,
as it is no real subdir. (BTW I tried using $(top_srcdir)/lib/antlr, but this
doesn't work...). I can just say it works wonderfully for me. :-)

The other method would be to modify Makefile.am in lib/ to check when antlr
would actually be needed. This would be definitely legal, but in my eyes a
bigger mess and I couldn't build eg ada on my own, as I had to start from the
root Makefile.

Any other ideas?

The other thing I wanted to suggest is, intoruding a possibility to build the
"base" kdevelop independently from language, project, version management
modules. This also is possible by some hacking in the Makefile.am and possibly
configure.in. So eg the kdevelop base could be installed and the modules
seperately which would have the advantage, if I installed only cpp support and
later want eg haskell, I could simply recompile the modules and install an
save me some time. I already hacked my way to a "hard" split between base and
languages and it seems to work without redundant compiling. It could be
implemented in a way, that the user has the choice if he wants the traditional
way or the new split way. (I am a gentoo user, that's why I want to optimize
the building of kdevelop. :-)

So what do you think?

Cheers


--
Prakash Punnoor

formerly known as Prakash K. Cheemplavam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20050212/878f5eb8/attachment.sig>


More information about the KDevelop-devel mailing list