Package: xutils-dev
Version: 1:7.4+3
Severity: important

If you let makedepend generate dependencies for multiple .c files in
different directories, and two of them do

  #include "foo.h"

and expect that to mean the foo.h which is in the same directory as
the source file, makedepend will pick one of the foo.h files (and
whatever it includes) and apply as dependencies to both .c files.

To see the problem, do:

mkdir a b
echo '#include "foo.h"' > a/foo.c
echo '#include "foo.h"' > b/foo.c
echo '#include <stdlib.h>' > a/foo.h
echo '#include <stdlib.h>' > b/foo.h
makedepend -f - ?/foo.c

You will see among other things these two dependencies:
a/foo.o: a/foo.h
b/foo.o: a/foo.h # incorrect; should be b/foo.h

This bug seems to exist in all makedepends I have tried. I suppose it
comes from the optimizations mentioned in the manual page. I really
don't like it, because it will silently generate Makefiles with bogus
dependency graphs in them for what (to me at least) looks like pretty
normal source code. Such Makefiles are dangerous -- especially when
you trust them, because you let the standard tool makedepend generate
them.

If it cannot be fixed, this bug should be mentioned in the makedepend(1)
man page.

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.31.4
Locale: LANG=sv_SE, LC_CTYPE=sv_SE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages xutils-dev depends on:
ii  cpp                         4:4.3.2-2    The GNU C preprocessor (cpp)
ii  libc6                       2.7-18lenny2 GNU C Library: Shared libraries
ii  x11-common                  1:7.3+20     X Window System (X.Org) infrastruc

xutils-dev recommends no packages.

xutils-dev suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to