Hello Paul,

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.

Now I have modified my makefile according to what is given in the below
link.
http://make.paulandlesley.org/autodep.html#norule

I can see now .P files created in the source directory like what is given
below.I can also see
*.d.bak files about which I do not have any idea why these files are being
generated.


total 192
-r--r--r--  1 geraldin users   736 2006-11-16 15:13 Makefile.rules
-r--r--r--  1 geraldin users  2901 2006-11-21 11:22 COvBucket.h
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46 COvBucket.d.bak
-rw-r--r--  1 geraldin users  1540 2006-11-21 11:46 COvBucket.P
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46 COvBucketManager.d.bak
-rw-r--r--  1 geraldin users  1963 2006-11-21 11:46 COvBucketManager.P
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46
COvGlobalOverloadController.d.bak
-rw-r--r--  1 geraldin users  3043 2006-11-21 11:46
COvGlobalOverloadController.P
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46 COvOverloadConfig.d.bak
-rw-r--r--  1 geraldin users 23171 2006-11-21 11:46 COvOverloadConfig.P
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46
COvOverloadController.d.bak
-rw-r--r--  1 geraldin users  2304 2006-11-21 11:46 COvOverloadController.P
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46 COvOverloadManager.d.bak
-rw-r--r--  1 geraldin users  3249 2006-11-21 11:46 COvOverloadManager.P
-rw-r--r--  1 geraldin users     0 2006-11-21 11:46 COvOverloadMsg.d.bak
-rw-r--r--  1 geraldin users  1827 2006-11-21 11:46 COvOverloadMsg.P
-r--r--r--  1 geraldin users  4826 2006-11-21 11:51 Makefile


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.

Currently I'm testing makedepend on a linux machine.But we use the same
makefile for Solaris also.

In my linux machine , makedepend utility is found under /usr/X11R6/bin.

If I give a make --version , the version is
*GNU Make 3.80
*Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.

And gcc version is
*gcc (GCC) 3.3.3 (SuSE Linux)
*Copyright (C) 2003 Free Software Foundation, Inc.


Could you please tell me what is wrong.??


Thanks in advance,
GA

On 11/20/06, Paul D. Smith <[EMAIL PROTECTED]> wrote:

On Monday, 20 November, Geraldin Arthy ([EMAIL PROTECTED]) wrote:

> $(OBJS):$(OUTPUT_DIR)/%.o: %.cxx
>         @makedepend -f - $< | sed 's,($*.o)[ :]*(.*),$@ : $$(wildcard
2)n1 :
> 2,g' > $*.d

That sed command looks very wrong to me.  Shouldn't you have backslashes
before the "2" and "1"; aren't you trying to reference the () ?

You should look at what gets generated by this command and see if it makes
any
sense.  In any event, you should provide a sample output of this command
when
you ask for help (use the mailing list please).  The entire problem here
is
that makedepend is not generating the correct dependency information, so
if
you don't including what it generates in your question there's not much
help
we can give you.

Also, since you're using GCC, why not take advantage of GCC's features for
generating dependency information and throw out makedepend completely?

> makedepend: warning:  COvBucketManager.h:  non-portable whitespace
> encountered at line 203
> makedepend: warning:  COvBucketManager.h :  non-portable whitespace
> encountered at line 205
> makedepend: warning:  COvOverloadConfig.cxx, line 32: cannot find
include
> file "CCoThreadPoolManager.h"

Looks like makedepend is not liking your code.  Maybe the output is wrong.

--

-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]>          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

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to