[MPlayer-dev-eng] gcc -MM bug?

Ivo ivop at euronet.nl
Mon May 15 20:21:23 CEST 2006


On Sunday 14 May 2006 23:23, Arpi wrote:
> any ideas? is it a known gcc bug, a feature or what? workarounds?

I recently noticed the same odd behaviour of gcc -MM so I decided to switch 
to makedepend (from X11).

makedepend -f- -- -Y $(CFLAGS) -- libvo/aclib.c 2>/dev/null

works as expected.

Except for one _very_ annoying bug in makedepend. If it searches for 
"somefile.h" that has to be included, it does not look in the directory 
where the sourcefile resides first, but instead it looks in the directory 
from which makedepend was called. For most things, that works fine, but it 
is not what a decent cpp would do and its output is plain wrong when both 
the rootdir and the subdir contain a header-file with the same name. For 
example, libaf/af_sweep.c :

libaf/af_sweep.o: config.h libaf/af.h libaf/af_mp.h mp_msg.h cpudetect.h
libaf/af_sweep.o: libaf/control.h libaf/af_format.h

af_sweep.c includes both "config.h" (which is libaf/config.h) and 
"../config.h" (which is config.h) but makedepend fails to see the 
difference.

--Ivo




More information about the MPlayer-dev-eng mailing list