- 论坛徽章:
- 1
|
楼上的误人子弟。
默认的第一个目标为终极目标?
- By default, make starts with the first target (not targets whose names start with ‘.’). This
- is called the default goal. (Goals are the targets that make strives ultimately to update. You
- can override this behavior using the command line (see Section 9.2 [Arguments to Specify
- the Goals], page 91) or with the .DEFAULT_GOAL special variable (see Section 3.6 [Other
- Special Variables], page 14).
复制代码 我想楼主的错误是应该使用 make -f makefilename
如下文:
- 3.2 What Name to Give Your Makefile
- By default, when make looks for the makefile, it tries the following names, in order:
- ‘GNUmakefile’, ‘makefile’ and ‘Makefile’.
- Normally you should call your makefile either ‘makefile’ or ‘Makefile’. (We recommend
- ‘Makefile’ because it appears prominently near the beginning of a directory listing, right
- near other important files such as ‘README’.) The first name checked, ‘GNUmakefile’, is not
- recommended for most makefiles. You should use this name if you have a makefile that is
- specific to GNU make, and will not be understood by other versions of make. Other make
- programs look for ‘makefile’ and ‘Makefile’, but not ‘GNUmakefile’.
- If make finds none of these names, it does not use any makefile. Then you must specify
- a goal with a command argument, and make will attempt to figure out how to remake it
- using only its built-in implicit rules. See Chapter 10 [Using Implicit Rules], page 101.
- If you want to use a nonstandard name for your makefile, you can specify the makefile
- name with the ‘-f’ or ‘--file’ option. The arguments ‘-f name’ or ‘--file=name’ tell make
- to read the file name as the makefile. If you use more than one ‘-f’ or ‘--file’ option,
- you can specify several makefiles. All the makefiles are effectively concatenated in the order
- specified. The default makefile names ‘GNUmakefile’, ‘makefile’ and ‘Makefile’ are not
- checked automatically if you specify ‘-f’ or ‘--file’.
复制代码 LZ想学东西至少应该仔细的看一遍手册。 |
|