This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/15462] New: -M writes the filename without full path
- From: "msharov at talentg dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2004 13:42:48 -0000
- Subject: [Bug preprocessor/15462] New: -M writes the filename without full path
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I have several subdirectories in my project and build files for it using the
full path name. The makefile generates automatic dependencies using -M thus:
> c++ -I ~/include -M core/address.cc
address.o: core/address.cc core/address.h
/home/msharov/include/ustl.h \
/home/msharov/include/ustl/uspecial.h \
/home/msharov/include/ustl/memblock.h \
/home/msharov/include/ustl/memlink.h \
/home/msharov/include/ustl/cmemlink.h
and so forth. The problem is that the target name - address.o - is written
without the path, so the dependencies end up being for ./address.o rather than
core/address.o, which means that make never rebuilds the files in the
subdirectories. While I suppose it is possible to have the subdirectories as
subprojects generating .a packages which are then linked together as a
workaround, -M really should include the full path name for the target.
--
Summary: -M writes the filename without full path
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: msharov at talentg dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: athlon-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15462