help-make
[Top][All Lists]
Advanced

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

Re: Why make isn't running linker


From: sharan basappa
Subject: Re: Why make isn't running linker
Date: Tue, 12 Jun 2007 14:16:22 +0000

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 <address@hidden>
Reply-To: address@hidden
To: sharan basappa <address@hidden>
CC: address@hidden
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 <address@hidden>          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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]