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.
This commit is contained in:
Christian Prochaska 2012-10-22 20:38:49 +02:00 committed by Norman Feske
parent 22cc867234
commit c99dd8fdf8
3 changed files with 4 additions and 5 deletions

View File

@ -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) $@

View File

@ -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)

View File

@ -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)