Skip to content

Commit

Permalink
Makefile: shell fixes
Browse files Browse the repository at this point in the history
"exit -1" has traditionally had "exit 255" result, but starts to be
rejected by some shells (eg. dash, which is is the default on many
Debian systems):

 host$ bash
 $ exit -1
 exit
 host$ echo $?
 255

 host$ dash
 $ exit -1
 dash: 1: exit: Illegal number: -1
 $
 host$ echo $?
 2

Signed-off-by: Yann Dirson <yann@blade-group.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
Yann Dirson authored and jforissier committed Jul 9, 2021
1 parent 7923cf1 commit e9c8705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -12,12 +12,12 @@ clean: examples-clean prepare-for-rootfs-clean

examples:
@for example in $(EXAMPLE_LIST); do \
$(MAKE) -C $$example CROSS_COMPILE="$(HOST_CROSS_COMPILE)" || exit -1; \
$(MAKE) -C $$example CROSS_COMPILE="$(HOST_CROSS_COMPILE)" || exit 1; \
done

examples-clean:
@for example in $(EXAMPLE_LIST); do \
$(MAKE) -C $$example clean || exit -1; \
$(MAKE) -C $$example clean || exit 1; \
done

prepare-for-rootfs: examples
Expand Down

0 comments on commit e9c8705

Please sign in to comment.