help-make
[Top][All Lists]
Advanced

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

Re: Problem generating dependency files


From: nature
Subject: Re: Problem generating dependency files
Date: Thu, 6 May 2010 02:02:05 -0700 (PDT)

Thanks for the suggestions Philip!

I got away with the problem by making use of the compiler switch "-MD" to
get the dependency files during compilation itself .
When i included this .d files, make takes lot of time to build (its almost
hung).
Even before this change ,build was slow, but after this change its worst.
I run make in the debug mode to find out where the problem is and was
surprised to see the log message.
Inspite of using VPATH to find for the source files, make searches it
elsewhere and at the end it looks into the path specified in the VPATH .

What is going wrong here? any suggestions please??

Attached is the part of my makefile and the log files.

Anil http://old.nabble.com/file/p28471045/lotus.mk lotus.mk 
http://old.nabble.com/file/p28471045/debuglog.txt debuglog.txt 


 


Philip Guenther-2 wrote:
> 
> On Wed, May 5, 2010 at 2:47 AM, nature <address@hidden> wrote:
>> I am trying to generate dependency files.
>>
>> here is a part of my makefile
>>
>> ###################Dependency file
>> generation##############################
>> #$(call make-depend,source-file,object-file,depend-file)
>> define make-depend
> ...
>> $(OBJ1):%.o:%.c
>>       address@hidden "Compling $<"
>>        $(call make-depend,$<,$@,$(subst .o,.d,$@))
>>        $(CC) -c $< -o $@
>>
>> Somehow it is unable to generate .d files. When i execute the make file,
>> it
>> throws the following error
>> : No such file or directoryh: line 1: aes.d.tmp
>> c:\WINNT\gmake.exe: *** [aes.o] Error 1
>>
>> I am unable to figure out what is causing this error..
>>
>> Can anyone help me identify the problem?
> 
> Looks to me like the main problem is complexity.  To quote Brian
> Kernighan of K&R fame: "Debugging is twice as hard as writing the code
> in the first place. Therefore, if you write the code as cleverly as
> possible, you are, by definition, not smart enough to debug it."
> 
> Step 1) figure out what commands you can *manually* invoke at the
> shell to get the desired behavior.
> 
> Step 2) make those commands work for a single file with just an
> explicit rule and no $(call)ing of macros.
> 
> Step 3) make that work with a pattern rule.
> 
> Step 4) decide whether there's some problem with the Makefile that
> requires additional changes.
> 
> 
> Philip Guenther
> 
> 
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-generating-dependency-files-tp28458755p28471045.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.





reply via email to

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