From 4eb4b1ad28810da9c5f0891a876329bc7dd2bfe6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 20 May 2012 03:39:04 +0000 Subject: gracefully ignore nonexisting or nonexecutable reset_func git-svn-id: https://svn.spreadspace.org/mur.sat@455 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/avr.include.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'software') diff --git a/software/avr.include.mk b/software/avr.include.mk index ca126b4..8542449 100644 --- a/software/avr.include.mk +++ b/software/avr.include.mk @@ -166,4 +166,10 @@ run: $(call $(PROG)/$@,) reset: - @$(RESET_FUNC) + @if [ -n "$(RESET_FUNC)" ]; then \ + if [ -x "$(RESET_FUNC)" ]; then \ + "$(RESET_FUNC)"; \ + else \ + echo "WARNING: ignoring non-existing or non-executable reset script"; \ + fi \ + fi -- cgit v1.2.3