bug-bash
[Top][All Lists]
Advanced

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

Re: multi line bash commands in a Makefile


From: Clark J. Wang
Subject: Re: multi line bash commands in a Makefile
Date: Sun, 10 Apr 2011 18:40:00 +0800

On Sun, Apr 10, 2011 at 6:17 PM, ali hagigat <address@hidden> wrote:

> How can i specify a multi line shell instruction as a recipe? The
> following returns an error:
>
> makefile27:
> e14:
>        @echo var1=$(var1)
>
> makefile25:
> include makefile27
> e12:
>        @echo insidee12
> makefile27: e13
>        if ( test $$count -eq 0) then echo "all: ;echo ppp" >
> makefile27;count=1;fi
>

When you test $count it's not assigned with a value yet.


> e13: ;
>
> make -f makefile25
> if ( test $count -eq 0) then echo "all: ;echo ppp" > makefile27;count=1;fi
> /bin/sh: line 0: test: -eq: unary operator expected
> var1=
>
> Why it complains about needing a unary operator?
>
>
-- 
Clark J. Wang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]