1. Trang chủ
  2. » Công Nghệ Thông Tin

ManagingProjects with GNU Make 3rd edition potx

302 3,9K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 302
Dung lượng 2,34 MB

Nội dung

[...]... myself with a bulleted list to summarize the evolution of make since the second edition of Managing Projects with make hit the stands: • The GNU version of make, already the choice of most serious coders when the second edition of the book came out, overran the industry and turned into the de facto standard • The rise of GNU/ Linux made the GNU compiler tool chain even more common, and that includes the GNU. .. way, I’d read the GNU make manual several dozen times As I looked for more material, I found the second edition of this book It was filled with valuable material, but was sadly lacking in details of GNU make That wasn’t surprising, considering its age The volume had stood the test of time, but by 2003 needed updating The third edition focuses primarily on GNU make As Paul Smith (the GNU make maintainer)... writes: “Don’t hassle with writing portable ‘makefiles’, use a portable make instead!” What’s New in This Edition Almost all the material in this book is new I’ve divided the material into three parts Part I, Basic Concepts, provides a moderately detailed examination of the GNU make features and how to use them Chapter 1, How to Write a Simple Makefile, is a brief introduction to make with a simple, but... includes supplemental material Appendix A, Running make, provides a reference guide to GNU make s command-line options Appendix B, The Outer Limits, explores the limits of GNU make with two unlikely capabilities: managing data structures and performing arithmetic Appendix C, GNU Free Documentation License GNU Project—Free Software Foundation (FSF), contains the GNU Free Documentation License, under which... lexer.c so make must update lexer.c This, in turn, caused the update of lexer.o and then count_words Now our word counting program is fixed: $ count_words < lexer.l 3 3 3 3 Invoking make The previous examples assume that: • All the project source code and the make description file are stored in a single directory • The make description file is called makefile, Makefile, or GNUMakefile • The makefile... the Performance of make, begins by reviewing the performance characteristics of several make operations to provide context for how to write efficient makefiles Techniques for identifying and reducing bottlenecks are discussed The GNU make parallel jobs feature is described in some detail Chapter 11, Example Makefiles, provides two complex examples of real makefiles The first is the makefile used to create... commands are run make assumes the target is up to date and moves on to the next target or exits If the target you specify is already up to date, make will say so and immediately exit, doing nothing else: $ make lexer.c make: `lexer.c' is up to date If you specify a target that is not in the makefile and for which there is no implicit rule (discussed in Chapter 2), make will respond with: $ make non-existent-target... the value set in the makefile Basic Make le Syntax Now that you have a basic understanding of make you can almost write your own makefiles Here we’ll cover enough of the syntax and structure of a makefile for you to start using make Makefiles are usually structured top-down so that the most general target, often called all, is updated by default More and more detailed targets follow with targets for program... recognized by make As a special case, a single character variable name does not require the parentheses A makefile will typically define many variables, but there are also many special variables defined automatically by make Some can be set by the user to control make s behavior while others are set by make to communicate with the user’s makefile Automatic Variables Automatic variables are set by make after... specification that make uses is generally saved in a file named makefile Here is a makefile to build the traditional “Hello, World” program: hello: hello.c gcc hello.c -o hello To build the program execute make by typing: $ make 3 This is the Title of the Book, eMatter Edition Copyright © 2009 O’Reilly & Associates, Inc All rights reserved at the command prompt of your favorite shell This will cause the make program . focuses primarily on GNU make. As Paul Smith (the GNU make maintainer) writes: “Don’t hassle with writing portable ‘makefiles’, use a portable make instead!” What’s. summarize the evolution of make since the second edition of Managing Projects with make hit the stands: • The GNU version of make, already the choice of

Ngày đăng: 06/03/2014, 20:20

TỪ KHÓA LIÊN QUAN