Next: , Previous: , Up: Miscellaneous Rules   [Contents][Index]


18.2 Handling new file extensions

It is sometimes useful to introduce a new implicit rule to handle a file type that Automake does not know about. If this is done, you must notify GNU Make of the new suffixes. This can be done by putting a list of new suffixes in the SUFFIXES variable.

For instance, suppose you had a compiler which could compile ‘.foo’ files to ‘.o’ files. Then you would add ‘.foo’ to your suffix list:

SUFFIXES = .foo

Then you could directly use a ‘.foo’ file in a ‘_SOURCES’ variable and expect the correct results:

bin_PROGRAMS = doit
doit_SOURCES = doit.foo

Any given SUFFIXES go at the start of the generated suffixes list, followed by automake generated suffixes not already in the list.