linux - Makefile 找不到 shell 命令
问题描述
在我的 Makefile 中,我试图使用 find 命令获取目录的绝对路径。这是Makefile的片段
PATH := $(shell find /home/ -type d -path "*/name" -print -quit)
all: create
create:
mkdir -p otherPathName
当我删除 PATH := $(shell .... ) 行时,Makefile 工作正常,但是当它被包含时,我得到了这个错误
make: mkdir: Command not found
Makefile:22: recipe for target 'create' failed
make: *** [create] Error 127
对于 Makefile 中的进一步操作,从“find”接收的绝对路径是必要的,但我不知道如何修复此错误。
解决方案
推荐阅读
- swift - 如何以通用方法获取 Firestore 文档 ID?
- javascript - 如何在 VueJS 中将值从一个子组件传递到另一个子组件?
- javafx - JavaFx 从选中的 CheckBox 中获取文本
- python-3.x - 在使用依赖变量和三个自变量的多元回归中实现 OLS 时,numpy 的 Patsy 错误是存在的
- python - db 查询优化与处理可扩展字段的替代方法
- c++ - 如何在 std::reduce 和 std::accumulate 之间进行选择?
- java - LocalDateTime 在 Websphere 服务器中未按预期工作
- node.js - 节点js在转换为json之前合并xlsx列
- reactjs - 如何在基于类的组件中使用状态来检查复选框
- python-3.x - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 6208: invalid start byte (Python C-Extension)