Hi Paul, On Tue, 27 Oct 2020 at 20:25, Pali Rohár <p...@kernel.org> wrote: > > On Tuesday 27 October 2020 20:10:37 Simon Glass wrote: > > Hi Paul, > > > > On Mon, 26 Oct 2020 at 07:11, Pali Rohár <p...@kernel.org> wrote: > > > > > > On more places is used pattern 'command > $@ || rm -f $@'. But it does not > > > propagate failure from 'command' as 'rm -f' returns success. > > > > > > Fix it by calling 'false' to correctly propagate failure after 'rm -f'. > > > > > > Signed-off-by: Pali Rohár <p...@kernel.org> > > > --- > > > Makefile | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > Reviewed-by: Simon Glass <s...@chromium.org> > > > > But I'm not sure about the use of {}. I would normally use () > > ( ... ) spawns new shell and run commands in that new shell > { ... ; } groups command together and runs them in the current shell > > So { ... ; } should be more efficient as it spawns less processes. But > result should be same, return value from 'false', which returns 1. > > I'm using { ... ; } when it is not needed to spawns new processes and > running commands in current shell is fine. I think that writing ( ... ) > should be equivalent to sh -c '...' (with correctly exported variables).
OK thank you. Regards, Simon