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: Mon, 16 Jun 2008 18:13:20 +0530

 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]