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: Wed, 6 Aug 2003 08:14:01 -0400

%% beginner beginner <address@hidden> writes:

  bb> Here is the code snippet
  bb> %.obj: %.c                                   
  bb>       @echo Start building    <<<It works>>>>

This is a command script associated with the pattern rule for %.obj, so
it's fine.

  bb> ifeq ($(DEF_OBJDIR),)
  bb>       @echo Set the value <<<<<<<This echo works fine>>>>>>>

This one is also associated with the pattern rule for %.obj.

  bb> DEF_OBJDIR=$(OBJDIR)

This is a make variable setting: because you have started another make
operation (variable setting or rule specification), that is the _END_ of
the previous one (the pattern rule for %.obj).  Nothing after this line
will be considered part of the command script for %.obj.

  bb> endif
  bb> ######################################################################
  bb> # Set the DEF_OBJDIR as ..\obj <<<<Can you let me know how to check this 
value>>>>

I don't know what you're trying to say here.

  bb> #######################################################################
  bb> ifneq ($(DEF_OBJDIR),$(OBJDIR_UNOPT))
  bb> ifneq ($(MCC_FLAGS),)
  bb>       @echo test

This line is not associated with any target, so it's a syntax error.

  bb> DEF_CC_FLAGS=$(MCC_FLAGS)
  bb> else                     <<<<My Test comes here>>>>>
  bb>       @echo test       <<<<It should print this but give me warning that 
*** commands commence before first target.  Stop.>>>>>>>>

Likewise, this line is not associated with any target, so it's a syntax
error.

  bb> DEF_CC_FLAGS=$(CC_FLAGS)
  bb> endif

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