本文介绍了“制作"如何进行?如果未指定目标,应用程序是否知道要构建的默认目标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数linux应用程序的编译方式如下:

Most linux apps are compiled with:

make
make install clean

据我了解,make将构建目标的名称作为参数.因此,install是复制某些文件的目标,而clean是删除临时文件的目标.

As I understood it, make takes names of build targets as arguments. So install is a target that copies some files and after that clean is a target that removes temporary files.

但是如果未指定任何参数(例如,在我的示例中为第一个命令),make将建立什么目标?

But what target will make build if no arguments are specified (e.g. first command in my example)?

推荐答案

默认情况下,它首先处理第一个不以. aka(a 默认目标;为此,它可能必须处理其他目标,特别是第一个目标所依赖的目标.

By default, it begins by processing the first target that does not begin with a . aka the default goal; to do that, it may have to process other targets - specifically, ones the first target depends on.

GNU Make手册涵盖了所有这些内容,并且非常容易且容易内容丰富的阅读.

The GNU Make Manual covers all this stuff, and is a surprisingly easy and informative read.

这篇关于“制作"如何进行?如果未指定目标,应用程序是否知道要构建的默认目标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 13:09
查看更多