make-w32
[Top][All Lists]
Advanced

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

Re: Help required in gnumake


From: Paul D. Smith
Subject: Re: Help required in gnumake
Date: Tue, 5 Aug 2003 12:35:09 -0400

%% beginner beginner <address@hidden> writes:

  bb>    Thanks I got the probelm of Space and TAB.      
  bb> As per http://www.gnu.org/manual/make-3.77/html_chapter/make_16.html It 
says 
  bb> for error `commands commence before first target. Stop.'

  bb> " This means the first thing in the makefile seems to be part of a
  bb> command script: it begins with a TAB character and doesn't appear
  bb> to be a legal make command (such as a variable
  bb> assignment). Command scripts must always be associated with a
  bb> target. The second form is generated if the line has a semicolon
  bb> as the first non-whitespace character; make interprets this to
  bb> mean you left out the "target: dependency" section of a rule.  "

Exactly.

  bb> Now if I type OFFICIAL = 10 after TAB it works
  bb> but if I type echo after TAB it does not work 

This means, just as the manual says, your makefile contains a command
script (the echo) _before_ you've defined a target that the command
script should apply to.

OFFICIAL = 10 is interpreted as a make variable setting, not a command
string, in this situation so it doesn't elicit an error.

  bb> Please help.

If you still don't understand, post a small example makefile that fails
and we'll show you what's wrong with it.

-- 
-------------------------------------------------------------------------------
 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




reply via email to

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