Module: sip-router Branch: ser_core_cvs Commit: a52cbf0afc214b21726082ce3cbb97db3a94d0cd URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a52cbf0a...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Fri Apr 3 10:50:13 2009 +0000
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)
---
Makefile.rules | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Makefile.rules b/Makefile.rules index af51b08..665fcf7 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -56,7 +56,7 @@ ALLDEP+=makecfg.lst # on some ser libs)
ifneq ($(SER_LIBS),) -# abspath & realpath don't seem to work on darwin +# abspath & realpath don't work on make <= 3.80 SER_LIBS_DIRS:=$(dir $(SER_LIBS)) ifneq (,$(filter install install% %install, $(MAKECMDGOALS))) lib_compile_for_install=yes @@ -70,7 +70,14 @@ ifneq ($(LD_RPATH),) ifneq (,$(filter install install% %install, $(MAKECMDGOALS))) SER_RPATH_LST:=$(lib_target) else -SER_RPATH_LST:=$(realpath $(dir $(SER_LIBS))) +# realpath is not supported in make 3.80 or older +ifeq (,$(filter-out 3.80 3.80.%,$(MAKE_VERSION))) +fullpath=$(shell cd $(1); pwd) +else +fullpath=$(realpath $(1)) +endif + +SER_RPATH_LST:=$(call fullpath,$(dir $(SER_LIBS))) endif ifneq ($(strip $(SER_RPATH_LST)),) SER_RPATH:=$(addprefix $(LD_RPATH),$(SER_RPATH_LST))