6.3. Introduction to Primaries

Each type of object that Automake understands has a special root variable name associated with it. This root is called a primary. Many actual variable names put into 'Makefile.am' are constructed by adding various prefixes to a primary.

For instance, scripts—interpreted executable programs—are associated with the SCRIPTS primary. Here is how you would list scripts to be installed in the user's 'bindir':

bin_SCRIPTS = magic-script

(The mysterious 'bin_' prefix is discussed later.)

The contents of a primary-derived variable are treated as targets in the resulting 'Makefile'. For instance, in the preceding example, we could generate 'magic-script' using sed by just introducing it as a target:

 bin_SCRIPTS = magic-script ...

Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.