Synopses & Reviews
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 aspossible, 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.
About the Author
Robert Mecklenburg began using Unix as a student in 1977 and has been programming professionally for 23 years. His make experience started in 1982 at NASA with Unix version 7. Robert received his Ph.D. in Computer Science from the University of Utah in 1991. Since then, he has worked in many fields ranging from mechanical CAD to bioinformatics, and he brings his extensive experience in C++, Java, and Lisp to bear on the problems of project management with make.
Table of Contents
; Other resources from O'Reilly; Foreword; Preface; The Road to the Third Edition; What's New in This Edition; Conventions Used in This Book; Using Code Examples; Comments and Questions; Acknowledgments; Basic Concepts; Chapter 1: How to Write a Simple Makefile; 1.1 Targets and Prerequisites; 1.2 Dependency Checking; 1.3 Minimizing Rebuilds; 1.4 Invoking make; 1.5 Basic Makefile Syntax; Chapter 2: Rules; 2.1 Explicit Rules; 2.2 Variables; 2.3 Finding Files with VPATH and vpath; 2.4 Pattern Rules; 2.5 The Implicit Rules Database; 2.6 Special Targets; 2.7 Automatic Dependency Generation; 2.8 Managing Libraries; Chapter 3: Variables and Macros; 3.1 What Variables Are Used For; 3.2 Variable Types; 3.3 Macros; 3.4 When Variables Are Expanded; 3.5 Target- and Pattern-Specific Variables; 3.6 Where Variables Come From; 3.7 Conditional and include Processing; 3.8 Standard make Variables; Chapter 4: Functions; 4.1 User-Defined Functions; 4.2 Built-in Functions; 4.3 Advanced User-Defined Functions; Chapter 5: Commands; 5.1 Parsing Commands; 5.2 Which Shell to Use; 5.3 Empty Commands; 5.4 Command Environment; 5.5 Evaluating Commands; 5.6 Command-Line Limits; Advanced and Specialized Topics; Chapter 6: Managing Large Projects; 6.1 Recursive make; 6.2 Nonrecursive make; 6.3 Components of Large Systems; 6.4 Filesystem Layout; 6.5 Automating Builds and Testing; Chapter 7: Portable Makefiles; 7.1 Portability Issues; 7.2 Cygwin; 7.3 Managing Programs and Files; 7.4 Working with Nonportable Tools; 7.5 Automake; Chapter 8: C and C++; 8.1 Separating Source and Binary; 8.2 Read-Only Source; 8.3 Dependency Generation; 8.4 Supporting Multiple Binary Trees; 8.5 Partial Source Trees; 8.6 Reference Builds, Libraries, and Installers; Chapter 9: Java; 9.1 Alternatives to make; 9.2 A Generic Java Makefile; 9.3 Compiling Java; 9.4 Managing Jars; 9.5 Reference Trees and Third-Party Jars; 9.6 Enterprise JavaBeans; Chapter 10: Improving the Performance of make; 10.1 Benchmarking; 10.2 Identifying and Handling Bottlenecks; 10.3 Parallel make; 10.4 Distributed make; Chapter 11: Example Makefiles; 11.1 The Book Makefile; 11.2 The Linux Kernel Makefile; Chapter 12: Debugging Makefiles; 12.1 Debugging Features of make; 12.2 Writing Code for Debugging; 12.3 Common Error Messages; Appendixes; Running make; The Outer Limits; Data Structures; Arithmetic; GNU Free Documentation License--GNU Project--Free Software Foundation (FSF); 0. Preamble; 1. Applicability and Definitions; 2. Verbatim Copying; 3. Copying in Quantity; 4. Modifications; 5. Combining Documents; 6. Collections of Documents; 7. Aggregation with Independent Works; 8. Translation; 9. Termination; 10. Future Revisions of this License; About the Author; O'Reilly®: Managing Projects with GNU Make; Colophon;