第一章 gnu make

1 Over  view  of  make
The make utility automatically determines which pieces of  a large program need to be
recompiled, and issues commands to recompile them. This manual describes GNU make, which was implemented by Richard Stallman and Roland McGrath.     Development since Version 3.76 has been handled by Paul D.Smith.

  GNU make conforms to section 6.2 of IEEE Standard 1003.2-1992 (POSIX.2).
  Our examples show C programs, since they are most common, but you can use make with any programming language whose compiler can be run with a shell command. Indeed, make is not limited to programs.You can use it to describe any task where some ?les must be updated automatically from others whenever the others change.

  To prepare to use make,you must write a ?le called the make?le that describes the
relationships among ?les in your program and provides commands for updating each ?le. In a program, typically, the executable ?le is updated from object ?les, which are in turn made by compiling source ?les.
Once a suitable make?le exists, eachtime you change some source ?les, this simple shell command:

  make
  su?ces to perform all necessary recompilations.The make program uses the make?le database and the last-modi?cation times of the ?les to decide which of the ?les need to be updated. For each of those ?les,it issues the commands recorded in the database.
You can provide command line arguments to make to control which ?les should be
recompiled, or how. See Chapter9 [HowtoRun make],page91.
1.1How to Read This Manual
If you are new to make, or are looking for a general introduction, read the ?rst few sections of each chapter, skipping the later sections. In each chapter, the ?rst few sections contain introductory or general information and the later sectionsc on tainspecializedortechnical information.Theexceptionis Chapter2[An Introduction to Make?les],  page3, all of which is introductory.

If you are familiar with other make programs,see Chapter12[Features of GNU make],
page 123, which lists the enhancements GNU make has,and Chapter 13[Incompatibilities and MissingFeatures], page127, which explains the few things GNU make lacks that others have.
For a quick summary, see Section 9.7[OptionsSummary], page96, AppendixA[Quick
Reference], page 143, and Section 4.8[Special Targets], page33.
1.2ProblemsandBugs
If you have problems with GNU make or think you’ve foundabug, please report it to the
developers; we can not promise to do anything but we might well want to ?x it.
Before reporting a bug, make sure you’ve actually found a real bug. Carefully reread
the documentation and see if it really says you can do what you’re trying to do. If it’s not clear whether you should be able to do something or not, report that too; it’s a bug in the documentation!

Once you have a precise problem you can report it in one of two ways. Eithersend
electronic mail to:
bug-make@gnu.org
or use our Web-based project manage menttool,at:
http://savannah.gnu.org/projects/make/
In addition to the information above, please becareful to include the version number of
make you are using. You can get this information with the command‘ make--version’. Be sure also to include the type of machine and operating system you are using. One way to obtain this information is by looking at the ?nal lines of output from the command ‘make --help’.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值