为什么GNU让流程挂起?

时间:2017-07-15 14:03:25

标签: makefile cygwin windows-10 gnu-make ds-5

TL; DR:

在全新的Windows 10安装中,我安装了ARM DS-5 v5.26.2开发工具。我使用它的make.exe来构建我们的项目,无论是从Cygwin命令行还是从Eclipse IDE的构建设置。

我们的Makefile包含以下行:

uname_result := $(shell uname -s)

但只要make到达此行,就会卡住。这发生在bash终端以及Window的命令提示符上。

更新3:

经过更多问题排查后,问题似乎是DS-5的make实用程序本身。我在我的Cygwin安装中添加了make,然后使用了那个,现在我的构建运行正常。

现在问题是为什么ARM的版本在我的Win 10机器上不起作用,以前它在Win 7上运行良好。

长版:

在PC上使用Windows 7两年后,我刚刚在我的工作PC上完成了Windows 10的全新安装。在过去的两天里,我正在重新安装我们的工具并恢复体形。不幸的是,我现在坚持make让我感到头疼。

我们使用ARM的DS-5工具集开发嵌入式固件。该项目是一个Makefile项目,因此我们不使用内置的Eclipse构建器。为了在Eclipse环境之外构建项目,我安装了Cygwin以方便bash CLI。 makeclang都是DS-5安装的一部分。

当我在项目的make表单CLI上运行Makefile时,执行会无限期地被卡住。

[...在问题揭示过程后删除了一个长篇故事...]

在追查问题的根源后,我发现问题在于这一行:

uname_result := $(shell uname -s 2>NUL)

为了简化它,我验证了问题是shell命令本身。我使用以下命令制作了一个非常简单的Makefile

uname_result := $(shell ls)

当使用make -d处理makefile时,当它到达该行时,我得到以下内容:

CreateProcess(C:\cygwin64\bin\ls.exe,ls,...)
Main thread handle = 000000000000009C

为什么make执行shell命令?这个完全相同的脚本曾经在迁移之前正常工作。

更新1 w /更多信息:

我的系统中只有一个make.exe,位于C:\DS-5_v5.26.2\bin

我创建了一个简化的makefile Makefile.tmp

.PHONY: help
help:
    echo ====================== TESTING ======================
    uname_result := $(shell ls)

我从Cygwin的bash CLI处理这个makefile:

$ /cygdrive/c/DS-5_v5.26.2/bin/make -d -f Makefile.tmp help

我得到了大量的诊断信息:

