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.
************************** *
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.
**************************
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 ?
Which line is that ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
depends on the version of nmake but sometimes you'll need two !! with endif - so !!endif
ASKER
i tried some trail and error
fndef CFLAGS:
CFLAGS = -MMD -O2 -Wall
endif:
now it shows no error ...is it correct ?
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 ?
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 ?
ASKER
we tried the below
!IFNDEF CFLAGS
CFLAGS = -MMD -O2 -Wall
!ENDIF
but , it show the same error on first line .
!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 ?
ASKER
i was wrong ....