Previous: Include, Up: File Inclusion


8.2 Searching for include files

GNU m4 allows included files to be found in other directories than the current working directory.

If a file is not found in the current working directory, and the file name is not absolute, the file will be looked for in a specified search path. First, the directories specified with the -I option will be searched, in the order found on the command line (see Invoking m4). Second, if the M4PATH environment variable is set, it is expected to contain a colon-separated list of directories, which will be searched in order.

If the automatic search for include-files causes trouble, the `p' debug flag (see Debug Levels) can help isolate the problem.