View Single Post
  #7   (View Single Post)  
Old 23rd January 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,597
Default

RE: "Malformed conditional". The following, done on OpenBSD, explains this error
Code:
# cat -n Makefile ; make 
     1  #OPSYS = IRIX
     2  
     3  .if ( ${OPSYS} == "IRIX" )
     4  message:
     5          @echo Yes the operating system is IRIX!
     6  .endif
     7  
"Makefile", line 3: Malformed conditional (( ${OPSYS} == "IRIX" ))
"Makefile", line 3: Missing dependency operator
"Makefile", line 6: if-less endif
"Makefile", line 6: Need an operator
Fatal errors encountered -- cannot continue
Removal of the comment indicator '#' from line 1 and thus having a variable OPSYS defined, there is no error at all
Code:
$ cat -n Makefile ; make 
     1  OPSYS = IRIX
     2  
     3  .if ( ${OPSYS} == "IRIX" )
     4  message:
     5          @echo Yes the operating system is IRIX!
     6  .endif
     7 
 
Yes the operating system is IRIX!
RE: "need an operator" error

A more common cause for the "need an operator" message is using a spaces instead of the required tab in the shell command line (here lines 2-3):
Code:
$ cat -nt Makefile                  
     1  message: 
     2  ^I@echo "Yes the operating system is IRIX!"
     3  ^I@echo "===" 
     4  
Yes the operating system is IRIX!
===
Here the required tabs displayed as '^I', short for CONTROL-I, are present. An expansion of this tab into spaces, for instance caused by a cut and paste operation, produces the "need an operator" error:
Code:
$ cat -nt Makefile ; make           
     1  message: 
     2          @echo "Yes the operating system is IRIX!"
     3          @echo "===" 
     4  
"Makefile", line 3: Need an operator
Fatal errors encountered -- cannot continue
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote