From c99dd8fdf85370cd3266cabb664f0a88bfef7961 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Mon, 22 Oct 2012 20:38:49 +0200 Subject: [PATCH] Use 'CURDIR' make variable in Genode make files The bash-builtin 'pwd' command uses the 'st_dev' and 'st_ino' members of the 'stat' struct to compare the path from the 'PWD' environment variable with the path returned by 'getcwd()'. These members don't get set correctly in Noux and therefore the 'pwd' command sometimes returns wrong results when building Genode in Noux. With this patch the 'CURDIR' make variable gets used instead of calling 'pwd'. Fixes #454. --- base/mk/lib.mk | 2 +- base/mk/prg.mk | 2 +- tool/builddir/build.mk | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/base/mk/lib.mk b/base/mk/lib.mk index bbcd34b42d..e22fe8a77c 100644 --- a/base/mk/lib.mk +++ b/base/mk/lib.mk @@ -174,5 +174,5 @@ $(LIB_SO): $(STATIC_LIBS) $(OBJECTS) $(wildcard $(LD_SCRIPT_SO)) $(LIBGCC) $(INSTALL_SO): - $(VERBOSE)ln -sf `pwd`/$(LIB_SO) $@ + $(VERBOSE)ln -sf $(CURDIR)/$(LIB_SO) $@ diff --git a/base/mk/prg.mk b/base/mk/prg.mk index e2faa0de88..40a512da5e 100644 --- a/base/mk/prg.mk +++ b/base/mk/prg.mk @@ -190,7 +190,7 @@ $(TARGET): $(LINK_ITEMS) $(wildcard $(LD_SCRIPTS)) $(VERBOSE)libs=$(LIB_CACHE_DIR); $(LD_CMD) -o $@ $(INSTALL_DIR)/$(TARGET): $(TARGET) - $(VERBOSE)ln -sf `pwd`/$(TARGET) $@ + $(VERBOSE)ln -sf $(CURDIR)/$(TARGET) $@ else $(TARGET): $(INSTALL_DIR)/$(TARGET): $(TARGET) diff --git a/tool/builddir/build.mk b/tool/builddir/build.mk index ab93a86dd6..567e44fe19 100644 --- a/tool/builddir/build.mk +++ b/tool/builddir/build.mk @@ -37,9 +37,8 @@ -include etc/build.conf -PWD := $(shell pwd) -BUILD_BASE_DIR := $(PWD) -INSTALL_DIR := $(PWD)/bin +BUILD_BASE_DIR := $(CURDIR) +INSTALL_DIR := $(CURDIR)/bin export BASE_DIR ?= ../base export REPOSITORIES ?= $(BASE_DIR:%base=%base-linux) $(BASE_DIR)