From bf33bcd039a9c1beec325580eff7a970a6c33593 Mon Sep 17 00:00:00 2001
From: Ralph Giles <giles@mozilla.com>
Date: Thu, 31 Dec 2015 01:57:11 -0800
Subject: [PATCH] mingw: Use $(CURDIR) instead of ${PWD}.

This doesn't work in a normal shell, but enables 'make -C mingw'
which is convenient.

Thanks to ron for the suggestion.
---
 doc/release.txt |  2 +-
 mingw/Makefile  | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/release.txt b/doc/release.txt
index 0367cc4..b68d83c 100644
--- a/doc/release.txt
+++ b/doc/release.txt
@@ -23,7 +23,7 @@ to https://archive.mozilla.org/pub/opus/
 Win32 binaries:
 
 - Assuming the mingw cross toolchain:
-- run cd mingw && make
+- run `make -C mingw`
   - Downloads versions of libogg, opus, openssl.
   - Compiles them.
   - Compiles static opusfile and examples against the built deps.
diff --git a/mingw/Makefile b/mingw/Makefile
index 140feef..56202cb 100644
--- a/mingw/Makefile
+++ b/mingw/Makefile
@@ -17,12 +17,12 @@ ssl_SHA := b3658b84e9ea606a5ded3c972a5517cd785282e7ea86b20c78aa4b773a047fb7
 libopusfile-0.dll: ../unix/Makefile $(DEPS)
 	CC=$(TOOL_PREFIX)-gcc \
 	RANLIB=$(TOOL_PREFIX)-ranlib \
-	PKG_CONFIG_PATH=${PWD}/lib/pkgconfig \
+	PKG_CONFIG_PATH=$(CURDIR)/lib/pkgconfig \
 	$(MAKE) -f $<
 
 opusfile: $(DEPS)
-	../configure --host=$(TOOL_PREFIX) --prefix=${PWD} \
-	  PKG_CONFIG_PATH=${PWD}/lib/pkgconfig
+	../configure --host=$(TOOL_PREFIX) --prefix=$(CURDIR) \
+	  PKG_CONFIG_PATH=$(CURDIR)/lib/pkgconfig
 	$(MAKE)
 
 clean:
@@ -57,18 +57,18 @@ $(foreach dep,$(DEPS),$(eval $(call WGET_template,$(dep))))
 
 # NOTE: 'make check' generally requires wine with cross-compiling.
 ogg_BUILD: $(ogg_DIR)
-	cd $< && ./configure --host=$(TOOL_PREFIX) --prefix=${PWD}
+	cd $< && ./configure --host=$(TOOL_PREFIX) --prefix=$(CURDIR)
 	$(MAKE) -C $< check
 	$(MAKE) -C $< install
 
 opus_BUILD: $(opus_DIR)
-	cd $< && ./configure --host=$(TOOL_PREFIX) --prefix=${PWD}
+	cd $< && ./configure --host=$(TOOL_PREFIX) --prefix=$(CURDIR)
 	$(MAKE) -C $< check
 	$(MAKE) -C $< install
 
 ssl_BUILD: $(ssl_DIR)
 	cd $< && ./Configure shared mingw64 no-asm \
-	  --prefix=${PWD} \
+	  --prefix=$(CURDIR) \
 	  --cross-compile-prefix=$(TOOL_PREFIX)-
 	$(MAKE) -C $< depend
 	$(MAKE) -C $<
-- 
GitLab