summaryrefslogtreecommitdiff
path: root/include.mk
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-05-20 03:38:28 +0000
committerChristian Pointner <equinox@spreadspace.org>2012-05-20 03:38:28 +0000
commit4c01eb7ed99e976545e892173e0a11fb43a4b9bd (patch)
treeeb61dafa847de4ec2ed0acc13e2d844e4b857107 /include.mk
parentadded reset func capability (diff)
gracefully ignore nonexisting or nonexecutable reset_func
git-svn-id: https://svn.spreadspace.org/avr/trunk@18 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'include.mk')
-rw-r--r--include.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/include.mk b/include.mk
index ca126b4..8542449 100644
--- a/include.mk
+++ b/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