7.2 Introduction to Primaries

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

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 May, 24 2001 using texi2html


GNU Autoconf, Automake and Libtool
GNU Autoconf, Automake, and Libtool
ISBN: 1578701902
EAN: 2147483647
Year: 2002
Pages: 290

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net