Windows上的GNU make-无法执行简单命令

Windows上的GNU make-无法执行简单命令,windows,emacs,makefile,Windows,Emacs,Makefile,以下makefile在执行简单命令时失败,并在emacs compile中出错。经验证,它可以在命令提示符下工作。有什么问题吗 SHELL = cmd.exe test: rd /s /q output make test --debug GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditi

以下makefile在执行简单命令时失败,并在emacs compile中出错。经验证,它可以在命令提示符下工作。有什么问题吗

SHELL = cmd.exe

test:
      rd /s /q output

make test --debug
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32
Reading makefiles...
Updating goal targets....
 File `test' does not exist.
Must remake target `test'.
rd /s /q output
The syntax of the command is incorrect.
make: *** [test] Error 1

命令rm/s/q输出位于下一行,从一个选项卡开始。就make而言,语法是正确的。第一个问题是,示例中显示的makefile与您得到的输出不匹配,因此您的问题是不正确的。您的makefile显示
rm…
,但您的输出显示
rd…
。请编辑您的问题以修复错误的问题。感谢您的关注。我只是试图提供原始文件的测试版本来显示问题。问题在于init.el中的COMSPEC设置为c:/windows/system32/cmd.exe,以便Emacs shell在windows上工作。这在某种程度上导致了这个奇怪的问题,可能是因为斜杠。将其修改为cmd.exe以使其正常工作。