[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: makefile if/then/else



> 
> ARCH=$(shell dpkg --print-gnu-build-architecture)
> 
> build:
> 	ifeq ($(ARCH),i486)
> 		make linux
> 	else
> 		make linux-$(ARCH)
> 	endif
> 	touch build
> 
>   .. and I get the error:
> 
> /bin/sh: -c: line 1: syntax error near unexpected token `(i486,i386)'
> /bin/sh: -c: line 1: `ifeq (i486,i386)'
> make: *** [build] Error 2
> 
>   Why does make pass the ifeq line to a shell?

Hi.

Shell commands started with \t in the file - just your case, I guess.
To have it interpreted by "make" start them from the beginning of line

Alex Y.
-- 
   _ 
 _( )_
(     (o___           +-------------------------------------------+
 |      _ 7           |            Alexander Yukhimets            |
  \    (")            |       http://pages.nyu.edu/~aqy6633/      |
  /     \ \           +-------------------------------------------+


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: