linux - Makefile:3: *** 缺少分隔符。停止

标签 linux ssh makefile openssl

我已经尽我所能,在 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/

相关文章:

linux - 如何开发linux屏保

linux - 最快统计目录(包括子目录)文件数的方法

azure - 我是否需要 SSH 隧道来使用完整 CI/CD 管道从 Windows Server 2016 部署 Docker 容器

php - 在 CentOS 上为 Apache 用户创建 SSH key

ios - 在 iOS 开发的上下文中,什么是配置/makefile 脚本的好书或引用?

生成文件扩展名

c++ - Linux gnu++11,运行时获取 "Enable multithreading to use std::thread: Operation not permitted"

linux - 如何查找用户所有权下所有文件的总大小?

ssh - 使用 pscp 命令时获取 "Command not found"

linux - 如何在docker中监听端口?