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

List:       kde
Subject:    Errors in Makefiles
From:       Santiago Burbano Baselga <santib () mtservicios ! com>
Date:       1999-04-29 18:35:30
[Download RAW message or body]

Hi

I have a problem with the Makefiles that automake builds for the CVS
version of KDE.

The problem is that .moc files do not get built before the implementations they
define, what gives a compilation error because files are not found.

Hacking in the Makefiles I found that the rules that should build them are
always like the following (this one comes from kdelibs/kdecore): 

srcdir=../././kdecore
     .
     .
     .
$(srcdir)/drag.cpp: drag.moc
drag.moc: $(srcdir)/drag.h
          $(MOC) $(srcdir)/drag.h -o drag.moc

Apparently, make doesn't see that $(srcdir)/drag.cpp and ./drag.cpp are the
same file and doesn't see the dependence between ./drag.cpp and ./drag.moc. So,
make doesn't build drag.moc and, when drag.cpp tries to #include
"drag.moc", you get an error.

Just taking away the '$(srcdir)' in the first rule solves the problem and you
can get everything compiled. But, every time you update the sources, you have to
rebuild the Makefiles so it comes back to the error.

Please, could somebody modify the rules for the generation of Makefiles so this
'$(srcdir)' thing is not there anymore?

BTW, I have GNU make version 3.77 on Linux Debian with kerner 2.2.0

Regards

Santiago
-- 
Send posts to:  kde@lists.netcentral.net
 Send all commands to:  kde-request@lists.netcentral.net
  Put your command in the SUBJECT of the message:
   "subscribe", "unsubscribe", "set digest on", or "set digest off"
PLEASE READ THE ARCHIVED MESSAGES AT http://lists.kde.org/ BEFORE POSTING
**********************************************************************
This list is from your pals at NetCentral <http://www.netcentral.net/>

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

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