Managing Projects with GNU make, 3/e (Paperback)
暫譯: 使用GNU make管理專案,第3版(平裝本)

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
  • 立即出貨 (庫存 < 4)

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

商品描述

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

商品描述(中文翻譯)

**描述:**

名為 *make* 的工具是 Unix 及其他作業系統中最持久的特徵之一。它於 1970 年代首次發明,至今仍然是大多數程式專案中的核心引擎;它甚至用於構建 Linux 核心。在經典書籍 *Managing Projects with GNU make* 的第三版中,讀者將了解為什麼這個工具在專案構建軟體中仍然保持其頂尖地位,儘管有許多年輕的競爭者。

*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. 函數
用戶定義函數
內建函數
進階用戶定義函數
5. 命令
解析命令
使用哪個 Shell
空命令
命令環境
評估命令
命令行限制
第二部分 進階與專門主題
6. 管理大型專案
遞歸 make
非遞歸 make
大型系統的組成部分
檔案系統佈局
自動化構建與測試
7. 可攜式 Makefile
可攜性問題
Cygwin
管理程式與檔案
使用非可攜式工具
Automake
8. C 和 C++
分離源碼與二進制
只讀源碼
依賴生成
支援多個二進制樹
部分源碼樹
參考構建、庫和安裝程式
9. Java
make 的替代方案
一個通用的 Java Makefile
編譯 Java
管理 Jars
參考樹和第三方 Jars
企業 JavaBeans
10. 改善 make 的性能
基準測試
識別與處理瓶頸
並行 make
分散式 make
11. 示例 Makefile
本書的 Makefile
Linux 核心的 Makefile
12. 調試 Makefile
make 的調試功能
寫作調試代碼
常見錯誤訊息
第三部分 附錄
A. 執行 make
B. 外部限制
C. GNU 自由文檔許可證 - GNU 專案 - 自由軟體基金會 (FSF)
索引