GNU Make 4.1
Built for Windows32
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
find_and_set_shell() path search set default_shell = C:/cygwin64/bin/sh.exe
Reading makefiles...
Reading makefile 'Makefile.tmp'...
Updating makefiles....
 Considering target file 'Makefile.tmp'.
  Looking for an implicit rule for 'Makefile.tmp'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.o'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.c'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.cc'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.C'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.cpp'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.p'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.f'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.F'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.m'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.r'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.s'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.S'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.mod'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.sh'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp,v'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'RCS/Makefile.tmp,v'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'RCS/Makefile.tmp'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 's.Makefile.tmp'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'SCCS/s.Makefile.tmp'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.o'.
  Looking for a rule with intermediate file 'Makefile.tmp.o'.
   Avoiding implicit rule recursion.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.c'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.cc'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.C'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.cpp'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.p'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.f'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.F'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.m'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.r'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.s'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.S'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.mod'.
   Trying pattern rule with stem 'Makefile.tmp.o'.
   Trying implicit prerequisite 'Makefile.tmp.o,v'.
   Trying pattern rule with stem 'Makefile.tmp.o'.
   Trying implicit prerequisite 'RCS/Makefile.tmp.o,v'.
   Trying pattern rule with stem 'Makefile.tmp.o'.
   Trying implicit prerequisite 'RCS/Makefile.tmp.o'.
   Trying pattern rule with stem 'Makefile.tmp.o'.
   Trying implicit prerequisite 's.Makefile.tmp.o'.
   Trying pattern rule with stem 'Makefile.tmp.o'.
   Trying implicit prerequisite 'SCCS/s.Makefile.tmp.o'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.c'.
   Looking for a rule with intermediate file 'Makefile.tmp.c'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.y'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.l'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.w'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.w'.
    Trying pattern rule with stem 'Makefile.tmp.c'.
    Trying implicit prerequisite 'Makefile.tmp.c,v'.
    Trying pattern rule with stem 'Makefile.tmp.c'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.c,v'.
    Trying pattern rule with stem 'Makefile.tmp.c'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.c'.
    Trying pattern rule with stem 'Makefile.tmp.c'.
    Trying implicit prerequisite 's.Makefile.tmp.c'.
    Trying pattern rule with stem 'Makefile.tmp.c'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.c'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.y'.
    Looking for a rule with intermediate file 'Makefile.tmp.y'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.y'.
     Trying implicit prerequisite 'Makefile.tmp.y,v'.
     Trying pattern rule with stem 'Makefile.tmp.y'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.y,v'.
     Trying pattern rule with stem 'Makefile.tmp.y'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.y'.
     Trying pattern rule with stem 'Makefile.tmp.y'.
     Trying implicit prerequisite 's.Makefile.tmp.y'.
     Trying pattern rule with stem 'Makefile.tmp.y'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.y'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.l'.
    Looking for a rule with intermediate file 'Makefile.tmp.l'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.l'.
     Trying implicit prerequisite 'Makefile.tmp.l,v'.
     Trying pattern rule with stem 'Makefile.tmp.l'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.l,v'.
     Trying pattern rule with stem 'Makefile.tmp.l'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.l'.
     Trying pattern rule with stem 'Makefile.tmp.l'.
     Trying implicit prerequisite 's.Makefile.tmp.l'.
     Trying pattern rule with stem 'Makefile.tmp.l'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.l'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.w'.
    Looking for a rule with intermediate file 'Makefile.tmp.w'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.w'.
     Trying implicit prerequisite 'Makefile.tmp.w,v'.
     Trying pattern rule with stem 'Makefile.tmp.w'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.w,v'.
     Trying pattern rule with stem 'Makefile.tmp.w'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.w'.
     Trying pattern rule with stem 'Makefile.tmp.w'.
     Trying implicit prerequisite 's.Makefile.tmp.w'.
     Trying pattern rule with stem 'Makefile.tmp.w'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.w'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Rejecting impossible implicit prerequisite 'Makefile.tmp.w'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.cc'.
   Looking for a rule with intermediate file 'Makefile.tmp.cc'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp.cc'.
    Trying implicit prerequisite 'Makefile.tmp.cc,v'.
    Trying pattern rule with stem 'Makefile.tmp.cc'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.cc,v'.
    Trying pattern rule with stem 'Makefile.tmp.cc'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.cc'.
    Trying pattern rule with stem 'Makefile.tmp.cc'.
    Trying implicit prerequisite 's.Makefile.tmp.cc'.
    Trying pattern rule with stem 'Makefile.tmp.cc'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.cc'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.C'.
   Looking for a rule with intermediate file 'Makefile.tmp.C'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp.C'.
    Trying implicit prerequisite 'Makefile.tmp.C,v'.
    Trying pattern rule with stem 'Makefile.tmp.C'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.C,v'.
    Trying pattern rule with stem 'Makefile.tmp.C'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.C'.
    Trying pattern rule with stem 'Makefile.tmp.C'.
    Trying implicit prerequisite 's.Makefile.tmp.C'.
    Trying pattern rule with stem 'Makefile.tmp.C'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.C'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.cpp'.
   Looking for a rule with intermediate file 'Makefile.tmp.cpp'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp.cpp'.
    Trying implicit prerequisite 'Makefile.tmp.cpp,v'.
    Trying pattern rule with stem 'Makefile.tmp.cpp'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.cpp,v'.
    Trying pattern rule with stem 'Makefile.tmp.cpp'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.cpp'.
    Trying pattern rule with stem 'Makefile.tmp.cpp'.
    Trying implicit prerequisite 's.Makefile.tmp.cpp'.
    Trying pattern rule with stem 'Makefile.tmp.cpp'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.cpp'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.p'.
   Looking for a rule with intermediate file 'Makefile.tmp.p'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.web'.
    Trying pattern rule with stem 'Makefile.tmp.p'.
    Trying implicit prerequisite 'Makefile.tmp.p,v'.
    Trying pattern rule with stem 'Makefile.tmp.p'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.p,v'.
    Trying pattern rule with stem 'Makefile.tmp.p'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.p'.
    Trying pattern rule with stem 'Makefile.tmp.p'.
    Trying implicit prerequisite 's.Makefile.tmp.p'.
    Trying pattern rule with stem 'Makefile.tmp.p'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.p'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.web'.
    Looking for a rule with intermediate file 'Makefile.tmp.web'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.web'.
     Trying implicit prerequisite 'Makefile.tmp.web,v'.
     Trying pattern rule with stem 'Makefile.tmp.web'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.web,v'.
     Trying pattern rule with stem 'Makefile.tmp.web'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.web'.
     Trying pattern rule with stem 'Makefile.tmp.web'.
     Trying implicit prerequisite 's.Makefile.tmp.web'.
     Trying pattern rule with stem 'Makefile.tmp.web'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.web'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.f'.
   Looking for a rule with intermediate file 'Makefile.tmp.f'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.F'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.r'.
    Trying pattern rule with stem 'Makefile.tmp.f'.
    Trying implicit prerequisite 'Makefile.tmp.f,v'.
    Trying pattern rule with stem 'Makefile.tmp.f'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.f,v'.
    Trying pattern rule with stem 'Makefile.tmp.f'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.f'.
    Trying pattern rule with stem 'Makefile.tmp.f'.
    Trying implicit prerequisite 's.Makefile.tmp.f'.
    Trying pattern rule with stem 'Makefile.tmp.f'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.f'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.F'.
    Looking for a rule with intermediate file 'Makefile.tmp.F'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.F'.
     Trying implicit prerequisite 'Makefile.tmp.F,v'.
     Trying pattern rule with stem 'Makefile.tmp.F'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.F,v'.
     Trying pattern rule with stem 'Makefile.tmp.F'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.F'.
     Trying pattern rule with stem 'Makefile.tmp.F'.
     Trying implicit prerequisite 's.Makefile.tmp.F'.
     Trying pattern rule with stem 'Makefile.tmp.F'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.F'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.r'.
    Looking for a rule with intermediate file 'Makefile.tmp.r'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp'.
     Rejecting impossible implicit prerequisite 'Makefile.tmp.l'.
     Trying pattern rule with stem 'Makefile.tmp.r'.
     Trying implicit prerequisite 'Makefile.tmp.r,v'.
     Trying pattern rule with stem 'Makefile.tmp.r'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.r,v'.
     Trying pattern rule with stem 'Makefile.tmp.r'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.r'.
     Trying pattern rule with stem 'Makefile.tmp.r'.
     Trying implicit prerequisite 's.Makefile.tmp.r'.
     Trying pattern rule with stem 'Makefile.tmp.r'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.r'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Rejecting impossible implicit prerequisite 'Makefile.tmp.F'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.m'.
   Looking for a rule with intermediate file 'Makefile.tmp.m'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.ym'.
    Trying pattern rule with stem 'Makefile.tmp.m'.
    Trying implicit prerequisite 'Makefile.tmp.m,v'.
    Trying pattern rule with stem 'Makefile.tmp.m'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.m,v'.
    Trying pattern rule with stem 'Makefile.tmp.m'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.m'.
    Trying pattern rule with stem 'Makefile.tmp.m'.
    Trying implicit prerequisite 's.Makefile.tmp.m'.
    Trying pattern rule with stem 'Makefile.tmp.m'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.m'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.ym'.
    Looking for a rule with intermediate file 'Makefile.tmp.ym'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.ym'.
     Trying implicit prerequisite 'Makefile.tmp.ym,v'.
     Trying pattern rule with stem 'Makefile.tmp.ym'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.ym,v'.
     Trying pattern rule with stem 'Makefile.tmp.ym'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.ym'.
     Trying pattern rule with stem 'Makefile.tmp.ym'.
     Trying implicit prerequisite 's.Makefile.tmp.ym'.
     Trying pattern rule with stem 'Makefile.tmp.ym'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.ym'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Rejecting impossible implicit prerequisite 'Makefile.tmp.r'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.s'.
   Looking for a rule with intermediate file 'Makefile.tmp.s'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.S'.
    Trying pattern rule with stem 'Makefile.tmp.s'.
    Trying implicit prerequisite 'Makefile.tmp.s,v'.
    Trying pattern rule with stem 'Makefile.tmp.s'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.s,v'.
    Trying pattern rule with stem 'Makefile.tmp.s'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.s'.
    Trying pattern rule with stem 'Makefile.tmp.s'.
    Trying implicit prerequisite 's.Makefile.tmp.s'.
    Trying pattern rule with stem 'Makefile.tmp.s'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.s'.
    Trying pattern rule with stem 'Makefile.tmp'.
    Trying implicit prerequisite 'Makefile.tmp.S'.
    Looking for a rule with intermediate file 'Makefile.tmp.S'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem 'Makefile.tmp.S'.
     Trying implicit prerequisite 'Makefile.tmp.S,v'.
     Trying pattern rule with stem 'Makefile.tmp.S'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.S,v'.
     Trying pattern rule with stem 'Makefile.tmp.S'.
     Trying implicit prerequisite 'RCS/Makefile.tmp.S'.
     Trying pattern rule with stem 'Makefile.tmp.S'.
     Trying implicit prerequisite 's.Makefile.tmp.S'.
     Trying pattern rule with stem 'Makefile.tmp.S'.
     Trying implicit prerequisite 'SCCS/s.Makefile.tmp.S'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Rejecting impossible implicit prerequisite 'Makefile.tmp.S'.
   Trying pattern rule with stem 'Makefile.tmp'.
   Trying implicit prerequisite 'Makefile.tmp.mod'.
   Looking for a rule with intermediate file 'Makefile.tmp.mod'.
    Avoiding implicit rule recursion.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem 'Makefile.tmp.mod'.
    Trying implicit prerequisite 'Makefile.tmp.mod,v'.
    Trying pattern rule with stem 'Makefile.tmp.mod'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.mod,v'.
    Trying pattern rule with stem 'Makefile.tmp.mod'.
    Trying implicit prerequisite 'RCS/Makefile.tmp.mod'.
    Trying pattern rule with stem 'Makefile.tmp.mod'.
    Trying implicit prerequisite 's.Makefile.tmp.mod'.
    Trying pattern rule with stem 'Makefile.tmp.mod'.
    Trying implicit prerequisite 'SCCS/s.Makefile.tmp.mod'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.c'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.cc'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.C'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.cpp'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.p'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.f'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.F'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.m'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.r'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.s'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.S'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Rejecting impossible implicit prerequisite 'Makefile.tmp.mod'.
  Trying pattern rule with stem 'Makefile.tmp'.
  Trying implicit prerequisite 'Makefile.tmp.sh'.
  Looking for a rule with intermediate file 'Makefile.tmp.sh'.
   Avoiding implicit rule recursion.
   Trying pattern rule with stem 'Makefile.tmp.sh'.
   Trying implicit prerequisite 'Makefile.tmp.sh,v'.
   Trying pattern rule with stem 'Makefile.tmp.sh'.
   Trying implicit prerequisite 'RCS/Makefile.tmp.sh,v'.
   Trying pattern rule with stem 'Makefile.tmp.sh'.
   Trying implicit prerequisite 'RCS/Makefile.tmp.sh'.
   Trying pattern rule with stem 'Makefile.tmp.sh'.
   Trying implicit prerequisite 's.Makefile.tmp.sh'.
   Trying pattern rule with stem 'Makefile.tmp.sh'.
   Trying implicit prerequisite 'SCCS/s.Makefile.tmp.sh'.
  No implicit rule found for 'Makefile.tmp'.
  Finished prerequisites of target file 'Makefile.tmp'.
 No need to remake target 'Makefile.tmp'.
