“制作"如何进行?如果未指定目标,应用程序是否知道要构建的默认目标? [英] How does "make" app know default target to build if no target is specified?
问题描述
大多数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)?
推荐答案
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.
这篇关于“制作"如何进行?如果未指定目标,应用程序是否知道要构建的默认目标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!