Makefile找不到规则

问题描述 投票:0回答:1

我在Jekyll项目中,具有以下makefile

project = jekyll-template-repository

e:          execute
execute:
            bundle
            build


r:          run
run:
            jekyll serve -l -o -b /$(project)


b:          build
build:      clean
            jekyll build

c:          clean
clean:
            jekyll clean

并且当我运行make execute时,它抛出了错误make: build: Command not found

我想它正在尝试将其作为普通的bash命令执行,但是我想调用我在文件中向前写的build规则。当它们不紧跟另一个规则make时,是否需要一些特殊的语法来指向其他:规则?

我在一个带有以下makefile的Jekyll项目中:project = jekyll-template-repository e:执行执行:bundle build r:运行运行:jekyll ...

makefile build jekyll gnu-make
1个回答
0
投票

您无法在Makefile中“调用”规则。规则不是功能。您可以对target

© www.soinside.com 2019 - 2024. All rights reserved.