From 49cca1da1161ce909c1d28a95a7e48084cdfc871 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 5 Jul 2012 13:59:12 -0500 Subject: [PATCH] Less shell-based implementation of dir_if_exists --- arduino-mk/Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index e8c5f56..4a020bc 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -244,11 +244,11 @@ # ######################################################################## -dir_if_exists = $(shell test -e $(1)$(2) && echo $(1) || true) # Useful functions # Returns the first argument (typically a directory), if the file or directory # named by concatenating the first and optionally second argument # (directory and optional filename) exists +dir_if_exists = $(if $(wildcard $(1)$(2)),$(1)) # For message printing: pad the right side of the first argument with spaces to # the number of bytes indicated by the second argument.