Linux Makefile不';找不到shell命令

Linux Makefile不';找不到shell命令,linux,makefile,Linux,Makefile,在我的Makefile中,我试图用find命令获取目录的绝对路径。下面是Makefile的一个片段 PATH := $(shell find /home/ -type d -path "*/name" -print -quit) all: create create: mkdir -p otherPathName 当我删除路径:=$(shell…)行时,Makefile工作正常,但是当它被包括进来时,我得到了这个错误 make: mkdir: Command not found

在我的Makefile中,我试图用find命令获取目录的绝对路径。下面是Makefile的一个片段

PATH := $(shell find /home/ -type d -path "*/name" -print -quit)
all: create

create:
       mkdir -p otherPathName
当我删除路径:=$(shell…)行时,Makefile工作正常,但是当它被包括进来时,我得到了这个错误

make: mkdir: Command not found
Makefile:22: recipe for target 'create' failed
make: *** [create] Error 127

对于Makefile中的进一步操作,需要从“find”接收到绝对路径,但我不知道如何修复此错误。

make调用一个shell,该shell将调用
mkdir
。该shell将通过其
路径
搜索
mkdir
。您已经修改了路径。使用不同的名称。尝试连接到
路径
,而不是替换它。噢,哇。。。多么愚蠢的错误:D改了名字成功了,谢谢:)