makefile - 在 OS X 上未正确检测到 OSTYPE

标签 makefile

我的Makefile有:

ifeq ($(OSTYPE), "linux-gnu")
  CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.linux.64
elseifeq ($(OSTYPE), "darwin")
  CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.mac
elseifeq ($(OSTYPE), "cygwin")
    CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.exe
elseifeq ($(OSTYPE), "msys")
  CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.exe
elseifeq ($(OSTYPE), "win32")
  CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.exe
elseifeq ($(OSTYPE), "freebsd")
  CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.linux.64
else
    CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.NOTFOUND
endif

出于某种原因,我收到了 NOTFOUND 情况。有想法吗?

我在小牛队,如果这很重要的话。

最佳答案

这应该是 else ifeq 并且可能您需要 Darwin 而不是 darwin (取决于 $(OSTYPE) 的分配方式。例如

else ifeq ($(OSTYPE), "Darwin")
  CHROMEDRIVER_EXE?=$(shell pwd)/vendor/selenium/chromedriver.mac

关于makefile - 在 OS X 上未正确检测到 OSTYPE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22923916/

相关文章:

使用 Makefile 执行的 Python 脚本

c++ - 每次将目标文件转储到其他目录时,makefile 都会重建

makefile - Make 目标依赖于二进制文件,它可能存在也可能不存在于 $PATH

GCC,-W1 是什么意思

c - 编译 HTK 时出现 "fatal error: bits/libc-header-start.h: No such file or directory"

c++ - makefile 错误,从 src 目录中的所有内容构建

linux - 如何在 makefile 中包含 .h 文件

c - 如何将新的源文件添加到 glibc makefile 中?

c++ - 在 C 中使用重载的 C++ 函数

c++ - Makefile 将程序移动到特定目录