[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Dependencies and clean
From: |
Paul D. Smith |
Subject: |
RE: Dependencies and clean |
Date: |
Tue, 9 Jul 2002 15:53:57 -0400 |
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