From: Kevin Cernekee <cernekee@gmail.com>
To: <dedekind1@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: [PATCH] mtd-utils: Use $(CURDIR) in place of $(PWD)
Date: Mon, 27 Sep 2010 17:22:04 -0700 [thread overview]
Message-ID: <90498d8ec2a6b99c34b3bc61cf5e6444@localhost> (raw)
$(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>
---
Makefile | 2 +-
common.mk | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 93661cb..7ab9743 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ clean::
-rm -f $(SYMLINKS)
ifneq ($(BUILDDIR)/.git,)
ifneq ($(BUILDDIR),.)
-ifneq ($(BUILDDIR),$(PWD))
+ifneq ($(BUILDDIR),$(CURDIR))
rm -rf $(BUILDDIR)
endif
endif
diff --git a/common.mk b/common.mk
index be785b4..0444ad9 100644
--- a/common.mk
+++ b/common.mk
@@ -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))
--
1.7.0.4
next reply other threads:[~2010-09-28 0:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 0:22 Kevin Cernekee [this message]
2010-09-28 6:48 ` [PATCH] mtd-utils: Use $(CURDIR) in place of $(PWD) Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90498d8ec2a6b99c34b3bc61cf5e6444@localhost \
--to=cernekee@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).