make bug?

W. Tasin tasin at fhm.edu
Thu Feb 21 19:08:03 UTC 2002


Hi,

after some tests with building projects with ui-files I found a problem 
and I don't know how to handle this correctly.

KDevelop uses a configure-call with the complete path, e.g.:
~/project/testkcm/configure --prefix=/opt/kde2 --with-qt-dir=/usr/lib/qt2

after that the created testkcm/Makefile contains:
---
...
SHELL = /bin/sh

srcdir = /home/tasin/project/testkcm/testkcm
top_srcdir = /home/tasin/project/testkcm
VPATH = /home/tasin/project/testkcm/testkcm
prefix = /opt/kde2
...
#>+ 3
kde-rpo-clean:
        -rm -f *.rpo

#>+ 2
$(srcdir)/testkcm.cpp: testkcm.moc
---

Now the problem:
If there are no .dep files make will complain with

g++ -DHAVE_CONFIG_H -I. -I/home/tasin/project/testkcm/testkcm -I.. 
-I/opt/kde2/include -I/usr/lib/qt2/include -I/usr/X11R6/include 
-D_REENTRANT -O2 -fno-exceptions -fno-check-new -Wp,-MD,.deps/testkcm.pp 
-c testkcm.cpp  -fPIC -DPIC -o .libs/testkcm.o
testkcm.cpp:75: testkcm.moc: No such file or directory
make[2]: *** [testkcm.lo] Error 1
make[2]: Leaving directory `/home/tasin/project/testkcm/testkcm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tasin/project/testkcm'
make: *** [all-recursive-am] Error 2

the last rule, which contains the dependency between testkcm.moc and 
$(srcdir)/testkcm.cpp will not be recognised.
If I change srcdir= to a relative path like "." all works fine.

So my questions:
Is it wrong to call configure with an absolute path? Is it a bug inside 
make, because if srcdir and builddir differs it seems to work fine?

Ciao

Walter

-- 
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W._Tasin,_FB_04,_FHM-------------------PGP-KeyID:0x7961A645---:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>






More information about the KDevelop-devel mailing list