[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 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

(Note that the mysterious ‘bin_’ prefix will be discussed later.)

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

 
bin_SCRIPTS = magic-script

magic-script: magic-script.in
	sed -e 's/whatever//' < $(srcdir)/magic-script.in > magic-script
	chmod +x magic-script

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Ben Elliston on July 10, 2015 using texi2html 1.82.