automake.info: Alternative

Go forward to Rebuilding
Go backward to Top level
Go up to Top
Go to the top op automake

An Alternative Approach to Subdirectories

   If you've ever read Peter Miller's excellent paper, Recursive Make
Considered Harmful
(http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html), the
preceding section on the use of subdirectories will probably come as
unwelcome advice.  For those who haven't read the paper, Miller's main
thesis is that recursive `make' invocations are both slow and
error-prone.
   Automake provides sufficient cross-directory support (1) to enable
you to write a single `Makefile.am' for a complex multi-directory
package.
   By default an installable file specified in a subdirectory will have
its directory name stripped before installation.  For instance, in this
example, the header file will be installed as `$(includedir)/stdio.h':
     include_HEADERS = inc/stdio.h
   However, the `nobase_' prefix can be used to circumvent this path
stripping.  In this example, the header file will be installed as
`$(includedir)/sys/types.h':
     nobase_include_HEADERS = sys/types.h
   `nobase_' should be specified first when used in conjunction with
either `dist_' or `nodist_' (*note Dist::).  For instance:
     nobase_dist_pkgdata_DATA = images/vortex.pgm

---------- Footnotes ----------

   (1) We believe.  This work is new and there are probably warts.
*Note Introduction::, for information on reporting bugs.