bug-make
[Top][All Lists]
Advanced

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

RE: Reg Make build on LINUX


From: A, Sravanthi
Subject: RE: Reg Make build on LINUX
Date: Tue, 17 Jun 2008 16:00:22 +0530

Team,

Can any one of you help to resolve this issue.
My file structure will have root make file which will call makefiles in
each subfolder. Some of the CC files which are dependant on other folder
object files are getting recompiled. 

For example 
1. Folder d1 will have a.o which is compiled from a.cc 
2. Folder d2 has b.o which is compiled from b.cc.  
3. b.o is dependant on a.o 

If any changes are done to a.cc file, b.o should get rebuilt. This is
not happeneing on LINUX. Please advise. I could see preprocessor
directives commands are checking only .h files. Let me know if you need
copy of my make files?

Thanks,
Sravanthi
-----Original Message-----
From: A, Sravanthi [CCC-OT_IT] 
Sent: Monday, June 16, 2008 6:13 PM
To: 'address@hidden'
Cc: 'address@hidden'
Subject: RE: Reg Make build on LINUX

 Smith,

One more question iam having make files in every subfolder. I cannot
give specific name for .d file. How can I append dependencies when we
have multiple levels of compiling?


Thanks,
Sravanthi
-----Original Message-----
From: A, Sravanthi [CCC-OT_IT]
Sent: Monday, June 16, 2008 6:12 PM
To: 'address@hidden'
Cc: address@hidden
Subject: RE: Reg Make build on LINUX

Smith,

Thanks , now iam able to compile. 


Regards,
Sravanthi

-----Original Message-----
From: Paul Smith [mailto:address@hidden
Sent: Monday, June 16, 2008 6:07 PM
To: A, Sravanthi [CCC-OT_IT]
Cc: address@hidden
Subject: RE: Reg Make build on LINUX

On Mon, 2008-06-16 at 18:00 +0530, A, Sravanthi wrote:
> %.o: %.c 
>         #generate the *.d file with the dependency targets. 
>         $(CC) $(CFLAGS) -MM -MP $< > $(subst .o,.d,$@) 
>         $(CC) $(CFLAGS) -c $*.c 
>         -include a.d

-include is a make command, not a shell command, so it should not start
with a TAB character (everything that starts with a TAB is passed to the
shell, not interpreted by make).

Actually, you should get a "command not found" here from the shell,
since -include is not a legal shell command.  You must have added this
line AFTER you built a.o, and never cleaned up to run from scratch.


You should check out the document on my website for auto-creating
prerequisites.  Read it carefully and it will work as advertised.  If it
doesn't work, you're not reading it carefully enough :-).

--
------------------------------------------------------------------------
-------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "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]