shell - Makefile 命令与文件夹名称冲突

标签 shell makefile zsh

我的 Makefile 有一个小问题,它与文件夹冲突。 首先,我使用 Makefile 来运行几个 shell 命令 例如:

生成文件内容:

test:
    @./node_modules/.bin/mocha -R $(REPORTER) \
        $(WATCH) \
        --ui $(UI)

如果在 Makefile 的同一目录中,我在运行时有一个名为 test 的文件夹:

make test

我得到以下结果:

make: `test' is up to date.

我真的不知道如何更好地解释这一点,但我很乐意回答并询问更多细节。

最佳答案

我不知道 mocha 是什么(我猜它是 Cocoa 和 Java 的某种组合),但尝试添加 this line到你的 makefile,在规则之外:

.PHONY: test

关于shell - Makefile 命令与文件夹名称冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12698109/

相关文章:

perl - Perl system() 调用使用哪个 shell?

c - 如何编译链接到不同 files.o 的源文件的多个实例

zsh - Zsh 自动加载中的 -U 选项的用途是什么

python - 将文件写入 chroot 环境

linux - shell 脚本 : Count returned from function is not correct

linux - Sed 错误 : bad option in substitution expression

makefile - BoringSSL 的 undefined symbol

linux - gstreamer 插件开发问题,gst-inspect 说 : undefined symbol: gst_video_format_new_caps

flutter - zsh:找不到命令: flutter

zsh - 如何在 zsh 小部件定义中移动光标位置