public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/15462] New: -M writes the filename without full path
@ 2004-05-16 13:32 msharov at talentg dot com
  2004-05-16 18:33 ` [Bug preprocessor/15462] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: msharov at talentg dot com @ 2004-05-16 13:32 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug preprocessor/15462] -M writes the filename without full path
  2004-05-16 13:32 [Bug preprocessor/15462] New: -M writes the filename without full path msharov at talentg dot com
@ 2004-05-16 18:33 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-16 18:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-15 16:13 -------
Invalid as if you compiled with -c it would output address.o and not core/address.o, you have to supply 
-MQ core/address.o to get the right path.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15462


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-15 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-16 13:32 [Bug preprocessor/15462] New: -M writes the filename without full path msharov at talentg dot com
2004-05-16 18:33 ` [Bug preprocessor/15462] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).