Book description
The GNU Autotools make it easy for developers to create software that is portable across many Unix-like operating systems, and even Windows. Although the Autotools are used by thousands of open source software packages, they have a notoriously steep learning curve.
Autotools is the first book to offer programmers a tutorial-based guide to the GNU build system. Author John Calcote begins with an overview of high-level concepts and a hands-on tour of the philosophy and design of the Autotools. He then tackles more advanced details, like using the M4 macro processor with Autoconf, extending the framework provided by Automake, and building Java and C# sources. He concludes with solutions to frequent problems encountered by Autotools users.
This thoroughly revised second edition has been updated to cover the latest versions of the Autotools. It includes five new chapters on topics like pkg-config, unit and integration testing with Autotest, internationalizing with GNU tools, the portability of gnulib, and using the Autotools with Windows. As with the first edition, you'll focus on two projects: Jupiter, a simple “Hello, world!” program, and FLAIM, an existing, complex open source effort containing four separate but interdependent projects. Follow along as the author takes Jupiter’s build system from a basic makefile to a full-fledged Autotools project, and then as he converts the FLAIM projects from complex, hand-coded makefiles to the powerful and flexible GNU build system.
Learn how to:
•Master the Autotools build system to maximize your software’s portability
•Generate Autoconf configuration scripts to simplify the compilation process
•Produce portable makefiles with Automake
•Build cross-platform software libraries with Libtool
•Write your own Autoconf macros
This detailed introduction to the GNU Autotools is indispensable for developers and programmers looking to gain a deeper understanding of this complex suite of tools. Stop fighting against the system and make sense of it all with the second edition of Autotools!
Table of contents
- Cover Page
- Title Page
- Copyright Page
- Dedication
- About the Author
- About the Technical Reviewer
- BRIEF CONTENTS
- CONTENTS IN DETAIL
- FOREWORD FOR THE FIRST EDITION by Ralf Wildenhues
- FOREWORD FOR THE SECOND EDITION by Eric Blake
- PREFACE
- INTRODUCTION
- 1 AN END USER’S PERSPECTIVE ON THE GNU AUTOTOOLS
- 2 A BRIEF INTRODUCTION TO THE GNU AUTOTOOLS
-
3 UNDERSTANDING THE GNU CODING STANDARDS
- Creating a New Project Directory Structure
- Project Structure
- Makefile Basics
- Creating a Source Distribution Archive
- Automatically Testing a Distribution
- Unit Testing, Anyone?
- Installing Products
- The Filesystem Hierarchy Standard
- Supporting Standard Targets and Variables
- Getting Your Project into a Linux Distro
- Build vs. Installation Prefix Overrides
- User Variables
- Nonrecursive Build Systems
- Configuring Your Package
- Summary
-
4 CONFIGURING YOUR PROJECT WITH AUTOCONF
- Autoconf Configuration Scripts
- The Shortest configure.ac File
- Comparing M4 to the C Preprocessor
- The Nature of M4 Macros
- Executing autoconf
- Executing configure
- Executing config.status
- Adding Some Real Functionality
- Generating Files from Templates
- Adding VPATH Build Functionality
- Let’s Take a Breather
- An Even Quicker Start with autoscan
- Initialization and Package Information
- The Instantiating Macros
- Back to Remote Builds for a Moment
- Summary
- 5 MORE FUN WITH AUTOCONF: CONFIGURING USER OPTIONS
-
6 AUTOMATIC MAKEFILES WITH AUTOMAKE
- Getting Down to Business
- What’s Actually in a Makefile.am File?
- Analyzing Our New Build System
- Unit Tests: Supporting make check
- Reducing Complexity with Convenience Libraries
- Building the New Library
- What Goes into a Distribution?
- Maintainer Mode
- Cutting Through the Noise
- Nonrecursive Automake
- Summary
- 7 BUILDING LIBRARIES WITH LIBTOOL
- 8 LIBRARY INTERFACE VERSIONING AND RUNTIME DYNAMIC LINKING
- 9 UNIT AND INTEGRATION TESTING WITH AUTOTEST
- 10 FINDING BUILD DEPENDENCIES WITH PKG-CONFIG
- 11 INTERNATIONALIZATION
- 12 LOCALIZATION
- 13 MAXIMUM PORTABILITY WITH GNULIB
- 14 FLAIM: AN AUTOTOOLS EXAMPLE
- 15 FLAIM PART II: PUSHING THE ENVELOPE
- 16 USING THE M4 MACRO PROCESSOR WITH AUTOCONF
- 17 USING THE AUTOTOOLS WITH WINDOWS
-
18 A CATALOG OF TIPS AND REUSABLE SOLUTIONS FOR CREATING GREAT PROJECTS
- Item 1: Keeping Private Details out of Public Interfaces
- Item 2: Implementing Recursive Extension Targets
- Item 3: Using a Repository Revision Number in a Package Version
- Item 4: Ensuring Your Distribution Packages Are Clean
- Item 5: Hacking Autoconf Macros
- Item 6: Cross-Compiling
- Item 7: Emulating Autoconf Text Replacement Techniques
- Item 8: Using the Autoconf Archive Project
- Item 9: Using Incremental Installation Techniques
- Item 10: Using Generated Source Code
- Item 11: Disabling Undesirable Targets
- Item 12: Watch Those Tab Characters!
- Item 13: Packaging Choices
- Wrapping Up
- INDEX
Product information
- Title: Autotools, 2nd Edition
- Author(s):
- Release date: November 2019
- Publisher(s): No Starch Press
- ISBN: 9781593279721
You might also like
book
The GNU Make Book
GNU Make Book is a practical, thorough guide to GNU Make basics, solutions, and advanced uses.
book
Embedded Linux Development using Yocto Projects - Second Edition
Optimize and boost your Linux-based system with Yocto Project and increase its reliability and robustness efficiently …
book
Linux System Programming, 2nd Edition
Write software that draws directly on services offered by the Linux kernel and core system libraries. …
book
Linux Kernel Development, Third Edition
Linux Kernel Development details the design and implementation of the Linux kernel, presenting the content in …