mingw64 Makefile:5: *** 缺少分隔符

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

我在 Windows 中使用 mingw64 尝试调用 Makefile 来运行 GO 但不断得到: Makefile:5: *** 缺少分隔符。 这是Makefile

BINARY_NAME=celeritasApp.exe

## build: builds all binaries
build:
    @go mod vendor
    @go build -o tmp/${BINARY_NAME} .
    @echo Celeritas built!

run: build
    @echo Staring Celeritas...
    @.\tmp\${BINARY_NAME} &
    @echo Celeritas started!

clean:
    @echo Cleaning...
    @go clean
    @del .\tmp\${BINARY_NAME}
    @echo Cleaned!

test:
    @echo Testing...
    @go test ./...
    @echo Done!

start: run
    
stop:
    @echo "Starting the front end..."
    @taskkill /IM ${BINARY_NAME} /F
    @echo Stopped Celeritas

restart: stop start

制作版本:

xxxx@xxxxx MSYS /c/dev/my/go_apps/myapp
$ make --version
GNU Make 4.3
Built for x86_64-pc-msys
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
makefile window gnu-make mingw-w64
1个回答
0
投票

Makefile
中的缩进必须是真实的tab字符,不是空格

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