[coreboot] [patch] use CURDIR instead of PWD in Makefile

Jonathan A. Kollasch jakllsch at kollasch.net
Tue Sep 28 18:15:06 CEST 2010


As $PWD is not exported by all shells, use make-builtin $(CURDIR)
instead of $(PWD).

Signed-off-by: Jonathan Kollasch <jakllsch at kollasch.net>
---
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 5874)
+++ Makefile	(working copy)
@@ -32,7 +32,7 @@
 HOSTCXX:=$(CC_real) --hostcxx
 endif
 
-export top := $(PWD)
+export top := $(CURDIR)
 export src := src
 export srck := $(top)/util/kconfig
 export obj ?= build
@@ -196,7 +196,7 @@
 			$$(abspath $$(patsubst src/%, \
 					$(obj)/%, \
 					$$(addprefix $(dir $(1)),$$($(type)-y))))))) \
-	$(eval subdirs+=$$(subst $(PWD)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
+	$(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
 
 # For each path in $(subdirs) call includemakefiles, passing $(1) as $(3)
 # Repeat until subdirs is empty


More information about the coreboot mailing list