Link to home
Start Free TrialLog in
Avatar of karana
karana

asked on

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




Avatar of Infinity08
Infinity08
Flag of Belgium image

I assume that fndef is a typo, and that it actually says ifndef ?
>> makefile(17) : fatal error U1034: syntax error : separator missing

Which line is that ?
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
depends on the version of nmake but sometimes you'll need two !! with endif - so !!endif
Avatar of karana
karana

ASKER

i tried some trail and error


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

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


>> 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 ?
Avatar of karana

ASKER

we tried the below

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

but , it show the same error on first line .
Are you sure that line is in a position where it is allowed to be ? Can you show the entire makefile ?
Avatar of karana

ASKER

i was wrong ....