From 3453c50f4436e580b5861dc3b373d4a607de682d Mon Sep 17 00:00:00 2001
From: Marc Hoersken <info@marc-hoersken.de>
Date: Sun, 1 Jul 2012 11:35:48 +0200
Subject: [PATCH 2/2] Makefile.m32: Run del and copy commands through cmd
 process

Since del and copy are commands provided by cmd.exe and it is not
guaranteed that mingw32-make is run from cmd.exe, these commands
need to be executed through a separate cmd process.

This makes it possible to build and clean from within the
eclipse CDT MinGW compatible compiler tool chain.

Regression: It is not possible to catch and hide del warnings.
---
 docs/examples/Makefile.m32 |    4 ++--
 lib/Makefile.m32           |    4 ++--
 src/Makefile.m32           |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32
index 3387c92..513d90b 100644
--- a/docs/examples/Makefile.m32
+++ b/docs/examples/Makefile.m32
@@ -86,8 +86,8 @@ LDFLAGS = -s
 RC = windres
 RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
 
-RM = del /q /f 2>NUL
-CP = copy
+RM = cmd /d /s /c del /q /f
+CP = cmd /d /s /c copy
 
 ########################################################
 ## Nothing more to do below this line!
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 809612b..c692bc5 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -69,8 +69,8 @@ RC = windres
 RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF -i
 STRIP = strip -g
 
-RM = del /q /f 2>NUL
-CP = copy
+RM = cmd /d /s /c del /q /f
+CP = cmd /d /s /c copy
 
 ########################################################
 ## Nothing more to do below this line!
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index e74a418..6a686a2 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -70,8 +70,8 @@ LDFLAGS = -s
 RC = windres
 RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
 
-RM = del /q /f 2>NUL
-CP = copy
+RM = cmd /d /s /c del /q /f
+CP = cmd /d /s /c copy
 
 # We may need these someday
 # PERL = perl
-- 
1.7.10.msysgit.1

