Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1955
  • Last Modified:

nmake IFDEF

i have a make file which contains following lines

fndef CFLAGS
CFLAGS = -MMD -O2 -Wall
endif

when i used nmake (on windows platform )  to run this makefile  , it shows error
***********************
makefile(17) : fatal error U1034: syntax error : separator missing
Stop.
***************************




0
karana
Asked:
karana
  • 5
  • 3
1 Solution
 
Infinity08Commented:
I assume that fndef is a typo, and that it actually says ifndef ?
0
 
Infinity08Commented:
>> makefile(17) : fatal error U1034: syntax error : separator missing

Which line is that ?
0
 
Infinity08Commented:
>> nmake

Ah. If I'm not mistaken, you have to use this instead :

!IFNDEF CFLAGS
CFLAGS = -MMD -O2 -Wall
!ENDIF
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
cybrexusCommented:
depends on the version of nmake but sometimes you'll need two !! with endif - so !!endif
0
 
karanaAuthor Commented:
i tried some trail and error


fndef CFLAGS:
CFLAGS = -MMD -O2 -Wall
endif:

now it shows no error ...is it correct ?


0
 
Infinity08Commented:
>> now it shows no error

Again fndef instead of ifndef.

Also, can you tell which line exactly the syntax error refers to ? (as I asked earlier)


>>  ...is it correct ?

I would think not, as the :'s at the end of the line signify labels rather than conditionals.


Did you read our suggestions ?
0
 
karanaAuthor Commented:
we tried the below

!IFNDEF CFLAGS
CFLAGS = -MMD -O2 -Wall
!ENDIF

but , it show the same error on first line .
0
 
Infinity08Commented:
Are you sure that line is in a position where it is allowed to be ? Can you show the entire makefile ?
0
 
karanaAuthor Commented:
i was wrong ....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now