linux - 生成文件 : missing separator

标签 linux makefile

#kernel build system and can use its lanauge
ifneq($(KERNELRELEASE),)
 obj-m:=helloworld.o
else
 KDIR:= /lib/modules/2.6.33.3-85.fc13.i686/build
all:
 make -C $(KDIR) M=$(PWD) modules
clean:
 rm -f *.ko *.o *.mod.o *.mod.c *.symvers
endif

错误是:

makefile:2:*** missing separator . stop

但是对于 ifneq($(KERNELRELEASE),),如果我之前添加一个选项卡,我会得到另一个错误:

makefile:2: ***commands commence before first target. stop

最佳答案

ifneq(之间必须有一个空格。

TAB 前缀表示它是一个 shell 命令,因此请确保 shell 命令(makerm)以 TAB 开头,所有其他行如ifneq 不以 TAB 开头。

关于linux - 生成文件 : missing separator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3315108/

相关文章:

java - Alpine Linux,非根用户,Java 7,Setcap : libjli. 所以:没有这样的文件或目录(java 需要)

shell - 如何将命令的输出分配给 Makefile 变量

c++ - 未实现 : unexpected ast of kind ltgt_expr in C++

makefile - 为不同目录下的源文件编写makefile

regex - 基于正则表达式递归重命名目录和文件

c++ - 如何在 Linux 应用程序上使用 C++ 中的终端输入中断循环/进程

linux - Linux 中的 IF 和异常

c++ - __LP64__ 在哪里为 OSX 10.6 上的 C++ 应用程序的默认构建定义?

iphone - 构建在 XCode 中运行的 C 库最终会出现不受支持的架构

python - docker 。无此文件或目录