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: '[EMAIL PROTECTED]' Cc: [email protected] Subject: RE: Reg Make build on LINUX Smith, Thanks , now iam able to compile. Regards, Sravanthi -----Original Message----- From: Paul Smith [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2008 6:07 PM To: A, Sravanthi [CCC-OT_IT] Cc: [email protected] 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 <[EMAIL PROTECTED]> 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 _______________________________________________ Bug-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-make
