make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Dependencies and clean


From: BShah
Subject: RE: Dependencies and clean
Date: Wed, 10 Jul 2002 10:04:47 +0100

The particular compiler I am using at the moment generates something similar
to gcc -MD but with full pathnames. The processing is minimal to get this
into useful format, and a little more to make it human readable however

We tend to use python here to process text - perl makes me wince!

Thanks for the help - this is a much better autodependency generator than
the original approach. I hope it makes it into the next version of the
manual.

Thanks,
B.

-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: 09 July 2002 20:54
To: address@hidden
Cc: address@hidden
Subject: RE: Dependencies and clean


I should add this example to the document, but basically the output of
the gcc -MD option looks like this:

foo.o: foo.c foo.h bar.h \
 baz.h boz.h biz.h \
 bonk.h blank.h tank.h

or whatever.  You want to translate that into:

foo.o: foo.c foo.h bar.h \
 baz.h boz.h biz.h \
 bonk.h blank.h tank.h
foo.c:
foo.h:
bar.h:
baz.h:
boz.h:
biz.h:
bonk.h:
blank.h:
tank.h:


That is, take each prerequisite and make it a target.

You're correct that this assumes normal UNIX pathnames which typically
don't contain ":".  If you wanted to do this on a box that used
DOS-style paths with drive letters you will likely need a more complex
translator.  It may be time to whip out your Perl or something...

-- 
----------------------------------------------------------------------------
---
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad
Scientist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]