Back: General Automake principles
Forward: The easy primaries
 
FastBack: The easy primaries
Up: Introducing GNU Automake
FastForward: Bootstrapping
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document

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


This document was generated by Gary V. Vaughan on February, 8 2006 using texi2html