Updating goal targets....
Considering target file 'help'.
 File 'help' does not exist.
 Finished prerequisites of target file 'help'.
Must remake target 'help'.
CreateProcess(C:\cygwin64\bin\ls.exe,ls,...)
Main thread handle = 000000000000008C

但重要的可能是第一部分和最后部分:

GNU Make 4.1
Built for Windows32
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
find_and_set_shell() path search set default_shell = C:/cygwin64/bin/sh.exe
Reading makefiles...
Reading makefile 'Makefile.tmp'...
Updating makefiles....
 Considering target file 'Makefile.tmp'.
  Looking for an implicit rule for 'Makefile.tmp'.
  Trying pattern rule with stem 'Makefile.tmp'.
. . . . 
. . . . 
   Trying implicit prerequisite 'SCCS/s.Makefile.tmp.sh'.
  No implicit rule found for 'Makefile.tmp'.
  Finished prerequisites of target file 'Makefile.tmp'.
 No need to remake target 'Makefile.tmp'.
Updating goal targets....
Considering target file 'help'.
 File 'help' does not exist.
 Finished prerequisites of target file 'help'.
Must remake target 'help'.
CreateProcess(C:\cygwin64\bin\ls.exe,ls,...)
Main thread handle = 000000000000008C

因此,正如您所看到的,它既不执行echo命令也不执行ls命令。如果我注释掉shell命令,我会看到TESTING消息回显给终端。

显然,DS-5的make.exe是为Windows而构建的。从Cygwin bash调用它应该有问题吗?如果是这样,那么在Win 7机器上如何运作呢?

更新2 w /更多信息:

我重复测试,这次是从Windows&#39; CMD提示。我用ls命令替换了b shell行中的dir命令。令人惊讶的是,同样的行为也发生在CMD上!

所以,显然,问题 make&#39; shell函数调用。

1 个答案:

答案 0 :(得分:1)

与ARM支持人员联系后,我收到了以下回复:

{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 62556,
    "max_score": 1.0,
    "hits": [
      {
        "_index": "my_index",
        "_type": "my_doc_type",
        "_id": "AWMmMfYVqn7lskkxZiWO",
        "_score": 1.0,
        "_source": {
          "tag": "Some random tag",
          "source": "my source code 14124"
        }
      },
      {
        "_index": "my_index",
        "_type": "my_doc_type",
        "_id": "AWMmMfwmqn7lskkxZiWc",
        "_score": 1.0,
        "_source": {
          "tag": "Some other random tag",
          "source": "my source code 235"
        }
      },
    ]
  }
}

感谢ARM支持Alex。