Bug 28045

Summary: [patch] makedepend fails on directory named like an include file
Product: xorg Reporter: Martin Pärtel <lagitus>
Component: Build/ModularAssignee: Alan Coopersmith <alan.coopersmith>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: trivial    
Priority: medium Keywords: patch
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
A patch to fix the problem
none
A testcase none

Description Martin Pärtel 2010-05-09 15:27:03 UTC
Created attachment 35532 [details] [review]
A patch to fix the problem

I'm using makedepend in building a C++ project using Qt.
Qt needs -I/usr/include/qt4 -I/usr/include/qt4/QtCore, but there is also a _file_ /usr/include/qt4/QtCore/QtCore.

makedepend fails as it tries to read the directory when it should keep looking for the file.

Switching the include paths around happens to be a (troublesome) workaround.

This is an obscure little problem that will probably never impact X.org, but other people do occasionally use makedepend, so why not fix it.
Comment 1 Martin Pärtel 2010-05-09 15:28:18 UTC
Created attachment 35533 [details]
A testcase
Comment 2 Alan Coopersmith 2010-05-14 21:23:38 UTC
Thanks for the patch - I've submitted it to the xorg-devel mailing list for
review, along with modifying the testcase to fit into automake's "make check"
so we catch regressions in the future.
Comment 3 Alan Coopersmith 2010-05-18 16:11:09 UTC
Pushed to git master.:

 Makefile.am            |   20 ++++++++++++++++++++
 include.c              |    6 +++---
 tests/28045/foo.cpp    |    2 ++
 tests/28045/makedep.sh |   28 ++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+), 3 deletions(-)

New commits:
commit 58bd34e6c3662ef06e9ef0dd78d69f003df42bdc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri May 14 21:14:44 2010 -0700

    Convert testcase from bug 28045 into automake "make check" test
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 8522c314da7537169996476fe5ba411f720a09fe
Author: Martin Pärtel <lagitus@mbnet.fi>
Date:   Fri May 14 21:00:15 2010 -0700

    Bug 28045 - makedepend fails on directory named like an include file
    
    <https://bugs.freedesktop.org/show_bug.cgi?id=28045>
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Comment 4 Alan Coopersmith 2010-10-29 22:52:06 UTC
The X.Org makedepend-1.0.3 release has now been published with this fix:
http://lists.freedesktop.org/archives/xorg-announce/2010-October/001472.html

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.