下一个 >


GNU Automake

For version 1.12.4, 16 September 2012


 

David MacKenzie Tom Tromey Alexandre Duret-LutzTable of Contents1 Introduction 13 General ideas 184 Some example packages 247 Directories 478 Building Programs and Libraries 539 Other Derived Objects 8110 Other GNU Tools 8711 Building documentation 9112 What Gets Installed 9413 What Gets Cleaned 9615 Support for test suites 10116 Rebuilding Makefiles 11618 Miscellaneous Rules 12119 Include 12324 When Automake Isn’t Enough 13126 Automake API Versioning 136Appendix A Copying This Manual 157Appendix B Indices 1651 Introduction2 An Introduction to the Autotools2.1 Introducing the GNU Build System2.2 Use Cases for the GNU Build System2.2.1 Basic Installation2.2.3 Standard Directory Variables2.2.4 Standard Configuration Variables2.2.5 Overriding Default Configuration Setting with ‘config.site’2.2.6 Parallel Build Trees (a.k.a. VPATH Builds)2.2.7 Two-Part Installation2.2.8 Cross-Compilation2.2.9 Renaming Programs at Install Time2.2.10 Building Binary Packages Using DESTDIR2.2.11 Preparing Distributions2.2.12 Automatic Dependency Tracking2.2.13 Nested Packages2.3 How Autotools Help2.4 A Small Hello World3 General ideas3.1 General Operation3.2 Strictness3.3 The Uniform Naming Scheme3.4 Staying below the command line length limit3.5 How derived variables are named3.6 Variables reserved for the user3.7 Programs automake might require4 Some example packages4.1 A simple example, start to finish4.2 Building true and false6.1 Configuration requirements6.2 Other things Automake recognizes6.3 Auto-generating aclocal.m46.3.1 aclocal Options6.3.2 Macro Search PathModifying the Macro Search Path: ‘-I dir ’Modifying the Macro Search Path: ‘dirlist’Planned future incompatibilities6.3.3 Writing your own aclocal macros6.3.4 Handling Local Macros6.3.5 Serial Numbers6.4 Autoconf macros supplied with Automake6.4.1 Public Macros6.4.2 Obsolete Macros6.4.3 Private Macros7 Directories7.1 Recursing subdirectories7.2 Conditional Subdirectories7.2.4 Unconfigured Subdirectories7.3 An Alternative Approach to Subdirectories7.4 Nesting Packages8 Building Programs and Libraries8.1 Building a program8.1.1 Defining program sources8.1.2 Linking the program8.1.3 Conditional compilation of sourcesConditional Compilation using _LDADD SubstitutionsConditional Compilation using Automake Conditionals8.1.4 Conditional compilation of programsConditional Programs using configure SubstitutionsConditional Programs using Automake Conditionals8.2 Building a library8.3 Building a Shared Library8.3.1 The Libtool Concept8.3.2 Building Libtool Libraries8.3.3 Building Libtool Libraries Conditionally8.3.4 Libtool Libraries with Conditional Sources8.3.5 Libtool Convenience Libraries8.3.6 Libtool Modules8.3.9 Common Issues Related to Libtool’s Use8.4 Program and Library Variables8.7 Variables used when building a program8.8 Yacc and Lex support8.9 C++ Support8.10 Objective C Support8.11 Objective C++ Support8.12 Unified Parallel C Support8.13 Assembly Support8.14 Fortran 77 Support8.14.1 Preprocessing Fortran 778.14.2 Compiling Fortran 77 Files8.14.3 Mixing Fortran 77 With C and C++8.14.3.1 How the Linker is Chosen8.15 Fortran 9x Support8.15.1 Compiling Fortran 9x Files8.16 Compiling Java sources using gcj8.17 Vala Support8.18 Support for Other Languages8.19 Automatic dependency tracking8.20 Support for executable extensions9 Other Derived Objects9.1 Executable Scripts9.2 Header files9.3 Architecture-independent data files9.4 Built Sources9.4.1 Built Sources ExampleFirst TryRecording Dependencies manuallyWhich is best?10 Other GNU Tools10.1 Emacs Lisp10.2 Gettext10.3 Libtool10.4 Java bytecode compilation (deprecated)10.5 Python11 Building documentation11.1 Texinfo11.2 Man Pages12 What Gets Installed12.1 Basics of Installation12.2 The Two Parts of Install12.3 Extending Installation12.4 Staged Installs12.5 Install Rules for the User13 What Gets Cleaned14 What Goes in a Distribution14.1 Basics of Distribution14.2 Fine-grained Distribution Control14.3 The dist Hook14.4 Checking the DistributionDISTCHECK CONFIGURE FLAGSdistcheck-hookdistcleancheckdistuninstallcheck14.5 The Types of Distributions15 Support for test suites15.1 Generalities about Testing15.2 Simple Tests15.2.1 Scripts-based Testsuites15.2.2 Serial Test Harness15.2.3 Parallel Test Harness15.3 Custom Test Drivers15.3.1 Overview of Custom Test Drivers Support15.3.2 Declaring Custom Test Drivers15.3.3 API for Custom Test Drivers15.3.3.1 Command-line arguments for test drivers15.3.3.2 Log files generation and test results recording15.3.3.3 Testsuite progress output15.4 Using the TAP test protocol15.4.1 Introduction to TAP15.4.2 Use TAP with the Automake test harness15.4.3 Incompatibilities with other TAP parsers and drivers15.4.4 Links and external resources on TAP15.5 DejaGnu Tests15.6 Install Tests16 Rebuilding Makefiles17 Changing Automake’s Behavior17.1 Options generalities17.2 List of Automake options18 Miscellaneous Rules18.1 Interfacing to etags18.2 Handling new file extensions19 Include20 Conditionals20.1 Usage of Conditionals20.2 Limits of Conditionals21.1 Make is verbose by default21.2 Standard and generic ways to silence make21.3 How Automake can help in silencing make24 When Automake Isn’t Enough24.1 Extending Automake Rules26 Automake API VersioningWhat is in the APIWhat is not in the API27 Upgrading a Package to a Newer Automake Version28 Frequently Asked Questions about Automake28.1 CVS and generated filesBackground: distributed generated FilesBackground: CVS and TimestampsLiving with CVS in Autoconfiscated ProjectsAll Files in CVSGenerated Files out of CVSThird-party Files28.3 Why doesn’t Automake support wildcards?28.4 Limitations on File Names28.5 Errors with distclean28.6 Flag Variables OrderingCompile Flag VariablesOther Variables28.7 Why are object files sometimes renamed?28.8 Per-Object Flags Emulation28.9 Handling Tools that Produce Many Outputs28.10 Installing to Hard-Coded Locations28.11 Debugging Make Rules28.12 Reporting BugsAppendix A Copying This ManualA.1 GNU Free Documentation LicenseADDENDUM: How to use this License for your documentsAppendix B IndicesB.1 Macro IndexAMB.2 Variable IndexABCDEFGHIJLMNOPRSTUVWXYB.3 General Index$-.:ABCDEFGHIJLMNOPRSTUVWXYZ