Browse code

make: workaround for make 3.80

- if make version is 3.80* replace $(realpath ...) with our own
function (realpath is not supported in 3.80)

Andrei Pelinescu-Onciul authored on 03/04/2009 10:50:13
Showing 1 changed files
... ...
@@ -56,7 +56,7 @@ ALLDEP+=makecfg.lst
56 56
 # on some ser libs)
57 57
 
58 58
 ifneq	($(SER_LIBS),)
59
-# abspath & realpath don't seem to work on darwin
59
+# abspath & realpath don't work on make <= 3.80
60 60
 SER_LIBS_DIRS:=$(dir $(SER_LIBS))
61 61
 ifneq	(,$(filter install install% %install, $(MAKECMDGOALS)))
62 62
 lib_compile_for_install=yes
... ...
@@ -70,7 +70,14 @@ ifneq	($(LD_RPATH),)
70 70
 ifneq	(,$(filter install install% %install, $(MAKECMDGOALS)))
71 71
 SER_RPATH_LST:=$(lib_target)
72 72
 else
73
-SER_RPATH_LST:=$(realpath $(dir $(SER_LIBS)))
73
+# realpath is not supported in make 3.80 or older
74
+ifeq (,$(filter-out 3.80 3.80.%,$(MAKE_VERSION)))
75
+fullpath=$(shell cd $(1); pwd)
76
+else
77
+fullpath=$(realpath $(1))
78
+endif
79
+
80
+SER_RPATH_LST:=$(call fullpath,$(dir $(SER_LIBS)))
74 81
 endif
75 82
 ifneq	($(strip $(SER_RPATH_LST)),)
76 83
 SER_RPATH:=$(addprefix $(LD_RPATH),$(SER_RPATH_LST))