diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2010-09-27 17:22:04 -0700 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-09-28 09:47:14 +0300 |
commit | 351ac23f8d468b2b9bc60dfcbaacbe3d55ec11f9 (patch) | |
tree | 09a0ecf04b8f2d7c7366ca451454a5d50dcf24bf | |
parent | a8801d8665bcc94c63a798e291a03c88f2af0215 (diff) |
mtd-utils: Use $(CURDIR) in place of $(PWD)
$(PWD) comes from the shell and may cause unexpected side effects when
using "make -C".
$(CURDIR) is defined internally by GNU make.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | common.mk | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -33,7 +33,7 @@ clean:: -rm -f $(SYMLINKS) ifneq ($(BUILDDIR)/.git,) ifneq ($(BUILDDIR),.) -ifneq ($(BUILDDIR),$(PWD)) +ifneq ($(BUILDDIR),$(CURDIR)) rm -rf $(BUILDDIR) endif endif @@ -26,10 +26,10 @@ INCLUDEDIR=$(PREFIX)/include ifndef BUILDDIR ifeq ($(origin CROSS),undefined) - BUILDDIR := $(PWD) + BUILDDIR := $(CURDIR) else # Remove the trailing slash to make the directory name - BUILDDIR := $(PWD)/$(CROSS:-=) + BUILDDIR := $(CURDIR)/$(CROSS:-=) endif endif override BUILDDIR := $(patsubst %/,%,$(BUILDDIR)) |