kde-common am_edit problems

Helge Deller deller at gmx.de
Fri Mar 25 11:33:31 GMT 2005


On Friday 25 March 2005 11:14, Michael Buesch wrote:
> Hi,
> 
> I have a Makefile.am, which does something like that:
> (I cut it down to the interresting parts)
> 
> 
> noinst_LTLIBRARIES = libpwmanager_smartkey.la
> 
> INCLUDES = -I$(srcdir)/../.. $(all_includes)
> 
> if COND_PWMANAGER_CHIPCARD1
> CHIPCARD_INTERFACE=chipcard1interface.cpp
> endif
> if COND_PWMANAGER_CHIPCARD2
> CHIPCARD_INTERFACE=chipcard2interface.cpp
> endif
> 
> libpwmanager_smartkey_la_SOURCES = smartkey.cpp \
> 				   smartkey_backend.cpp \
> 				   $(CHIPCARD_INTERFACE)
> 
> noinst_HEADERS = chipcard1interface.h \
> 		 chipcard2interface.h \
> 		 smartkey.h \
> 		 smartkey_backend.h
> 
> METASOURCES = AUTO
> 
> 
> My problem is, that metasources (.moc) rules are not generated
> by am_edit. This results in build failure, obviously.
> 
> If I do the following patch to am_edit, it works
> and .moc files are generated properly.
> 
> Index: am_edit
> ===================================================================
> RCS file: /home/kde/kde-common/admin/am_edit,v
> retrieving revision 1.414
> diff -u -p -r1.414 am_edit
> --- am_edit     1 Mar 2005 18:43:12 -0000       1.414
> +++ am_edit     25 Mar 2005 10:11:32 -0000
> @@ -636,7 +636,7 @@ sub initialise ()
>                     my @addlist = split(/[\034\s]+/, $varcontent{$variable});
>                     push(@objlist, @addlist);
>                  } elsif ($variable !~ 'OBJEXT') {
> -                    $ocv = 1;
> +#                    $ocv = 1;
>                 }
>              }
>          }
> 
> 
> I see that this is not the correct solution. How to fix this correctly?
> 
> The string in the Makefile.in, which is parsed here looks like this:
> 
> @COND_PWMANAGER_CHIPCARD1_FALSE@@COND_PWMANAGER_CHIPCARD2_TRUE at am__objects_1 = chipcard2interface.lo
> @COND_PWMANAGER_CHIPCARD1_TRUE at am__objects_1 = chipcard1interface.lo
> am_libpwmanager_smartkey_la_OBJECTS = smartkey.lo smartkey_backend.lo \
> 	$(am__objects_1)

BTW, I ran into the same problem as you.
I worked around that by adding "SUBDIRS = ." to the Makefile.am, but that's not the correct solution either.

Interestingly this bug happens with automake, but not with unsermake...

Helge




More information about the kde-core-devel mailing list