[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help-make Digest, Vol 80, Issue 6
From: |
CHEN Cheng |
Subject: |
Re: Help-make Digest, Vol 80, Issue 6 |
Date: |
Wed, 8 Jul 2009 17:28:23 +0800 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Wed, Jul 08, 2009 at 10:28:25AM +0800, xiangfeng shen wrote:
> Hi,
>
> I encounter a use of 'set -e' in make file shell.
> such as:
> all:
> set -e; cmd1; cmd2; cmd3
>
> Does the 'set -e' means open error for cmd chain?
I think you are right if you're using bash in make. The bash docs say:
"-e Exit immediately if a command exits with a non-zero
status."
> And does the above rule similiar with next one?
> all:
> cmd1 && cmd2 && cmd3
I ran tests as below:
$ (set -e; ls abcdefg; ls abcdefg.2; ls abcdefg.3)
stop with cmd1.
$ (ls abcdefg; ls abcdefg.2; ls abcdefg.3)
no stop.
$ (ls abcdefg && ls abcdefg.2 && ls abcdefg.3)
stop with cmd1.
So, as the results show, they're similar.