[PATCH 3/6] make: check for greadlink first, fall back to readlink
Dirk Hörner
dirker at gmail.com
Mon Jun 4 16:40:16 EDT 2012
OS X' readlink does not have an -f option.
Signed-off-by: Dirk Hörner <dirker at gmail.com>
---
common/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common/Makefile b/common/Makefile
index 9c14d7b..48cf715 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -48,7 +48,9 @@ ifneq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
endif
-ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f '{}' \;; done)
+READLINK := $(shell command -v greadlink || echo readlink)
+
+ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec $(READLINK) -f '{}' \;; done)
endif # ifdef CONFIG_DEFAULT_ENVIRONMENT
--
1.7.10.3
More information about the barebox
mailing list