Back: Diversions
Forward: Writing macros within the GNU Autotools framework
 
FastBack: Writing macros within the GNU Autotools framework
Up: Features of M4
FastForward: Writing macros within the GNU Autotools framework
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document

21.4.6 Including files

M4 permits you to include files into the input stream using the include and sinclude macros. They simply expand to the contents of the named file. Of course, the expansion will be rescanned as the normal rules dictate (21.3 Fundamentals of M4 processing).

The difference between include and sinclude is subtle: if the filename given as an argument to include is not present, an error will be raised. The sinclude macro will instead expand to the empty string--presumably the `s' stands for `silent'.

Older GNU Autotools macros that tried to be modular would use the include and sinclude macros to import libraries of macros from other sources. While this is still a workable mechanism, there is an active effort within the GNU Autotools development community to improve the packaging system for macros. An `--install' option is being developed to improve the mechanism for importing macros from a library.


This document was generated by Joost van Baal on August, 23 2005 using texi2html