changeset 251:f3fcee0067eb

improved portability of the Makefile by avoiding $(lastword ...)
author Volker Grabsch <vog@notjusthosting.com>
date Sat, 28 Feb 2009 12:33:58 +0100
parents a216acad3492
children c8a54b28a3ce
files Makefile
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Feb 28 05:54:26 2009 +0100
+++ b/Makefile	Sat Feb 28 12:33:58 2009 +0100
@@ -9,7 +9,7 @@
 PREFIX  := $(PWD)/usr
 PKG_DIR := $(PWD)/pkg
 TMP_DIR  = $(PWD)/tmp-$(1)
-TOP_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+TOP_DIR := $(patsubst %/,%,$(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))))
 PATH    := $(PREFIX)/bin:$(PATH)
 SHELL   := bash
 SED     := $(shell gsed --version >/dev/null 2>&1 && echo g)sed