[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: moc-problem / introduction
From:       Thomas Baumgart <ipwizard () users ! sourceforge ! net>
Date:       2005-04-29 18:07:27
Message-ID: 200504292007.28089 () net-bembel ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi all,

on Tuesday 26 April 2005 09:33, Stephan Kulow wrote:

> Am Montag 25 April 2005 21:18 schrieb Thomas Baumgart:
> > Hi all,
> >
> > Within our project, we try to stay as close as possible to the admin
> > directory of kdelibs (am_edit & Co).   During the last weeks, we
> > noticed some pecularities in our build system such that moc files are
> > not being re-compiled when necessary.   When scanning the archives of
> > this list, I noticed that some more people have problems with
> > moc-files so I became convinced it's a good idea to contact you.
> >
> > I traced our problem down and developed the attached patch, but don't
> > want to commit it to our repository before I don't have some comment
> > from the people who know more about it and can tell me what else I
> > brake when I use this patch. Your input is very welcome.
>
> Your idea is right, but your patch is wrong. You can't use include here
> - as that's GNU make specific. You need to reverse engineer automake
> generated files and use something like
> @AMDEP_TRUE@@am__include@
> @am__quote@./$(DEPDIR)/$mocFile.moc.Po@am__quote@
>
> Ah - and while you're at it you need of course to take in account
> .moc.cpp files that are part of libraries _and_ programs at the same
> time and make them .Plo then. 

Ok, that was exactly the kind of input I was looking for. Attached some 
updated version of the patch which takes that into account.

> There are some more joys connected to 
> am_edit, but I leave that to the interested reader to find out  ;)

-- 

Regards

Thomas Baumgart

thb@net-bembel.de               Check the KMyMoney open source
http://www.net-bembel.de/       project at http://kmymoney2.sf.net/

public key available under thb@net-bembel.de  at  http://www.keyserver.net
GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Real Programmers don't write in PL/I. PL/I is for programmers who
can't decide whether to write in COBOL or FORTRAN.
-------------------------------------------------------------

["am_edit.diff" (text/x-diff)]

--- am_edit.1.416	2005-04-24 19:50:38.000000000 +0200
+++ am_edit	2005-04-28 07:32:12.000000000 +0200
@@ -1122,10 +1122,11 @@
     
     if (@newObs) {
         my $ext =  ($program =~ /_la$/) ? ".moc.lo " : ".moc.o ";
+	my $depExt = ($program =~ /_la$/) ? ".Plo " : ".Po ";
         $realObjs{$program} .= "\034" . join ($ext, @newObs) . $ext;
         $dependmocs{$program} = join (".moc.$cxxsuffix " , @newObs) . \
".moc.$cxxsuffix";  foreach $file (@newObs) {
-            $dep_files .= " \$(DEPDIR)/$file.moc.P" if($dep_files !~/$file.moc.P/);
+            $dep_files .= " \$(DEPDIR)/$file.moc$depExt" if($dep_files \
!~/$file.moc$depExt/);  }
     }
     if (@depend) {
@@ -2250,6 +2251,8 @@
         }
         else
         {
+	    my $depExt = ($program =~ /_la$/) ? ".Plo " : ".Po ";
+	    appendLines ("\@AMDEP_TRUE\@\@am__include\@ \@am__quote\@ \
                ./\$(DEPDIR)/$mocFile.moc$depExt\@am__quote\@\n");
             appendLines ("$mocFile$mocExt: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o \
$mocFile$mocExt\n");  $cleanMoc .= " $mocFile$mocExt";
 	    appendLines ("mocs: $mocFile$mocExt\n");


[Attachment #8 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic