Game Development Community

.d Files in the makefile's

by James Urquhart · in Torque Game Engine · 02/21/2004 (9:28 am) · 2 replies

Hi there,

Whenever i compile my copy of torque, i get a horde of annoying .d files in my engine/ and lib/ directories.
However, i feel they would be better suited in the out.* directories, since the dependancies for the various .cc files could change when changing build targets.

Does anyone have any idea how i could modify this behaviour?

#1
02/21/2004 (9:46 am)
I assume you are using an older version of gcc (2.9.5 or something). This problem was fixed in gcc versions 2.9.6 and later. I don't know of any way to get that old version of the compiler to stick the files in the out directory.

You can remove the -MD option in conf.UNIX.mk, and it will no longer generate the files (because they are in the wrong location, I don't think they are properly included anyway). But I suggest you upgrade your compiler. The dependency tracking provided by those files is essential doing clean builds after making incremental changes.

It isn't too hard to upgrade gcc. Your distribution might have a newer gcc package available. Otherwise you can download it from gcc.gnu.org/, compile it from source, and install it in your /usr/local directory so that it doesn't interfere with your system compiler.
#2
02/21/2004 (10:08 am)
John,

I am using GCC 3.3.3
Very odd....
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs
Configured with: /var/tmp/portage/gcc-3.3.3/work/gcc-3.3.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib --with-x --disable-multilib
Thread model: posix
gcc version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7)

Ah... i think i figured out the problem.
I am using distcc and ccache to compile torque.
It appears that when i have ccache or distcc on the PATH, the .d files mysteriously appear in the wrong places.