[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multi line bash commands in a Makefile
From: |
ali hagigat |
Subject: |
Re: multi line bash commands in a Makefile |
Date: |
Sun, 10 Apr 2011 16:00:23 +0430 |
Thanks Clark for the reply. 'count' is set by shell before doing make. like
root> count=0
On Sun, Apr 10, 2011 at 3:10 PM, Clark J. Wang <dearvoid@gmail.com> wrote:
> On Sun, Apr 10, 2011 at 6:17 PM, ali hagigat <hagigatali@gmail.com> 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
>
>