Managing Projects with GNU make, 3/e (Paperback)

Robert Mecklenburg

  • 出版商: O'Reilly
  • 出版日期: 2004-12-28
  • 定價: $1,698
  • 售價: 9.5$1,613
  • 貴賓價: 9.0$1,528
  • 語言: 英文
  • 頁數: 302
  • 裝訂: Paperback
  • ISBN: 0596006101
  • ISBN-13: 9780596006105
  • 相關分類: Linux
  • 立即出貨 (庫存 < 3)

買這商品的人也買了...

相關主題

商品描述

Description:

The utility simply known as make is one of the most enduring features of both Unix and other operating systems. First invented in the 1970s, make still turns up to this day as the central engine in most programming projects; it even builds the Linux kernel. In the third edition of the classic Managing Projects with GNU make, readers will learn why this utility continues to hold its top position in project build software, despite many younger competitors.

The premise behind make is simple: after you change source files and want to rebuild your program or other output files, make checks timestamps to see what has changed and rebuilds just what you need, without wasting time rebuilding other files. But on top of this simple principle, make layers a rich collection of options that lets you manipulate multiple directories, build different versions of programs for different platforms, and customize your builds in other ways.

This edition focuses on the GNU version of make, which has deservedly become the industry standard. GNU make contains powerful extensions that are explored in this book. It is also popular because it is free software and provides a version for almost every platform, including a version for Microsoft Windows as part of the free Cygwin project. Managing Projects with GNU make, 3rd Edition provides guidelines on meeting the needs of large, modern projects. Also added are a number of interesting advanced topics such as portability, parallelism, and use with Java.

Robert Mecklenburg, author of the third edition, has used make for decades with a variety of platforms and languages. In this book he zealously lays forth how to get your builds to be as efficient as possible, reduce maintenance, avoid errors, and thoroughly understand what make is doing. Chapters on C++ and Java provide makefile entries optimized for projects in those languages. The author even includes a discussion of the makefile used to build the book.

 

Table of Contents:

Foreword
Preface
Part I. Basic Concepts
1. How to Write a Simple Makefile
      Targets and Prerequisites
      Dependency Checking
      Minimizing Rebuilds
      Invoking make
      Basic Makefile Syntax
2. Rules
      Explicit Rules
      Variables
      Finding Files with VPATH and vpath
      Pattern Rules
      The Implicit Rules Database
      Special Targets
      Automatic Dependency Generation
      Managing Libraries
3. Variables and Macros
      What Variables Are Used For
      Variable Types
      Macros
      When Variables Are Expanded
      Target- and Pattern-Specific Variables
      Where Variables Come From
      Conditional and include Processing
      Standard make Variables
4. Functions
      User-Defined Functions
      Built-in Functions
      Advanced User-Defined Functions
5. Commands
      Parsing Commands
      Which Shell to Use
      Empty Commands
      Command Environment
      Evaluating Commands
      Command-Line Limits
Part II. Advanced and Specialized Topics
6. Managing Large Projects
      Recursive make
      Nonrecursive make
      Components of Large Systems
      Filesystem Layout
      Automating Builds and Testing
7. Portable Makefiles
      Portability Issues
      Cygwin
      Managing Programs and Files
      Working with Nonportable Tools
      Automake
8. C and C++
      Separating Source and Binary
      Read-Only Source
      Dependency Generation
      Supporting Multiple Binary Trees
      Partial Source Trees
      Reference Builds, Libraries, and Installers
9. Java
      Alternatives to make
      A Generic Java Makefile
      Compiling Java
      Managing Jars
      Reference Trees and Third-Party Jars
      Enterprise JavaBeans
10. Improving the Performance of make
      Benchmarking
      Identifying and Handling Bottlenecks
      Parallel make
      Distributed make
11. Example Makefiles
      The Book Makefile
      The Linux Kernel Makefile
12. Debugging Makefiles
      Debugging Features of make
      Writing Code for Debugging
      Common Error Messages
Part III. Appendixes
A. Running make
B. The Outer Limits
C. GNU Free Documentation License-GNU Project-Free Software Foundation (FSF)
Index

商品描述(中文翻譯)

描述:
這本書是第三版的《Managing Projects with GNU make》,它介紹了一個被稱為"make"的實用工具,它是Unix和其他操作系統中最持久的功能之一。自1970年代首次發明以來,make仍然是大多數編程項目中的核心引擎,甚至用於構建Linux內核。本書將解釋為什麼儘管有許多年輕的競爭對手,這個實用工具仍然在項目構建軟件中保持領先地位。

make的原理很簡單:在更改源文件並希望重新構建程序或其他輸出文件時,make會檢查時間戳以查看發生了什麼變化,並僅重新構建所需的部分,而不浪費時間重新構建其他文件。除了這個簡單的原則之外,make還提供了一系列豐富的選項,讓您可以操作多個目錄,為不同平台構建不同版本的程序,以及以其他方式自定義構建過程。

本書專注於GNU版本的make,它已經成為業界標準。GNU make包含強大的擴展功能,本書將對其進行探索。它也因為是免費軟件並且提供幾乎所有平台的版本而受到歡迎,包括作為免費Cygwin項目的一部分提供給Microsoft Windows的版本。《Managing Projects with GNU make》,第三版提供了滿足大型現代項目需求的指南。還增加了一些有趣的高級主題,如可移植性、並行性和與Java的使用。

本書的作者Robert Mecklenburg在幾十年的時間裡使用make來開發各種平台和語言的項目。在本書中,他熱情地介紹了如何使您的構建過程盡可能高效,減少維護工作,避免錯誤,並全面了解make的運作方式。關於C++和Java的章節提供了針對這些語言項目優化的makefile條目。作者甚至還包括了用於構建本書的makefile的討論。

目錄:
前言
前言
第一部分. 基本概念
1. 如何編寫簡單的makefile
- 目標和先決條件
- 依賴檢查
- 最小化重新構建
- 調用make
- 基本makefile語法
2. 規則
- 明確規則
- 變量
- 使用VPATH和vpath查找文件
- 模式規則
- 隱含規則數據庫
- 特殊目標
- 自動生成依賴
- 管理庫
3. 變量和宏
- 變量的用途
- 變量類型
- 宏
- 變量何時展開
- 目標和模式特定變量
- 變量的來源
- 條件和include處理
- 標準make變量
4. 函數
- 用戶定義函數
- 內置函數