PATCH: am_edit kdeinit library autogeneration
Stephan Kulow
coolo at kde.org
Mon Mar 17 13:37:20 GMT 2003
Am Sonntag, 16. März 2003 19:21 schrieb Benjamin Reed:
> Here is a first blush of the patch to autogenerate a shared
> library/module combination for binaries for kdeinit.
>
> Basically, instead of having:
>
> ---(before)---
> bin_PROGRAMS = dcopserver
> lib_LTLIBRARIES = dcopserver.la
>
> dcopserver_la_LDFLAGS = -module -avoid-version $(all_libraries)
> dcopserver_la_SOURCES = dcopserver.cpp dcopsignals.cpp
> dcopserver_la_LIBADD = libDCOP.la
>
> dcopserver_LDFLAGS = $(KDE_RPATH) $(all_libraries)
> dcopserver_SOURCES = dummy.cpp
> dcopserver_LDADD = dcopserver.la
> ---(end before)---
>
> You would do this:
>
> ---(after)---
> bin_PROGRAMS = dcopserver
> KDEINIT = dcopserver
>
> dcopserver_LDFLAGS = $(KDE_RPATH) $(all_libraries)
> dcopserver_SOURCES = dcopserver.cpp dcopsignals.cpp
> dcopserver_LDADD = libDCOP.la
> ---(end after)---
>
> What it will *actually* end up generating is libkdeinit_dcopserver.la
> (which is a normal libtool library), and then it generates a
> dcopserver.la (kde module) and dcopserver (binary) which link against
> libkdeinit_dcopserver.la.
>
> This allows building on platforms (like macosx and a.out netbsd) that
> don't allow linking against libtool modules. I've tested it with both
> dependency tracking enabled and disabled and it seems to work OK.
>
> I'm doing some test builds right now with kdelibs and kdebase after
> modifying the bits that don't build on osx, and it's working so far. If
> I get buy-in that everything's cool, I'll start making Makefile.am
> changes in HEAD to make things build nicely.
>
I like the Makefile syntax and the am_edit part can't hardly be done better
I guess (even though I wonder why you don't put the @kdeinit_programs
as local variable instead of a global one).
What bothers me from reading the patch is that I guess you miss some
install targets for Makefiles that do not have any other _LTLIBRARIES.
For dcop this works as you have libDCOP.la, but what about e.g. kdesktop?
Greetings, Stephan
More information about the kde-core-devel
mailing list