Thanks Paul. There was no unintentional TAB, but if you notice the the variable assignment objects := $(subst .c,.o,$(sources));, this is adding semicolon to objects and when it is used in rule main : main.o $(objects), an empty command is interpreted since
make treats this rule as target : prereq ; command

Your reply gave enough clue to fix this issue ..

Regards,
Sharan


From: Paul Smith <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: sharan basappa <[EMAIL PROTECTED]>
CC: [email protected]
Subject: Re: Why make isn't running linker
Date: Tue, 12 Jun 2007 09:24:51 -0400

On Tue, 2007-06-12 at 10:32 +0000, sharan basappa wrote:

> all:
> include dir1/dir1.mk
>
> objects  := $(subst .c,.o,$(sources));
>
> .PHONY : all
>
> all :  main
>
> main : main.o $(objects)

>   Must remake target `main'.
>   Successfully remade target file `main'.

This means that there IS a rule for main, maybe an explicit rule, but
the rule doesn't have any commands associated with it; put another way
it's an empty script.  Maybe you have a straggling TAB character after
the "main" rule?

--
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist

_________________________________________________________________
Catch the best matrimonial profiles in town. Visit Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to