python - 运行 make -f hello.py 时出现错误。它说“ hello.py:1: *** 缺少分隔符。停止。”
问题描述
这是 makefile 和 hello.py 的代码。我正在阅读与我类似的问题,我相信这是某个选项卡的问题,但我无法找到它。任何帮助将不胜感激,谢谢!
命令行输出:
hello.py:1: *** missing separator. Stop.
PYTHON = python3
VIEWER = less
.PHONY: clean run view other_run
run : hello.py
$(PYTHON) hello.py
other_run : hello.py
chmod u+x hello.py
./hello.py
view : hello.py
- $(VIEWER) hello.py
print("Hello, World!\n")
解决方案
make -f hello.py
将视为hello.py
几乎Makefile
可以肯定不是您想要的
-f file, --file=file, --makefile=FILE Use file as a makefile.
你可能只想make hello.py
推荐阅读
- tfs - 字段“状态”包含不在支持值列表中的值“已批准”
- java-8 - Java 8 中的终端操作 sum() 在哪里实现?
- javascript - 如何使用 Kendo.Button() 的 Events 方法将模型的属性发送到 JavaScript 函数
- angular - Angular 2+从视图目标到数据源的一种方式数据绑定
- python - 调用类方法或返回 None
- arm - 什么指令修改了 CPSR 寄存器中的状态标志?
- bash - 使用来自 php 的 shell 将文本附加到文件
- c# - WebRequest.GetResponseAsync() 在 WebRequest.GetResponse() 成功的地方失败
- javascript - 如何在 reactJS 中呈现条件形式?
- java - 如何使用 TouchActions appium 方法滚动页面?