[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make dependency check
From: |
Paul D. Smith |
Subject: |
Re: Make dependency check |
Date: |
Tue, 21 Nov 2006 09:13:54 -0500 |
On Tuesday, 21 November, Geraldin Arthy (address@hidden) wrote:
> I can use the gcc dependency option but the problem is we will be using the
> same makefile for both linux as well as Solaris.And in Solaris for our code
> we use the CC compiler and not gcc.That is the reason why I have to
> definitely use the makedepend option.
OK but... as you've discovered, makedepend is an old, out-of-date
application. It doesn't grok C++ headers, for example, and its ideas of what
is legal and not legal are old-fashioned.
> For example when I see the COvBucket.P, I find the lines below.
> COvBucket.o: COvBucket.h ../pdfcommon/src/PdfType.h
> COvBucket.o: ../pdfcommon/src/CPdfObject.h ../pdfcommon/src/CPdfTrace.h
>
> But when I modify the ../pdfcommon/src/CPdfTrace.h header file and give a
> make again it does not rebuild the dependencies.
That's because your .P files are wrong. Your rule to build .o's is:
$(OBJS):$(OUTPUT_DIR)/%.o: %.cxx
...
which means your target .o's are things like $(OUTPUT_DIR)/COvBucket.o.
But, your .P files list targets like this:
COvBucket.o:
with no $(OUTPUT_DIR). There's absolutely no way make can know that you
intend these targets to refer to the same file; in fact make knows that they
are NOT the same file. So, prerequisites listed for COvBucket.o will have no
relevance to make when it wants to build $(OUTPUT_DIR)/COvBucket.o.
You need to fix up your script that generates the .P files to add in the
$(OUTPUT_DIR)/ prefix to the target .o's.
Then it will work.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- Re: Make dependency check, Geraldin Arthy, 2006/11/21
- Re: Make dependency check,
Paul D. Smith <=
- Re: Make dependency check, Geraldin Arthy, 2006/11/22
- Re: Make dependency check, Paul D. Smith, 2006/11/22
- Re: Make dependency check, Geraldin Arthy, 2006/11/24
- Re: Make dependency check, Paul D. Smith, 2006/11/24
- Re: Make dependency check, Philip Guenther, 2006/11/24
- Re: Make dependency check, Paul D. Smith, 2006/11/25
- Re: Make dependency check, Philip Guenther, 2006/11/25
- Re: Make dependency check, Geraldin Arthy, 2006/11/24
- Re: Make dependency check, Dave Hylands, 2006/11/24