我已经尽我所能,在 StackOverflow 上找到了关于这个问题的答案。我不认为问题出在标签上。这是生成文件:
# $OpenBSD: Makefile,v 1.15 2010/02/09 08:55:31 markus Exp $
.include <bsd.own.mk>
SUBDIR= lib ssh sshd ssh-add ssh-keygen ssh-agent scp sftp-server \
ssh-keysign ssh-keyscan sftp ssh-pkcs11-helper
distribution:
${INSTALL} -C -o root -g wheel -m 0644 ${.CURDIR}/ssh_config \
${DESTDIR}/etc/ssh/ssh_config
${INSTALL} -C -o root -g wheel -m 0644 ${.CURDIR}/sshd_config \
${DESTDIR}/etc/ssh/sshd_config
.include <bsd.subdir.mk>
我试图在第 3 行(问题所在)之前放置一个制表符,但出现以下错误:
Makefile:3: *** commands commence before first target. Stop.
这不是我自己设计的 makefile——它是直接从这里下载的: http://www.openssh.com/openbsd.html (第一个下载链接)
此外,根据这个问题的另一个答案,我使用了以下命令:
root@server:/usr/src/ssh# cat -e -t -v Makefile
输出如下:
\#^I$OpenBSD: Makefile,v 1.15 2010/02/09 08:55:31 markus Exp $$ $ .include <bsd.own.mk>$ $ SUBDIR=^Ilib ssh sshd ssh-add ssh-keygen
ssh-agent scp sftp-server \$ ^Issh-keysign ssh-keyscan sftp
ssh-pkcs11-helper$ $ distribution:$ ^I${INSTALL} -C -o root -g wheel
-m 0644 ${.CURDIR}/ssh_config \$ ^I ${DESTDIR}/etc/ssh/ssh_config$ ^I${INSTALL} -C -o root -g wheel -m 0644 ${.CURDIR}/sshd_config \$ ^I
${DESTDIR}/etc/ssh/sshd_config$ $ .include <bsd.subdir.mk>$
有谁知道可能是什么问题?提前致谢。
最佳答案
这个 makefile 是为 BSD make
编写的。您正在尝试使用 GNU make
运行它。他们使用不同的格式。
特别是,.include
命令在 GNU make
中无效。
关于linux - Makefile:3: *** 缺少分隔符。停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21101551/