[Top][All Lists]

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

RE: Reg Make build on LINUX

From: Paul Smith
Subject: RE: Reg Make build on LINUX
Date: Mon, 16 Jun 2008 08:37:01 -0400

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]