source: vendor/automake/1.7.9/automake.info@ 3590

Last change on this file since 3590 was 3120, checked in by bird, 18 years ago

automake 1.7.9

File size: 245.5 KB
Line 
1This is automake.info, produced by makeinfo version 4.5.93 from
2automake.texi.
3
4INFO-DIR-SECTION Software development
5START-INFO-DIR-ENTRY
6* automake: (automake). Making Makefile.in's.
7END-INFO-DIR-ENTRY
8
9INFO-DIR-SECTION Individual utilities
10START-INFO-DIR-ENTRY
11* aclocal: (automake)Invoking aclocal. Generating aclocal.m4.
12END-INFO-DIR-ENTRY
13
14 This file documents GNU automake 1.7.9
15
16 Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
17Software Foundation, Inc.
18
19 Permission is granted to make and distribute verbatim copies of this
20manual provided the copyright notice and this permission notice are
21preserved on all copies.
22
23 Permission is granted to copy and distribute modified versions of
24this manual under the conditions for verbatim copying, provided that
25the entire resulting derived work is distributed under the terms of a
26permission notice identical to this one.
27
28 Permission is granted to copy and distribute translations of this
29manual into another language, under the above conditions for modified
30versions, except that this permission notice may be stated in a
31translation approved by the Foundation.
32
33
34File: automake.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
35
36GNU Automake
37************
38
39This file documents the GNU Automake package. Automake is a program
40which creates GNU standards-compliant Makefiles from template files.
41This edition documents version 1.7.9.
42
43* Menu:
44
45* Introduction:: Automake's purpose
46* Generalities:: General ideas
47* Examples:: Some example packages
48* Invoking Automake:: Creating a Makefile.in
49* configure:: Scanning configure.ac or configure.in
50* Top level:: The top-level Makefile.am
51* Alternative:: An alternative approach to subdirectories
52* Rebuilding:: Automatic rebuilding of Makefile
53* Programs:: Building programs and libraries
54* Other objects:: Other derived objects
55* Other GNU Tools:: Other GNU Tools
56* Documentation:: Building documentation
57* Install:: What gets installed
58* Clean:: What gets cleaned
59* Dist:: What goes in a distribution
60* Tests:: Support for test suites
61* Options:: Changing Automake's behavior
62* Miscellaneous:: Miscellaneous rules
63* Include:: Including extra files in an Automake template.
64* Conditionals:: Conditionals
65* Gnits:: The effect of `--gnu' and `--gnits'
66* Cygnus:: The effect of `--cygnus'
67* Extending:: Extending Automake
68* Distributing:: Distributing the Makefile.in
69* API versioning:: About compatibility between Automake versions
70* FAQ:: Frequently Asked Questions
71* Macro and Variable Index::
72* General Index::
73
74
75File: automake.info, Node: Introduction, Next: Generalities, Prev: Top, Up: Top
76
77Introduction
78************
79
80Automake is a tool for automatically generating `Makefile.in's from
81files called `Makefile.am'. Each `Makefile.am' is basically a series
82of `make' variable definitions(1), with rules being thrown in
83occasionally. The generated `Makefile.in's are compliant with the GNU
84Makefile standards.
85
86 The GNU Makefile Standards Document (*note Makefile Conventions:
87(standards)Makefile Conventions.) is long, complicated, and subject to
88change. The goal of Automake is to remove the burden of Makefile
89maintenance from the back of the individual GNU maintainer (and put it
90on the back of the Automake maintainer).
91
92 The typical Automake input file is simply a series of variable
93definitions. Each such file is processed to create a `Makefile.in'.
94There should generally be one `Makefile.am' per directory of a project.
95
96 Automake does constrain a project in certain ways; for instance it
97assumes that the project uses Autoconf (*note Introduction:
98(autoconf)Top.), and enforces certain restrictions on the
99`configure.in' contents(2).
100
101 Automake requires `perl' in order to generate the `Makefile.in's.
102However, the distributions created by Automake are fully GNU
103standards-compliant, and do not require `perl' in order to be built.
104
105 Mail suggestions and bug reports for Automake to
106<bug-automake@gnu.org>.
107
108 ---------- Footnotes ----------
109
110 (1) These variables are also called "make macros" in Make
111terminology, however in this manual we reserve the term "macro" for
112Autoconf's macros.
113
114 (2) Autoconf 2.50 promotes `configure.ac' over `configure.in'. The
115rest of this documentation will refer to `configure.in' as this use is
116not yet spread, but Automake supports `configure.ac' too.
117
118
119File: automake.info, Node: Generalities, Next: Examples, Prev: Introduction, Up: Top
120
121General ideas
122*************
123
124The following sections cover a few basic ideas that will help you
125understand how Automake works.
126
127* Menu:
128
129* General Operation:: General operation of Automake
130* Strictness:: Standards conformance checking
131* Uniform:: The Uniform Naming Scheme
132* Canonicalization:: How derived variables are named
133* User Variables:: Variables reserved for the user
134* Auxiliary Programs:: Programs automake might require
135
136
137File: automake.info, Node: General Operation, Next: Strictness, Prev: Generalities, Up: Generalities
138
139General Operation
140=================
141
142Automake works by reading a `Makefile.am' and generating a
143`Makefile.in'. Certain variables and targets defined in the
144`Makefile.am' instruct Automake to generate more specialized code; for
145instance, a `bin_PROGRAMS' variable definition will cause targets for
146compiling and linking programs to be generated.
147
148 The variable definitions and targets in the `Makefile.am' are copied
149verbatim into the generated file. This allows you to add arbitrary code
150into the generated `Makefile.in'. For instance the Automake
151distribution includes a non-standard `cvs-dist' target, which the
152Automake maintainer uses to make distributions from his source control
153system.
154
155 Note that most GNU make extensions are not recognized by Automake.
156Using such extensions in a `Makefile.am' will lead to errors or
157confusing behavior.
158
159 A special exception is that the GNU make append operator, `+=', is
160supported. This operator appends its right hand argument to the
161variable specified on the left. Automake will translate the operator
162into an ordinary `=' operator; `+=' will thus work with any make
163program.
164
165 Automake tries to keep comments grouped with any adjoining targets or
166variable definitions.
167
168 A target defined in `Makefile.am' generally overrides any such
169target of a similar name that would be automatically generated by
170`automake'. Although this is a supported feature, it is generally best
171to avoid making use of it, as sometimes the generated rules are very
172particular.
173
174 Similarly, a variable defined in `Makefile.am' or `AC_SUBST''ed from
175`configure.in' will override any definition of the variable that
176`automake' would ordinarily create. This feature is more often useful
177than the ability to override a target definition. Be warned that many
178of the variables generated by `automake' are considered to be for
179internal use only, and their names might change in future releases.
180
181 When examining a variable definition, Automake will recursively
182examine variables referenced in the definition. For example, if
183Automake is looking at the content of `foo_SOURCES' in this snippet
184
185 xs = a.c b.c
186 foo_SOURCES = c.c $(xs)
187
188 it would use the files `a.c', `b.c', and `c.c' as the contents of
189`foo_SOURCES'.
190
191 Automake also allows a form of comment which is _not_ copied into
192the output; all lines beginning with `##' (leading spaces allowed) are
193completely ignored by Automake.
194
195 It is customary to make the first line of `Makefile.am' read:
196
197 ## Process this file with automake to produce Makefile.in
198
199
200File: automake.info, Node: Strictness, Next: Uniform, Prev: General Operation, Up: Generalities
201
202Strictness
203==========
204
205While Automake is intended to be used by maintainers of GNU packages, it
206does make some effort to accommodate those who wish to use it, but do
207not want to use all the GNU conventions.
208
209 To this end, Automake supports three levels of "strictness"--the
210strictness indicating how stringently Automake should check standards
211conformance.
212
213 The valid strictness levels are:
214
215`foreign'
216 Automake will check for only those things which are absolutely
217 required for proper operations. For instance, whereas GNU
218 standards dictate the existence of a `NEWS' file, it will not be
219 required in this mode. The name comes from the fact that Automake
220 is intended to be used for GNU programs; these relaxed rules are
221 not the standard mode of operation.
222
223`gnu'
224 Automake will check--as much as possible--for compliance to the GNU
225 standards for packages. This is the default.
226
227`gnits'
228 Automake will check for compliance to the as-yet-unwritten "Gnits
229 standards". These are based on the GNU standards, but are even
230 more detailed. Unless you are a Gnits standards contributor, it is
231 recommended that you avoid this option until such time as the Gnits
232 standard is actually published (which may never happen).
233
234 For more information on the precise implications of the strictness
235level, see *Note Gnits::.
236
237 Automake also has a special "cygnus" mode which is similar to
238strictness but handled differently. This mode is useful for packages
239which are put into a "Cygnus" style tree (e.g., the GCC tree). For
240more information on this mode, see *Note Cygnus::.
241
242
243File: automake.info, Node: Uniform, Next: Canonicalization, Prev: Strictness, Up: Generalities
244
245The Uniform Naming Scheme
246=========================
247
248Automake variables generally follow a "uniform naming scheme" that
249makes it easy to decide how programs (and other derived objects) are
250built, and how they are installed. This scheme also supports
251`configure' time determination of what should be built.
252
253 At `make' time, certain variables are used to determine which
254objects are to be built. The variable names are made of several pieces
255which are concatenated together.
256
257 The piece which tells automake what is being built is commonly called
258the "primary". For instance, the primary `PROGRAMS' holds a list of
259programs which are to be compiled and linked.
260
261 A different set of names is used to decide where the built objects
262should be installed. These names are prefixes to the primary which
263indicate which standard directory should be used as the installation
264directory. The standard directory names are given in the GNU standards
265(*note Directory Variables: (standards)Directory Variables.). Automake
266extends this list with `pkglibdir', `pkgincludedir', and `pkgdatadir';
267these are the same as the non-`pkg' versions, but with `@PACKAGE@'
268appended. For instance, `pkglibdir' is defined as
269`$(libdir)/@PACKAGE@'.
270
271 For each primary, there is one additional variable named by
272prepending `EXTRA_' to the primary name. This variable is used to list
273objects which may or may not be built, depending on what `configure'
274decides. This variable is required because Automake must statically
275know the entire list of objects that may be built in order to generate
276a `Makefile.in' that will work in all cases.
277
278 For instance, `cpio' decides at configure time which programs are
279built. Some of the programs are installed in `bindir', and some are
280installed in `sbindir':
281
282 EXTRA_PROGRAMS = mt rmt
283 bin_PROGRAMS = cpio pax
284 sbin_PROGRAMS = @MORE_PROGRAMS@
285
286 Defining a primary without a prefix as a variable, e.g., `PROGRAMS',
287is an error.
288
289 Note that the common `dir' suffix is left off when constructing the
290variable names; thus one writes `bin_PROGRAMS' and not
291`bindir_PROGRAMS'.
292
293 Not every sort of object can be installed in every directory.
294Automake will flag those attempts it finds in error. Automake will
295also diagnose obvious misspellings in directory names.
296
297 Sometimes the standard directories--even as augmented by Automake--
298are not enough. In particular it is sometimes useful, for clarity, to
299install objects in a subdirectory of some predefined directory. To this
300end, Automake allows you to extend the list of possible installation
301directories. A given prefix (e.g. `zar') is valid if a variable of the
302same name with `dir' appended is defined (e.g. `zardir').
303
304 For instance, until HTML support is part of Automake, you could use
305this to install raw HTML documentation:
306
307 htmldir = $(prefix)/html
308 html_DATA = automake.html
309
310 The special prefix `noinst' indicates that the objects in question
311should be built but not installed at all. This is usually used for
312objects required to build the rest of your package, for instance static
313libraries (*note A Library::), or helper scripts.
314
315 The special prefix `check' indicates that the objects in question
316should not be built until the `make check' command is run. Those
317objects are not installed either.
318
319 The current primary names are `PROGRAMS', `LIBRARIES', `LISP',
320`PYTHON', `JAVA', `SCRIPTS', `DATA', `HEADERS', `MANS', and `TEXINFOS'.
321
322 Some primaries also allow additional prefixes which control other
323aspects of `automake''s behavior. The currently defined prefixes are
324`dist_', `nodist_', and `nobase_'. These prefixes are explained later
325(*note Program and Library Variables::).
326
327
328File: automake.info, Node: Canonicalization, Next: User Variables, Prev: Uniform, Up: Generalities
329
330How derived variables are named
331===============================
332
333Sometimes a Makefile variable name is derived from some text the
334maintainer supplies. For instance, a program name listed in
335`_PROGRAMS' is rewritten into the name of a `_SOURCES' variable. In
336cases like this, Automake canonicalizes the text, so that program names
337and the like do not have to follow Makefile variable naming rules. All
338characters in the name except for letters, numbers, the strudel (@),
339and the underscore are turned into underscores when making variable
340references.
341
342 For example, if your program is named `sniff-glue', the derived
343variable name would be `sniff_glue_SOURCES', not `sniff-glue_SOURCES'.
344Similarly the sources for a library named `libmumble++.a' should be
345listed in the `libmumble___a_SOURCES' variable.
346
347 The strudel is an addition, to make the use of Autoconf
348substitutions in variable names less obfuscating.
349
350
351File: automake.info, Node: User Variables, Next: Auxiliary Programs, Prev: Canonicalization, Up: Generalities
352
353Variables reserved for the user
354===============================
355
356Some `Makefile' variables are reserved by the GNU Coding Standards for
357the use of the "user" - the person building the package. For instance,
358`CFLAGS' is one such variable.
359
360 Sometimes package developers are tempted to set user variables such
361as `CFLAGS' because it appears to make their job easier - they don't
362have to introduce a second variable into every target.
363
364 However, the package itself should never set a user variable,
365particularly not to include switches which are required for proper
366compilation of the package. Since these variables are documented as
367being for the package builder, that person rightfully expects to be able
368to override any of these variables at build time.
369
370 To get around this problem, automake introduces an automake-specific
371shadow variable for each user flag variable. (Shadow variables are not
372introduced for variables like `CC', where they would make no sense.)
373The shadow variable is named by prepending `AM_' to the user variable's
374name. For instance, the shadow variable for `YFLAGS' is `AM_YFLAGS'.
375
376
377File: automake.info, Node: Auxiliary Programs, Prev: User Variables, Up: Generalities
378
379Programs automake might require
380===============================
381
382Automake sometimes requires helper programs so that the generated
383`Makefile' can do its work properly. There are a fairly large number
384of them, and we list them here.
385
386`ansi2knr.c'
387`ansi2knr.1'
388 These two files are used by the automatic de-ANSI-fication support
389 (*note ANSI::).
390
391`compile'
392 This is a wrapper for compilers which don't accept both `-c' and
393 `-o' at the same time. It is only used when absolutely required.
394 Such compilers are rare.
395
396`config.guess'
397`config.sub'
398 These programs compute the canonical triplets for the given build,
399 host, or target architecture. These programs are updated
400 regularly to support new architectures and fix probes broken by
401 changes in new kernel versions. You are encouraged to fetch the
402 latest versions of these files from
403 <ftp://ftp.gnu.org/gnu/config/> before making a release.
404
405`depcomp'
406 This program understands how to run a compiler so that it will
407 generate not only the desired output but also dependency
408 information which is then used by the automatic dependency
409 tracking feature.
410
411`elisp-comp'
412 This program is used to byte-compile Emacs Lisp code.
413
414`install-sh'
415 This is a replacement for the `install' program which works on
416 platforms where `install' is unavailable or unusable.
417
418`mdate-sh'
419 This script is used to generate a `version.texi' file. It examines
420 a file and prints some date information about it.
421
422`missing'
423 This wraps a number of programs which are typically only required
424 by maintainers. If the program in question doesn't exist,
425 `missing' prints an informative warning and attempts to fix things
426 so that the build can continue.
427
428`mkinstalldirs'
429 This works around the fact that `mkdir -p' is not portable.
430
431`py-compile'
432 This is used to byte-compile Python scripts.
433
434`texinfo.tex'
435 Not a program, this file is required for `make dvi', `make ps' and
436 `make pdf' to work when Texinfo sources are in the package.
437
438`ylwrap'
439 This program wraps `lex' and `yacc' and ensures that, for
440 instance, multiple `yacc' instances can be invoked in a single
441 directory in parallel.
442
443
444
445File: automake.info, Node: Examples, Next: Invoking Automake, Prev: Generalities, Up: Top
446
447Some example packages
448*********************
449
450* Menu:
451
452* Complete:: A simple example, start to finish
453* Hello:: A classic program
454* true:: Building true and false
455
456
457File: automake.info, Node: Complete, Next: Hello, Prev: Examples, Up: Examples
458
459A simple example, start to finish
460=================================
461
462Let's suppose you just finished writing `zardoz', a program to make
463your head float from vortex to vortex. You've been using Autoconf to
464provide a portability framework, but your `Makefile.in's have been
465ad-hoc. You want to make them bulletproof, so you turn to Automake.
466
467 The first step is to update your `configure.in' to include the
468commands that `automake' needs. The way to do this is to add an
469`AM_INIT_AUTOMAKE' call just after `AC_INIT':
470
471 AC_INIT(zardoz, 1.0)
472 AM_INIT_AUTOMAKE
473 ...
474
475 Since your program doesn't have any complicating factors (e.g., it
476doesn't use `gettext', it doesn't want to build a shared library),
477you're done with this part. That was easy!
478
479 Now you must regenerate `configure'. But to do that, you'll need to
480tell `autoconf' how to find the new macro you've used. The easiest way
481to do this is to use the `aclocal' program to generate your
482`aclocal.m4' for you. But wait... maybe you already have an
483`aclocal.m4', because you had to write some hairy macros for your
484program. The `aclocal' program lets you put your own macros into
485`acinclude.m4', so simply rename and then run:
486
487 mv aclocal.m4 acinclude.m4
488 aclocal
489 autoconf
490
491 Now it is time to write your `Makefile.am' for `zardoz'. Since
492`zardoz' is a user program, you want to install it where the rest of
493the user programs go: `bindir'. Additionally, `zardoz' has some
494Texinfo documentation. Your `configure.in' script uses
495`AC_REPLACE_FUNCS', so you need to link against `$(LIBOBJS)'. So
496here's what you'd write:
497
498 bin_PROGRAMS = zardoz
499 zardoz_SOURCES = main.c head.c float.c vortex9.c gun.c
500 zardoz_LDADD = $(LIBOBJS)
501
502 info_TEXINFOS = zardoz.texi
503
504 Now you can run `automake --add-missing' to generate your
505`Makefile.in' and grab any auxiliary files you might need, and you're
506done!
507
508
509File: automake.info, Node: Hello, Next: true, Prev: Complete, Up: Examples
510
511A classic program
512=================
513
514GNU hello (ftp://prep.ai.mit.edu/pub/gnu/hello-1.3.tar.gz) is renowned
515for its classic simplicity and versatility. This section shows how
516Automake could be used with the GNU Hello package. The examples below
517are from the latest beta version of GNU Hello, but with all of the
518maintainer-only code stripped out, as well as all copyright comments.
519
520 Of course, GNU Hello is somewhat more featureful than your
521traditional two-liner. GNU Hello is internationalized, does option
522processing, and has a manual and a test suite.
523
524 Here is the `configure.in' from GNU Hello. *Please note:* The calls
525to `AC_INIT' and `AM_INIT_AUTOMAKE' in this example use a deprecated
526syntax. For the current approach, see the description of
527`AM_INIT_AUTOMAKE' in *Note Public macros::.
528
529 dnl Process this file with autoconf to produce a configure script.
530 AC_INIT(src/hello.c)
531 AM_INIT_AUTOMAKE(hello, 1.3.11)
532 AM_CONFIG_HEADER(config.h)
533
534 dnl Set of available languages.
535 ALL_LINGUAS="de fr es ko nl no pl pt sl sv"
536
537 dnl Checks for programs.
538 AC_PROG_CC
539 AC_ISC_POSIX
540
541 dnl Checks for libraries.
542
543 dnl Checks for header files.
544 AC_STDC_HEADERS
545 AC_HAVE_HEADERS(string.h fcntl.h sys/file.h sys/param.h)
546
547 dnl Checks for library functions.
548 AC_FUNC_ALLOCA
549
550 dnl Check for st_blksize in struct stat
551 AC_ST_BLKSIZE
552
553 dnl internationalization macros
554 AM_GNU_GETTEXT
555 AC_OUTPUT([Makefile doc/Makefile intl/Makefile po/Makefile.in \
556 src/Makefile tests/Makefile tests/hello],
557 [chmod +x tests/hello])
558
559 The `AM_' macros are provided by Automake (or the Gettext library);
560the rest are standard Autoconf macros.
561
562 The top-level `Makefile.am':
563
564 EXTRA_DIST = BUGS ChangeLog.O
565 SUBDIRS = doc intl po src tests
566
567 As you can see, all the work here is really done in subdirectories.
568
569 The `po' and `intl' directories are automatically generated using
570`gettextize'; they will not be discussed here.
571
572 In `doc/Makefile.am' we see:
573
574 info_TEXINFOS = hello.texi
575 hello_TEXINFOS = gpl.texi
576
577 This is sufficient to build, install, and distribute the GNU Hello
578manual.
579
580 Here is `tests/Makefile.am':
581
582 TESTS = hello
583 EXTRA_DIST = hello.in testdata
584
585 The script `hello' is generated by `configure', and is the only test
586case. `make check' will run this test.
587
588 Last we have `src/Makefile.am', where all the real work is done:
589
590 bin_PROGRAMS = hello
591 hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h system.h
592 hello_LDADD = @INTLLIBS@ @ALLOCA@
593 localedir = $(datadir)/locale
594 INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\"
595
596
597File: automake.info, Node: true, Prev: Hello, Up: Examples
598
599Building true and false
600=======================
601
602Here is another, trickier example. It shows how to generate two
603programs (`true' and `false') from the same source file (`true.c').
604The difficult part is that each compilation of `true.c' requires
605different `cpp' flags.
606
607 bin_PROGRAMS = true false
608 false_SOURCES =
609 false_LDADD = false.o
610
611 true.o: true.c
612 $(COMPILE) -DEXIT_CODE=0 -c true.c
613
614 false.o: true.c
615 $(COMPILE) -DEXIT_CODE=1 -o false.o -c true.c
616
617 Note that there is no `true_SOURCES' definition. Automake will
618implicitly assume that there is a source file named `true.c', and
619define rules to compile `true.o' and link `true'. The `true.o: true.c'
620rule supplied by the above `Makefile.am', will override the Automake
621generated rule to build `true.o'.
622
623 `false_SOURCES' is defined to be empty--that way no implicit value
624is substituted. Because we have not listed the source of `false', we
625have to tell Automake how to link the program. This is the purpose of
626the `false_LDADD' line. A `false_DEPENDENCIES' variable, holding the
627dependencies of the `false' target will be automatically generated by
628Automake from the content of `false_LDADD'.
629
630 The above rules won't work if your compiler doesn't accept both `-c'
631and `-o'. The simplest fix for this is to introduce a bogus dependency
632(to avoid problems with a parallel `make'):
633
634 true.o: true.c false.o
635 $(COMPILE) -DEXIT_CODE=0 -c true.c
636
637 false.o: true.c
638 $(COMPILE) -DEXIT_CODE=1 -c true.c && mv true.o false.o
639
640 Also, these explicit rules do not work if the de-ANSI-fication
641feature is used (*note ANSI::). Supporting de-ANSI-fication requires a
642little more work:
643
644 true._o: true._c false.o
645 $(COMPILE) -DEXIT_CODE=0 -c true.c
646
647 false._o: true._c
648 $(COMPILE) -DEXIT_CODE=1 -c true.c && mv true._o false.o
649
650 As it turns out, there is also a much easier way to do this same
651task. Some of the above techniques are useful enough that we've kept
652the example in the manual. However if you were to build `true' and
653`false' in real life, you would probably use per-program compilation
654flags, like so:
655
656 bin_PROGRAMS = false true
657
658 false_SOURCES = true.c
659 false_CPPFLAGS = -DEXIT_CODE=1
660
661 true_SOURCES = true.c
662 true_CPPFLAGS = -DEXIT_CODE=0
663
664 In this case Automake will cause `true.c' to be compiled twice, with
665different flags. De-ANSI-fication will work automatically. In this
666instance, the names of the object files would be chosen by automake;
667they would be `false-true.o' and `true-true.o'. (The name of the
668object files rarely matters.)
669
670
671File: automake.info, Node: Invoking Automake, Next: configure, Prev: Examples, Up: Top
672
673Creating a `Makefile.in'
674************************
675
676To create all the `Makefile.in's for a package, run the `automake'
677program in the top level directory, with no arguments. `automake' will
678automatically find each appropriate `Makefile.am' (by scanning
679`configure.in'; *note configure::) and generate the corresponding
680`Makefile.in'. Note that `automake' has a rather simplistic view of
681what constitutes a package; it assumes that a package has only one
682`configure.in', at the top. If your package has multiple
683`configure.in's, then you must run `automake' in each directory holding
684a `configure.in'. (Alternatively, you may rely on Autoconf's
685`autoreconf', which is able to recurse your package tree and run
686`automake' where appropriate.)
687
688 You can optionally give `automake' an argument; `.am' is appended to
689the argument and the result is used as the name of the input file.
690This feature is generally only used to automatically rebuild an
691out-of-date `Makefile.in'. Note that `automake' must always be run
692from the topmost directory of a project, even if being used to
693regenerate the `Makefile.in' in some subdirectory. This is necessary
694because `automake' must scan `configure.in', and because `automake'
695uses the knowledge that a `Makefile.in' is in a subdirectory to change
696its behavior in some cases.
697
698 Automake will run `autoconf' to scan `configure.in' and its
699dependencies (`aclocal.m4'), therefore `autoconf' must be in your
700`PATH'. If there is an `AUTOCONF' variable in your environment it will
701be used instead of `autoconf', this allows you to select a particular
702version of Autoconf. By the way, don't misunderstand this paragraph:
703Automake runs `autoconf' to *scan* your `configure.in', this won't build
704`configure' and you still have to run `autoconf' yourself for this
705purpose.
706
707 `automake' accepts the following options:
708
709`-a'
710`--add-missing'
711 Automake requires certain common files to exist in certain
712 situations; for instance `config.guess' is required if
713 `configure.in' runs `AC_CANONICAL_HOST'. Automake is distributed
714 with several of these files (*note Auxiliary Programs::); this
715 option will cause the missing ones to be automatically added to
716 the package, whenever possible. In general if Automake tells you
717 a file is missing, try using this option. By default Automake
718 tries to make a symbolic link pointing to its own copy of the
719 missing file; this can be changed with `--copy'.
720
721 Many of the potentially-missing files are common scripts whose
722 location may be specified via the `AC_CONFIG_AUX_DIR' macro.
723 Therefore, `AC_CONFIG_AUX_DIR''s setting affects whether a file is
724 considered missing, and where the missing file is added (*note
725 Optional::).
726
727`--libdir=DIR'
728 Look for Automake data files in directory DIR instead of in the
729 installation directory. This is typically used for debugging.
730
731`-c'
732`--copy'
733 When used with `--add-missing', causes installed files to be
734 copied. The default is to make a symbolic link.
735
736`--cygnus'
737 Causes the generated `Makefile.in's to follow Cygnus rules, instead
738 of GNU or Gnits rules. For more information, see *Note Cygnus::.
739
740`-f'
741`--force-missing'
742 When used with `--add-missing', causes standard files to be
743 reinstalled even if they already exist in the source tree. This
744 involves removing the file from the source tree before creating
745 the new symlink (or, with `--copy', copying the new file).
746
747`--foreign'
748 Set the global strictness to `foreign'. For more information, see
749 *Note Strictness::.
750
751`--gnits'
752 Set the global strictness to `gnits'. For more information, see
753 *Note Gnits::.
754
755`--gnu'
756 Set the global strictness to `gnu'. For more information, see
757 *Note Gnits::. This is the default strictness.
758
759`--help'
760 Print a summary of the command line options and exit.
761
762`-i'
763`--ignore-deps'
764 This disables the dependency tracking feature in generated
765 `Makefile's; see *Note Dependencies::.
766
767`--include-deps'
768 This enables the dependency tracking feature. This feature is
769 enabled by default. This option is provided for historical
770 reasons only and probably should not be used.
771
772`--no-force'
773 Ordinarily `automake' creates all `Makefile.in's mentioned in
774 `configure.in'. This option causes it to only update those
775 `Makefile.in's which are out of date with respect to one of their
776 dependents.
777
778 Due to a bug in its implementation, this option is currently
779 ignored. It will be fixed in Automake 1.8.
780
781`-o DIR'
782`--output-dir=DIR'
783 Put the generated `Makefile.in' in the directory DIR. Ordinarily
784 each `Makefile.in' is created in the directory of the
785 corresponding `Makefile.am'. This option is deprecated and will be
786 removed in a future release.
787
788`-v'
789`--verbose'
790 Cause Automake to print information about which files are being
791 read or created.
792
793`--version'
794 Print the version number of Automake and exit.
795
796`-W CATEGORY'
797
798`--warnings=CATEGORY'
799 Output warnings falling in CATEGORY. CATEGORY can be one of:
800 `gnu'
801 warnings related to the GNU Coding Standards (*note Top:
802 (standards)Top.).
803
804 `obsolete'
805 obsolete features or constructions
806
807 `portability'
808 portability issues (e.g., use of Make features which are
809 known not portable)
810
811 `syntax'
812 weird syntax, unused variables, typos
813
814 `unsupported'
815 unsupported or incomplete features
816
817 `all'
818 all the warnings
819
820 `none'
821 turn off all the warnings
822
823 `error'
824 treat warnings as errors
825
826 A category can be turned off by prefixing its name with `no-'. For
827 instance `-Wno-syntax' will hide the warnings about unused
828 variables.
829
830 The categories output by default are `syntax' and `unsupported'.
831 Additionally, `gnu' is enabled in `--gnu' and `--gnits' strictness.
832
833 `portability' warnings are currently disabled by default, but they
834 will be enabled in `--gnu' and `--gnits' strictness in a future
835 release.
836
837 The environment variable `WARNINGS' can contain a comma separated
838 list of categories to enable. It will be taken into account
839 before the command-line switches, this way `-Wnone' will also
840 ignore any warning category enabled by `WARNINGS'. This variable
841 is also used by other tools like `autoconf'; unknown categories
842 are ignored for this reason.
843
844
845
846File: automake.info, Node: configure, Next: Top level, Prev: Invoking Automake, Up: Top
847
848Scanning `configure.in'
849***********************
850
851Automake scans the package's `configure.in' to determine certain
852information about the package. Some `autoconf' macros are required and
853some variables must be defined in `configure.in'. Automake will also
854use information from `configure.in' to further tailor its output.
855
856 Automake also supplies some Autoconf macros to make the maintenance
857easier. These macros can automatically be put into your `aclocal.m4'
858using the `aclocal' program.
859
860* Menu:
861
862* Requirements:: Configuration requirements
863* Optional:: Other things Automake recognizes
864* Invoking aclocal:: Auto-generating aclocal.m4
865* aclocal options:: aclocal command line arguments
866* Macro search path:: Modifying aclocal's search path
867* Macros:: Autoconf macros supplied with Automake
868* Extending aclocal:: Writing your own aclocal macros
869
870
871File: automake.info, Node: Requirements, Next: Optional, Prev: configure, Up: configure
872
873Configuration requirements
874==========================
875
876The one real requirement of Automake is that your `configure.in' call
877`AM_INIT_AUTOMAKE'. This macro does several things which are required
878for proper Automake operation (*note Macros::).
879
880 Here are the other macros which Automake requires but which are not
881run by `AM_INIT_AUTOMAKE':
882
883`AC_CONFIG_FILES'
884`AC_OUTPUT'
885 Automake uses these to determine which files to create (*note
886 Creating Output Files: (autoconf)Output.). A listed file is
887 considered to be an Automake generated `Makefile' if there exists
888 a file with the same name and the `.am' extension appended.
889 Typically, `AC_CONFIG_FILES([foo/Makefile])' will cause Automake to
890 generate `foo/Makefile.in' if `foo/Makefile.am' exists.
891
892 These files are all removed by `make distclean'.
893
894
895File: automake.info, Node: Optional, Next: Invoking aclocal, Prev: Requirements, Up: configure
896
897Other things Automake recognizes
898================================
899
900Every time Automake is run it calls Autoconf to trace `configure.in'.
901This way it can recognize the use of certain macros and tailor the
902generated `Makefile.in' appropriately. Currently recognized macros and
903their effects are:
904
905`AC_CONFIG_HEADERS'
906 Automake will generate rules to rebuild these headers. Older
907 versions of Automake required the use of `AM_CONFIG_HEADER' (*note
908 Macros::); this is no longer the case today.
909
910`AC_CONFIG_AUX_DIR'
911 Automake will look for various helper scripts, such as
912 `mkinstalldirs', in the directory named in this macro invocation.
913 (The full list of scripts is: `config.guess', `config.sub',
914 `depcomp', `elisp-comp', `compile', `install-sh', `ltmain.sh',
915 `mdate-sh', `missing', `mkinstalldirs', `py-compile',
916 `texinfo.tex', and `ylwrap'.) Not all scripts are always searched
917 for; some scripts will only be sought if the generated
918 `Makefile.in' requires them.
919
920 If `AC_CONFIG_AUX_DIR' is not given, the scripts are looked for in
921 their `standard' locations. For `mdate-sh', `texinfo.tex', and
922 `ylwrap', the standard location is the source directory
923 corresponding to the current `Makefile.am'. For the rest, the
924 standard location is the first one of `.', `..', or `../..'
925 (relative to the top source directory) that provides any one of
926 the helper scripts. *Note Finding `configure' Input:
927 (autoconf)Input.
928
929 Required files from `AC_CONFIG_AUX_DIR' are automatically
930 distributed, even if there is no `Makefile.am' in this directory.
931
932`AC_CANONICAL_HOST'
933 Automake will ensure that `config.guess' and `config.sub' exist.
934 Also, the `Makefile' variables `host_alias' and `host_triplet' are
935 introduced. See *Note Getting the Canonical System Type:
936 (autoconf)Canonicalizing.
937
938`AC_CANONICAL_SYSTEM'
939 This is similar to `AC_CANONICAL_HOST', but also defines the
940 `Makefile' variables `build_alias' and `target_alias'. *Note
941 Getting the Canonical System Type: (autoconf)Canonicalizing.
942
943`AC_LIBSOURCE'
944`AC_LIBSOURCES'
945`AC_LIBOBJ'
946 Automake will automatically distribute any file listed in
947 `AC_LIBSOURCE' or `AC_LIBSOURCES'.
948
949 Note that the `AC_LIBOBJ' macro calls `AC_LIBSOURCE'. So if an
950 Autoconf macro is documented to call `AC_LIBOBJ([file])', then
951 `file.c' will be distributed automatically by Automake. This
952 encompasses many macros like `AC_FUNC_ALLOCA', `AC_FUNC_MEMCMP',
953 `AC_REPLACE_FUNCS', and others.
954
955 By the way, direct assignments to `LIBOBJS' are no longer
956 supported. You should always use `AC_LIBOBJ' for this purpose.
957 *Note `AC_LIBOBJ' vs. `LIBOBJS': (autoconf)AC_LIBOBJ vs LIBOBJS.
958
959`AC_PROG_RANLIB'
960 This is required if any libraries are built in the package. *Note
961 Particular Program Checks: (autoconf)Particular Programs.
962
963`AC_PROG_CXX'
964 This is required if any C++ source is included. *Note Particular
965 Program Checks: (autoconf)Particular Programs.
966
967`AC_PROG_F77'
968 This is required if any Fortran 77 source is included. This macro
969 is distributed with Autoconf version 2.13 and later. *Note
970 Particular Program Checks: (autoconf)Particular Programs.
971
972`AC_F77_LIBRARY_LDFLAGS'
973 This is required for programs and shared libraries that are a
974 mixture of languages that include Fortran 77 (*note Mixing Fortran
975 77 With C and C++::). *Note Autoconf macros supplied with
976 Automake: Macros.
977
978`AC_PROG_LIBTOOL'
979 Automake will turn on processing for `libtool' (*note
980 Introduction: (libtool)Top.).
981
982`AC_PROG_YACC'
983 If a Yacc source file is seen, then you must either use this macro
984 or define the variable `YACC' in `configure.in'. The former is
985 preferred (*note Particular Program Checks: (autoconf)Particular
986 Programs.).
987
988`AC_PROG_LEX'
989 If a Lex source file is seen, then this macro must be used. *Note
990 Particular Program Checks: (autoconf)Particular Programs.
991
992`AC_SUBST'
993 The first argument is automatically defined as a variable in each
994 generated `Makefile.in'. *Note Setting Output Variables:
995 (autoconf)Setting Output Variables.
996
997 If the Autoconf manual says that a macro calls `AC_SUBST' for VAR,
998 or defines the output variable VAR then VAR will be defined in
999 each `Makefile.in' generated by Automake. E.g. `AC_PATH_XTRA'
1000 defines `X_CFLAGS' and `X_LIBS', so you can use these variables in
1001 any `Makefile.am' if `AC_PATH_XTRA' is called.
1002
1003`AM_C_PROTOTYPES'
1004 This is required when using automatic de-ANSI-fication; see *Note
1005 ANSI::.
1006
1007`AM_GNU_GETTEXT'
1008 This macro is required for packages which use GNU gettext (*note
1009 gettext::). It is distributed with gettext. If Automake sees
1010 this macro it ensures that the package meets some of gettext's
1011 requirements.
1012
1013`AM_MAINTAINER_MODE'
1014 This macro adds a `--enable-maintainer-mode' option to
1015 `configure'. If this is used, `automake' will cause
1016 `maintainer-only' rules to be turned off by default in the
1017 generated `Makefile.in's. This macro defines the `MAINTAINER_MODE'
1018 conditional, which you can use in your own `Makefile.am'.
1019
1020
1021
1022File: automake.info, Node: Invoking aclocal, Next: aclocal options, Prev: Optional, Up: configure
1023
1024Auto-generating aclocal.m4
1025==========================
1026
1027Automake includes a number of Autoconf macros which can be used in your
1028package; some of them are actually required by Automake in certain
1029situations. These macros must be defined in your `aclocal.m4';
1030otherwise they will not be seen by `autoconf'.
1031
1032 The `aclocal' program will automatically generate `aclocal.m4' files
1033based on the contents of `configure.in'. This provides a convenient
1034way to get Automake-provided macros, without having to search around.
1035Also, the `aclocal' mechanism allows other packages to supply their own
1036macros.
1037
1038 At startup, `aclocal' scans all the `.m4' files it can find, looking
1039for macro definitions (*note Macro search path::). Then it scans
1040`configure.in'. Any mention of one of the macros found in the first
1041step causes that macro, and any macros it in turn requires, to be put
1042into `aclocal.m4'.
1043
1044 The contents of `acinclude.m4', if it exists, are also automatically
1045included in `aclocal.m4'. This is useful for incorporating local
1046macros into `configure'.
1047
1048 `aclocal' tries to be smart about looking for new `AC_DEFUN's in the
1049files it scans. It also tries to copy the full text of the scanned
1050file into `aclocal.m4', including both `#' and `dnl' comments. If you
1051want to make a comment which will be completely ignored by `aclocal',
1052use `##' as the comment leader.
1053
1054* Menu:
1055
1056* aclocal options:: Options supported by aclocal
1057* Macro search path:: How aclocal finds .m4 files
1058
1059
1060File: automake.info, Node: aclocal options, Next: Macro search path, Prev: Invoking aclocal, Up: configure
1061
1062aclocal options
1063===============
1064
1065`aclocal' accepts the following options:
1066
1067`--acdir=DIR'
1068 Look for the macro files in DIR instead of the installation
1069 directory. This is typically used for debugging.
1070
1071`--help'
1072 Print a summary of the command line options and exit.
1073
1074`-I DIR'
1075 Add the directory DIR to the list of directories searched for
1076 `.m4' files.
1077
1078`--output=FILE'
1079 Cause the output to be put into FILE instead of `aclocal.m4'.
1080
1081`--print-ac-dir'
1082 Prints the name of the directory which `aclocal' will search to
1083 find third-party `.m4' files. When this option is given, normal
1084 processing is suppressed. This option can be used by a package to
1085 determine where to install a macro file.
1086
1087`--verbose'
1088 Print the names of the files it examines.
1089
1090`--version'
1091 Print the version number of Automake and exit.
1092
1093
1094File: automake.info, Node: Macro search path, Next: Macros, Prev: aclocal options, Up: configure
1095
1096Macro search path
1097=================
1098
1099By default, `aclocal' searches for `.m4' files in the following
1100directories, in this order:
1101
1102`ACDIR-APIVERSION'
1103 This is where the `.m4' macros distributed with automake itself
1104 are stored. APIVERSION depends on the automake release used; for
1105 automake 1.6.x, APIVERSION = `1.6'.
1106
1107`ACDIR'
1108 This directory is intended for third party `.m4' files, and is
1109 configured when `automake' itself is built. This is
1110 `@datadir@/aclocal/', which typically expands to
1111 `${prefix}/share/aclocal/'. To find the compiled-in value of
1112 ACDIR, use the `--print-ac-dir' option (*note aclocal options::).
1113
1114 As an example, suppose that automake-1.6.2 was configured with
1115`--prefix=/usr/local'. Then, the search path would be:
1116
1117 1. `/usr/local/share/aclocal-1.6/'
1118
1119 2. `/usr/local/share/aclocal/'
1120
1121 As explained in (*note aclocal options::), there are several options
1122that can be used to change or extend this search path.
1123
1124Modifying the macro search path: `--acdir'
1125------------------------------------------
1126
1127The most obvious option to modify the search path is `--acdir=DIR',
1128which changes default directory and drops the APIVERSION directory.
1129For example, if one specifies `--acdir=/opt/private/', then the search
1130path becomes:
1131
1132 1. `/opt/private/'
1133
1134 Note that this option, `--acdir', is intended for use by the
1135internal automake test suite only; it is not ordinarily needed by
1136end-users.
1137
1138Modifying the macro search path: `-I DIR'
1139-----------------------------------------
1140
1141Any extra directories specified using `-I' options (*note aclocal
1142options::) are _prepended_ to this search list. Thus, `aclocal -I /foo
1143-I /bar' results in the following search path:
1144
1145 1. `/foo'
1146
1147 2. `/bar'
1148
1149 3. ACDIR-APIVERSION
1150
1151 4. ACDIR
1152
1153Modifying the macro search path: `dirlist'
1154------------------------------------------
1155
1156There is a third mechanism for customizing the search path. If a
1157`dirlist' file exists in ACDIR, then that file is assumed to contain a
1158list of directories, one per line, to be added to the search list.
1159These directories are searched _after_ all other directories.
1160
1161 For example, suppose `ACDIR/dirlist' contains the following:
1162
1163 /test1
1164 /test2
1165
1166and that `aclocal' was called with the `-I /foo -I /bar' options.
1167Then, the search path would be
1168
1169 1. `/foo'
1170
1171 2. `/bar'
1172
1173 3. ACDIR-APIVERSION
1174
1175 4. ACDIR
1176
1177 5. `/test1'
1178
1179 6. `/test2'
1180
1181 If the `--acdir=DIR' option is used, then `aclocal' will search for
1182the `dirlist' file in DIR. In the `--acdir=/opt/private/' example
1183above, `aclocal' would look for `/opt/private/dirlist'. Again,
1184however, the `--acdir' option is intended for use by the internal
1185automake test suite only; `--acdir' is not ordinarily needed by
1186end-users.
1187
1188 `dirlist' is useful in the following situation: suppose that
1189`automake' version `1.6.2' is installed with $prefix=/usr by the system
1190vendor. Thus, the default search directories are
1191
1192 1. `/usr/share/aclocal-1.6/'
1193
1194 2. `/usr/share/aclocal/'
1195
1196 However, suppose further that many packages have been manually
1197installed on the system, with $prefix=/usr/local, as is typical. In
1198that case, many of these "extra" `.m4' files are in
1199`/usr/local/share/aclocal'. The only way to force `/usr/bin/aclocal'
1200to find these "extra" `.m4' files is to always call `aclocal -I
1201/usr/local/share/aclocal'. This is inconvenient. With `dirlist', one
1202may create the file
1203
1204 `/usr/share/aclocal/dirlist'
1205
1206which contains only the single line
1207
1208 `/usr/local/share/aclocal'
1209
1210 Now, the "default" search path on the affected system is
1211
1212 1. `/usr/share/aclocal-1.6/'
1213
1214 2. `/usr/share/aclocal/'
1215
1216 3. `/usr/local/share/aclocal/'
1217
1218 without the need for `-I' options; `-I' options can be reserved for
1219project-specific needs (`my-source-dir/m4/'), rather than using it to
1220work around local system-dependent tool installation directories.
1221
1222 Similarly, `dirlist' can be handy if you have installed a local copy
1223Automake on your account and want `aclocal' to look for macros
1224installed at other places on the system.
1225
1226
1227File: automake.info, Node: Macros, Next: Extending aclocal, Prev: Macro search path, Up: configure
1228
1229Autoconf macros supplied with Automake
1230======================================
1231
1232Automake ships with several Autoconf macros that you can use from your
1233`configure.in'. When you use one of them it will be included by
1234`aclocal' in `aclocal.m4'.
1235
1236* Menu:
1237
1238* Public macros:: Macros that you can use.
1239* Private macros:: Macros that you should not use.
1240
1241
1242File: automake.info, Node: Public macros, Next: Private macros, Prev: Macros, Up: Macros
1243
1244Public macros
1245-------------
1246
1247`AM_CONFIG_HEADER'
1248 Automake will generate rules to automatically regenerate the config
1249 header. This obsolete macro is a synonym of `AC_CONFIG_HEADERS'
1250 today (*note Optional::).
1251
1252`AM_ENABLE_MULTILIB'
1253 This is used when a "multilib" library is being built. The first
1254 optional argument is the name of the `Makefile' being generated; it
1255 defaults to `Makefile'. The second option argument is used to find
1256 the top source directory; it defaults to the empty string
1257 (generally this should not be used unless you are familiar with
1258 the internals). *Note Multilibs::.
1259
1260`AM_C_PROTOTYPES'
1261 Check to see if function prototypes are understood by the
1262 compiler. If so, define `PROTOTYPES' and set the output variables
1263 `U' and `ANSI2KNR' to the empty string. Otherwise, set `U' to `_'
1264 and `ANSI2KNR' to `./ansi2knr'. Automake uses these values to
1265 implement automatic de-ANSI-fication.
1266
1267`AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL'
1268 If the use of `TIOCGWINSZ' requires `<sys/ioctl.h>', then define
1269 `GWINSZ_IN_SYS_IOCTL'. Otherwise `TIOCGWINSZ' can be found in
1270 `<termios.h>'.
1271
1272`AM_INIT_AUTOMAKE([OPTIONS])'
1273`AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])'
1274 Runs many macros required for proper operation of the generated
1275 Makefiles.
1276
1277 This macro has two forms, the first of which is preferred. In
1278 this form, `AM_INIT_AUTOMAKE' is called with a single argument --
1279 a space-separated list of Automake options which should be applied
1280 to every `Makefile.am' in the tree. The effect is as if each
1281 option were listed in `AUTOMAKE_OPTIONS'.
1282
1283 The second, deprecated, form of `AM_INIT_AUTOMAKE' has two required
1284 arguments: the package and the version number. This form is
1285 obsolete because the PACKAGE and VERSION can be obtained from
1286 Autoconf's `AC_INIT' macro (which itself has an old and a new
1287 form).
1288
1289 If your `configure.in' has:
1290 AC_INIT(src/foo.c)
1291 AM_INIT_AUTOMAKE(mumble, 1.5)
1292 you can modernize it as follows:
1293 AC_INIT(mumble, 1.5)
1294 AC_CONFIG_SRCDIR(src/foo.c)
1295 AM_INIT_AUTOMAKE
1296
1297 Note that if you're upgrading your `configure.in' from an earlier
1298 version of Automake, it is not always correct to simply move the
1299 package and version arguments from `AM_INIT_AUTOMAKE' directly to
1300 `AC_INIT', as in the example above. The first argument to
1301 `AC_INIT' should be the name of your package (e.g. `GNU Automake'),
1302 not the tarball name (e.g. `automake') that you used to pass to
1303 `AM_INIT_AUTOMAKE'. Autoconf tries to derive a tarball name from
1304 the package name, which should work for most but not all package
1305 names. (If it doesn't work for yours, you can use the
1306 four-argument form of `AC_INIT' -- supported in Autoconf versions
1307 greater than 2.52g -- to provide the tarball name explicitly).
1308
1309 By default this macro `AC_DEFINE''s `PACKAGE' and `VERSION'. This
1310 can be avoided by passing the `no-define' option, as in:
1311 AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2])
1312 or by passing a third non-empty argument to the obsolete form.
1313
1314`AM_PATH_LISPDIR'
1315 Searches for the program `emacs', and, if found, sets the output
1316 variable `lispdir' to the full path to Emacs' site-lisp directory.
1317
1318 Note that this test assumes the `emacs' found to be a version that
1319 supports Emacs Lisp (such as GNU Emacs or XEmacs). Other emacsen
1320 can cause this test to hang (some, like old versions of MicroEmacs,
1321 start up in interactive mode, requiring `C-x C-c' to exit, which
1322 is hardly obvious for a non-emacs user). In most cases, however,
1323 you should be able to use `C-c' to kill the test. In order to
1324 avoid problems, you can set `EMACS' to "no" in the environment, or
1325 use the `--with-lispdir' option to `configure' to explicitly set
1326 the correct path (if you're sure you have an `emacs' that supports
1327 Emacs Lisp.
1328
1329`AM_PROG_AS'
1330 Use this macro when you have assembly code in your project. This
1331 will choose the assembler for you (by default the C compiler) and
1332 set `CCAS', and will also set `CCASFLAGS' if required.
1333
1334`AM_PROG_CC_C_O'
1335 This is like `AC_PROG_CC_C_O', but it generates its results in the
1336 manner required by automake. You must use this instead of
1337 `AC_PROG_CC_C_O' when you need this functionality.
1338
1339`AM_PROG_CC_STDC'
1340 If the C compiler is not in ANSI C mode by default, try to add an
1341 option to output variable `CC' to make it so. This macro tries
1342 various options that select ANSI C on some system or another. It
1343 considers the compiler to be in ANSI C mode if it handles function
1344 prototypes correctly.
1345
1346 If you use this macro, you should check after calling it whether
1347 the C compiler has been set to accept ANSI C; if not, the shell
1348 variable `am_cv_prog_cc_stdc' is set to `no'. If you wrote your
1349 source code in ANSI C, you can make an un-ANSIfied copy of it by
1350 using the `ansi2knr' option (*note ANSI::).
1351
1352 This macro is a relic from the time Autoconf didn't offer such a
1353 feature. `AM_PROG_CC_STDC''s logic has now been merged into
1354 Autoconf's `AC_PROG_CC' macro, therefore you should use the latter
1355 instead. Chances are you are already using `AC_PROG_CC', so you
1356 can simply remove the `AM_PROG_CC_STDC' call and turn all
1357 occurrences of `$am_cv_prog_cc_stdc' into `$ac_cv_prog_cc_stdc'.
1358 `AM_PROG_CC_STDC' will be marked as obsolete (in the Autoconf
1359 sense) in Automake 1.8.
1360
1361`AM_PROG_LEX'
1362 Like `AC_PROG_LEX' (*note Particular Program Checks:
1363 (autoconf)Particular Programs.), but uses the `missing' script on
1364 systems that do not have `lex'. `HP-UX 10' is one such system.
1365
1366`AM_PROG_GCJ'
1367 This macro finds the `gcj' program or causes an error. It sets
1368 `GCJ' and `GCJFLAGS'. `gcj' is the Java front-end to the GNU
1369 Compiler Collection.
1370
1371`AM_SYS_POSIX_TERMIOS'
1372 Check to see if POSIX termios headers and functions are available
1373 on the system. If so, set the shell variable
1374 `am_cv_sys_posix_termios' to `yes'. If not, set the variable to
1375 `no'.
1376
1377`AM_WITH_DMALLOC'
1378 Add support for the dmalloc
1379 (ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz) package. If
1380 the user configures with `--with-dmalloc', then define
1381 `WITH_DMALLOC' and add `-ldmalloc' to `LIBS'.
1382
1383`AM_WITH_REGEX'
1384 Adds `--with-regex' to the `configure' command line. If specified
1385 (the default), then the `regex' regular expression library is
1386 used, `regex.o' is put into `LIBOBJS', and `WITH_REGEX' is
1387 defined. If `--without-regex' is given, then the `rx' regular
1388 expression library is used, and `rx.o' is put into `LIBOBJS'.
1389
1390
1391
1392File: automake.info, Node: Private macros, Prev: Public macros, Up: Macros
1393
1394Private macros
1395--------------
1396
1397The following macros are private macros you should not call directly.
1398They are called by the other public macros when appropriate. Do not
1399rely on them, as they might be changed in a future version. Consider
1400them as implementation details; or better, do not consider them at all:
1401skip this section!
1402
1403`_AM_DEPENDENCIES'
1404`AM_SET_DEPDIR'
1405`AM_DEP_TRACK'
1406`AM_OUTPUT_DEPENDENCY_COMMANDS'
1407 These macros are used to implement Automake's automatic dependency
1408 tracking scheme. They are called automatically by automake when
1409 required, and there should be no need to invoke them manually.
1410
1411`AM_MAKE_INCLUDE'
1412 This macro is used to discover how the user's `make' handles
1413 `include' statements. This macro is automatically invoked when
1414 needed; there should be no need to invoke it manually.
1415
1416`AM_PROG_INSTALL_STRIP'
1417 This is used to find a version of `install' which can be used to
1418 `strip' a program at installation time. This macro is
1419 automatically included when required.
1420
1421`AM_SANITY_CHECK'
1422 This checks to make sure that a file created in the build
1423 directory is newer than a file in the source directory. This can
1424 fail on systems where the clock is set incorrectly. This macro is
1425 automatically run from `AM_INIT_AUTOMAKE'.
1426
1427
1428
1429File: automake.info, Node: Extending aclocal, Prev: Macros, Up: configure
1430
1431Writing your own aclocal macros
1432===============================
1433
1434The `aclocal' program doesn't have any built-in knowledge of any
1435macros, so it is easy to extend it with your own macros.
1436
1437 This can be used by libraries which want to supply their own Autoconf
1438macros for use by other programs. For instance the `gettext' library
1439supplies a macro `AM_GNU_GETTEXT' which should be used by any package
1440using `gettext'. When the library is installed, it installs this macro
1441so that `aclocal' will find it.
1442
1443 A macro file's name should end in `.m4'. Such files should be
1444installed in `$(datadir)/aclocal'. This is as simple as writing:
1445
1446 aclocaldir = $(datadir)/aclocal
1447 aclocal_DATA = mymacro.m4 myothermacro.m4
1448
1449 A file of macros should be a series of properly quoted `AC_DEFUN''s
1450(*note Macro Definitions: (autoconf)Macro Definitions.). The `aclocal'
1451programs also understands `AC_REQUIRE' (*note Prerequisite Macros:
1452(autoconf)Prerequisite Macros.), so it is safe to put each macro in a
1453separate file. Each file should have no side effects but macro
1454definitions. Especially, any call to `AC_PREREQ' should be done inside
1455the defined macro, not at the beginning of the file.
1456
1457 Starting with Automake 1.8, `aclocal' will warn about all
1458underquoted calls to `AC_DEFUN'. We realize this will annoy a lot of
1459people, because `aclocal' was not so strict in the past and many third
1460party macros are underquoted; and we have to apologize for this
1461temporary inconvenience. The reason we have to be stricter is that a
1462future implementation of `aclocal' will have to temporary include all
1463these third party `.m4' files, maybe several times, even those which
1464are not actually needed. Doing so should alleviate many problem of the
1465current implementation, however it requires a stricter style from the
1466macro authors. Hopefully it is easy to revise the existing macros.
1467For instance
1468 # bad style
1469 AC_PREREQ(2.57)
1470 AC_DEFUN(AX_FOOBAR,
1471 [AC_REQUIRE([AX_SOMETHING])dnl
1472 AX_FOO
1473 AX_BAR
1474 ])
1475
1476should be rewritten as
1477 AC_DEFUN([AX_FOOBAR],
1478 [AC_PREREQ(2.57)dnl
1479 AC_REQUIRE([AX_SOMETHING])dnl
1480 AX_FOO
1481 AX_BAR
1482 ])
1483
1484 Wrapping the `AC_PREREQ' call inside the macro ensures that Autoconf
14852.57 will not be required if `AX_FOOBAR' is not actually used. Most
1486importantly, quoting the first argument of `AC_DEFUN' allows the macro
1487to be redefined or included twice (otherwise this first argument would
1488be expansed during the second definition).
1489
1490 If you have been directed here by the `aclocal' diagnostic but are
1491not the maintainer of the implicated macro, you will want to contact
1492the maintainer of that macro. Please make sure you have the last
1493version of the macro and that the problem already hasn't been reported
1494before doing so: people tend to work faster when they aren't flooded by
1495mails.
1496
1497
1498File: automake.info, Node: Top level, Next: Alternative, Prev: configure, Up: Top
1499
1500The top-level `Makefile.am'
1501***************************
1502
1503Recursing subdirectories
1504========================
1505
1506In packages with subdirectories, the top level `Makefile.am' must tell
1507Automake which subdirectories are to be built. This is done via the
1508`SUBDIRS' variable.
1509
1510 The `SUBDIRS' variable holds a list of subdirectories in which
1511building of various sorts can occur. Many targets (e.g. `all') in the
1512generated `Makefile' will run both locally and in all specified
1513subdirectories. Note that the directories listed in `SUBDIRS' are not
1514required to contain `Makefile.am's; only `Makefile's (after
1515configuration). This allows inclusion of libraries from packages which
1516do not use Automake (such as `gettext').
1517
1518 In packages that use subdirectories, the top-level `Makefile.am' is
1519often very short. For instance, here is the `Makefile.am' from the GNU
1520Hello distribution:
1521
1522 EXTRA_DIST = BUGS ChangeLog.O README-alpha
1523 SUBDIRS = doc intl po src tests
1524
1525 When Automake invokes `make' in a subdirectory, it uses the value of
1526the `MAKE' variable. It passes the value of the variable
1527`AM_MAKEFLAGS' to the `make' invocation; this can be set in
1528`Makefile.am' if there are flags you must always pass to `make'.
1529
1530 The directories mentioned in `SUBDIRS' must be direct children of
1531the current directory. For instance, you cannot put `src/subdir' into
1532`SUBDIRS'. Instead you should put `SUBDIRS = subdir' into
1533`src/Makefile.am'. Automake can be used to construct packages of
1534arbitrary depth this way.
1535
1536 By default, Automake generates `Makefiles' which work depth-first
1537(`postfix'). However, it is possible to change this ordering. You can
1538do this by putting `.' into `SUBDIRS'. For instance, putting `.'
1539first will cause a `prefix' ordering of directories. All `clean'
1540targets are run in reverse order of build targets.
1541
1542Conditional subdirectories
1543==========================
1544
1545It is possible to define the `SUBDIRS' variable conditionally if, like
1546in the case of GNU `Inetutils', you want to only build a subset of the
1547entire package.
1548
1549 To illustrate how this works, let's assume we have two directories
1550`src/' and `opt/'. `src/' should always be built, but we want to
1551decide in `./configure' whether `opt/' will be built or not. (For this
1552example we will assume that `opt/' should be built when the variable
1553`$want_opt' was set to `yes'.)
1554
1555 Running `make' should thus recurse into `src/' always, and then
1556maybe in `opt/'.
1557
1558 However `make dist' should always recurse into both `src/' and
1559`opt/'. Because `opt/' should be distributed even if it is not needed
1560in the current configuration. This means `opt/Makefile' should be
1561created unconditionally. (1)
1562
1563 There are two ways to setup a project like this. You can use
1564Automake conditionals (*note Conditionals::) or use Autoconf `AC_SUBST'
1565variables (*note Setting Output Variables: (autoconf)Setting Output
1566Variables.). Using Automake conditionals is the preferred solution.
1567
1568Conditional subdirectories with `AM_CONDITIONAL'
1569------------------------------------------------
1570
1571`configure' should output the `Makefile' for each directory and define
1572a condition into which `opt/' should be built.
1573
1574 ...
1575 AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
1576 AC_CONFIG_FILES([Makefile src/Makefile opt/Makefile])
1577 ...
1578
1579 Then `SUBDIRS' can be defined in the top-level `Makefile.am' as
1580follows.
1581
1582 if COND_OPT
1583 MAYBE_OPT = opt
1584 endif
1585 SUBDIRS = src $(MAYBE_OPT)
1586
1587 As you can see, running `make' will rightly recurse into `src/' and
1588maybe `opt/'.
1589
1590 As you can't see, running `make dist' will recurse into both `src/'
1591and `opt/' directories because `make dist', unlike `make all', doesn't
1592use the `SUBDIRS' variable. It uses the `DIST_SUBDIRS' variable.
1593
1594 In this case Automake will define `DIST_SUBDIRS = src opt'
1595automatically because it knows that `MAYBE_OPT' can contain `opt' in
1596some condition.
1597
1598Conditional subdirectories with `AC_SUBST'
1599------------------------------------------
1600
1601Another idea is to define `MAYBE_OPT' from `./configure' using
1602`AC_SUBST':
1603
1604 ...
1605 if test "$want_opt" = yes; then
1606 MAYBE_OPT=opt
1607 else
1608 MAYBE_OPT=
1609 fi
1610 AC_SUBST([MAYBE_OPT])
1611 AC_CONFIG_FILES([Makefile src/Makefile opt/Makefile])
1612 ...
1613
1614 In this case the top-level `Makefile.am' should look as follows.
1615
1616 SUBDIRS = src $(MAYBE_OPT)
1617 DIST_SUBDIRS = src opt
1618
1619 The drawback is that since Automake cannot guess what the possible
1620values of `MAYBE_OPT' are, it is necessary to define `DIST_SUBDIRS'.
1621
1622How `DIST_SUBDIRS' is used
1623--------------------------
1624
1625As shown in the above examples, `DIST_SUBDIRS' is used by targets that
1626need to recurse in all directories, even those which have been
1627conditionally left out of the build.
1628
1629 Precisely, `DIST_SUBDIRS' is used by `make dist', `make distclean',
1630and `make maintainer-clean'. All other recursive targets use `SUBDIRS'.
1631
1632 Automake will define `DIST_SUBDIRS' automatically from the possibles
1633values of `SUBDIRS' in all conditions.
1634
1635 If `SUBDIRS' contains `AC_SUBST' variables, `DIST_SUBDIRS' will not
1636be defined correctly because Automake doesn't know the possible values
1637of these variables. In this case `DIST_SUBDIRS' needs to be defined
1638manually.
1639
1640 ---------- Footnotes ----------
1641
1642 (1) Don't try seeking a solution where `opt/Makefile' is created
1643conditionally, this is a lot trickier than the solutions presented here.
1644
1645
1646File: automake.info, Node: Alternative, Next: Rebuilding, Prev: Top level, Up: Top
1647
1648An Alternative Approach to Subdirectories
1649*****************************************
1650
1651If you've ever read Peter Miller's excellent paper, Recursive Make
1652Considered Harmful
1653(http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html), the
1654preceding section on the use of subdirectories will probably come as
1655unwelcome advice. For those who haven't read the paper, Miller's main
1656thesis is that recursive `make' invocations are both slow and
1657error-prone.
1658
1659 Automake provides sufficient cross-directory support (1) to enable
1660you to write a single `Makefile.am' for a complex multi-directory
1661package.
1662
1663 By default an installable file specified in a subdirectory will have
1664its directory name stripped before installation. For instance, in this
1665example, the header file will be installed as `$(includedir)/stdio.h':
1666
1667 include_HEADERS = inc/stdio.h
1668
1669 However, the `nobase_' prefix can be used to circumvent this path
1670stripping. In this example, the header file will be installed as
1671`$(includedir)/sys/types.h':
1672
1673 nobase_include_HEADERS = sys/types.h
1674
1675 `nobase_' should be specified first when used in conjunction with
1676either `dist_' or `nodist_' (*note Dist::). For instance:
1677
1678 nobase_dist_pkgdata_DATA = images/vortex.pgm
1679
1680 ---------- Footnotes ----------
1681
1682 (1) We believe. This work is new and there are probably warts.
1683*Note Introduction::, for information on reporting bugs.
1684
1685
1686File: automake.info, Node: Rebuilding, Next: Programs, Prev: Alternative, Up: Top
1687
1688Rebuilding Makefiles
1689********************
1690
1691Automake generates rules to automatically rebuild `Makefile's,
1692`configure', and other derived files like `Makefile.in'.
1693
1694 If you are using `AM_MAINTAINER_MODE' in `configure.in', then these
1695automatic rebuilding rules are only enabled in maintainer mode.
1696
1697 Sometimes you need to run `aclocal' with an argument like `-I' to
1698tell it where to find `.m4' files. Since sometimes `make' will
1699automatically run `aclocal', you need a way to specify these arguments.
1700You can do this by defining `ACLOCAL_AMFLAGS'; this holds arguments
1701which are passed verbatim to `aclocal'. This variable is only useful
1702in the top-level `Makefile.am'.
1703
1704
1705File: automake.info, Node: Programs, Next: Other objects, Prev: Rebuilding, Up: Top
1706
1707Building Programs and Libraries
1708*******************************
1709
1710A large part of Automake's functionality is dedicated to making it easy
1711to build programs and libraries.
1712
1713* Menu:
1714
1715* A Program:: Building a program
1716* A Library:: Building a library
1717* A Shared Library:: Building a Libtool library
1718* Program and Library Variables:: Variables controlling program and
1719 library builds
1720* LIBOBJS:: Special handling for LIBOBJS and ALLOCA
1721* Program variables:: Variables used when building a program
1722* Yacc and Lex:: Yacc and Lex support
1723* C++ Support::
1724* Assembly Support::
1725* Fortran 77 Support::
1726* Java Support::
1727* Support for Other Languages::
1728* ANSI:: Automatic de-ANSI-fication
1729* Dependencies:: Automatic dependency tracking
1730* EXEEXT:: Support for executable extensions
1731
1732
1733File: automake.info, Node: A Program, Next: A Library, Prev: Programs, Up: Programs
1734
1735Building a program
1736==================
1737
1738In order to build a program, you need to tell Automake which sources
1739are part of it, and which libraries it should be linked with.
1740
1741 This section also covers conditional compilation of sources or
1742programs. Most of the comments about these also apply to libraries
1743(*note A Library::) and libtool libraries (*note A Shared Library::).
1744
1745* Menu:
1746
1747* Program Sources:: Defining program sources
1748* Linking:: Linking with libraries or extra objects
1749* Conditional Sources:: Handling conditional sources
1750* Conditional Programs:: Building program conditionally
1751
1752
1753File: automake.info, Node: Program Sources, Next: Linking, Prev: A Program, Up: A Program
1754
1755Defining program sources
1756------------------------
1757
1758In a directory containing source that gets built into a program (as
1759opposed to a library or a script), the `PROGRAMS' primary is used.
1760Programs can be installed in `bindir', `sbindir', `libexecdir',
1761`pkglibdir', or not at all (`noinst'). They can also be built only for
1762`make check', in which case the prefix is `check'.
1763
1764 For instance:
1765
1766 bin_PROGRAMS = hello
1767
1768 In this simple case, the resulting `Makefile.in' will contain code
1769to generate a program named `hello'.
1770
1771 Associated with each program are several assisting variables which
1772are named after the program. These variables are all optional, and have
1773reasonable defaults. Each variable, its use, and default is spelled out
1774below; we use the "hello" example throughout.
1775
1776 The variable `hello_SOURCES' is used to specify which source files
1777get built into an executable:
1778
1779 hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h system.h
1780
1781 This causes each mentioned `.c' file to be compiled into the
1782corresponding `.o'. Then all are linked to produce `hello'.
1783
1784 If `hello_SOURCES' is not specified, then it defaults to the single
1785file `hello.c'; that is, the default is to compile a single C file
1786whose base name is the name of the program itself. (This is a terrible
1787default but we are stuck with it for historical reasons.)
1788
1789 Multiple programs can be built in a single directory. Multiple
1790programs can share a single source file, which must be listed in each
1791`_SOURCES' definition.
1792
1793 Header files listed in a `_SOURCES' definition will be included in
1794the distribution but otherwise ignored. In case it isn't obvious, you
1795should not include the header file generated by `configure' in a
1796`_SOURCES' variable; this file should not be distributed. Lex (`.l')
1797and Yacc (`.y') files can also be listed; see *Note Yacc and Lex::.
1798
1799
1800File: automake.info, Node: Linking, Next: Conditional Sources, Prev: Program Sources, Up: A Program
1801
1802Linking the program
1803-------------------
1804
1805If you need to link against libraries that are not found by
1806`configure', you can use `LDADD' to do so. This variable is used to
1807specify additional objects or libraries to link with; it is
1808inappropriate for specifying specific linker flags, you should use
1809`AM_LDFLAGS' for this purpose.
1810
1811 Sometimes, multiple programs are built in one directory but do not
1812share the same link-time requirements. In this case, you can use the
1813`PROG_LDADD' variable (where PROG is the name of the program as it
1814appears in some `_PROGRAMS' variable, and usually written in lowercase)
1815to override the global `LDADD'. If this variable exists for a given
1816program, then that program is not linked using `LDADD'.
1817
1818 For instance, in GNU cpio, `pax', `cpio' and `mt' are linked against
1819the library `libcpio.a'. However, `rmt' is built in the same
1820directory, and has no such link requirement. Also, `mt' and `rmt' are
1821only built on certain architectures. Here is what cpio's
1822`src/Makefile.am' looks like (abridged):
1823
1824 bin_PROGRAMS = cpio pax @MT@
1825 libexec_PROGRAMS = @RMT@
1826 EXTRA_PROGRAMS = mt rmt
1827
1828 LDADD = ../lib/libcpio.a @INTLLIBS@
1829 rmt_LDADD =
1830
1831 cpio_SOURCES = ...
1832 pax_SOURCES = ...
1833 mt_SOURCES = ...
1834 rmt_SOURCES = ...
1835
1836 `PROG_LDADD' is inappropriate for passing program-specific linker
1837flags (except for `-l', `-L', `-dlopen' and `-dlpreopen'). So, use the
1838`PROG_LDFLAGS' variable for this purpose.
1839
1840 It is also occasionally useful to have a program depend on some other
1841target which is not actually part of that program. This can be done
1842using the `PROG_DEPENDENCIES' variable. Each program depends on the
1843contents of such a variable, but no further interpretation is done.
1844
1845 If `PROG_DEPENDENCIES' is not supplied, it is computed by Automake.
1846The automatically-assigned value is the contents of `PROG_LDADD', with
1847most configure substitutions, `-l', `-L', `-dlopen' and `-dlpreopen'
1848options removed. The configure substitutions that are left in are only
1849`@LIBOBJS@' and `@ALLOCA@'; these are left because it is known that
1850they will not cause an invalid value for `PROG_DEPENDENCIES' to be
1851generated.
1852
1853
1854File: automake.info, Node: Conditional Sources, Next: Conditional Programs, Prev: Linking, Up: A Program
1855
1856Conditional compilation of sources
1857----------------------------------
1858
1859You can't put a configure substitution (e.g., `@FOO@') into a
1860`_SOURCES' variable. The reason for this is a bit hard to explain, but
1861suffice to say that it simply won't work. Automake will give an error
1862if you try to do this.
1863
1864 Fortunately there are two other ways to achieve the same result.
1865One is to use configure substitutions in `_LDADD' variables, the other
1866is to use an Automake conditional.
1867
1868Conditional compilation using `_LDADD' substitutions
1869....................................................
1870
1871Automake must know all the source files that could possibly go into a
1872program, even if not all the files are built in every circumstance. Any
1873files which are only conditionally built should be listed in the
1874appropriate `EXTRA_' variable. For instance, if `hello-linux.c' or
1875`hello-generic.c' were conditionally included in `hello', the
1876`Makefile.am' would contain:
1877
1878 bin_PROGRAMS = hello
1879 hello_SOURCES = hello-common.c
1880 EXTRA_hello_SOURCES = hello-linux.c hello-generic.c
1881 hello_LDADD = @HELLO_SYSTEM@
1882 hello_DEPENDENCIES = @HELLO_SYSTEM@
1883
1884You can then setup the `@HELLO_SYSTEM@' substitution from
1885`configure.in':
1886
1887 ...
1888 case $host in
1889 *linux*) HELLO_SYSTEM='hello-linux.$(OBJEXT)' ;;
1890 *) HELLO_SYSTEM='hello-generic.$(OBJEXT)' ;;
1891 esac
1892 AC_SUBST([HELLO_SYSTEM])
1893 ...
1894
1895 In this case, `HELLO_SYSTEM' should be replaced by `hello-linux.o'
1896or `hello-bsd.o', and added to `hello_DEPENDENCIES' and `hello_LDADD'
1897in order to be built and linked in.
1898
1899Conditional compilation using Automake conditionals
1900...................................................
1901
1902An often simpler way to compile source files conditionally is to use
1903Automake conditionals. For instance, you could use this `Makefile.am'
1904construct to build the same `hello' example:
1905
1906 bin_PROGRAMS = hello
1907 if LINUX
1908 hello_SOURCES = hello-linux.c hello-common.c
1909 else
1910 hello_SOURCES = hello-generic.c hello-common.c
1911 endif
1912
1913 In this case, your `configure.in' should setup the `LINUX'
1914conditional using `AM_CONDITIONAL' (*note Conditionals::).
1915
1916 When using conditionals like this you don't need to use the `EXTRA_'
1917variable, because Automake will examine the contents of each variable
1918to construct the complete list of source files.
1919
1920 If your program uses a lot of files, you will probably prefer a
1921conditional `+='.
1922
1923 bin_PROGRAMS = hello
1924 hello_SOURCES = hello-common.c
1925 if LINUX
1926 hello_SOURCES += hello-linux.c
1927 else
1928 hello_SOURCES += hello-generic.c
1929 endif
1930
1931
1932File: automake.info, Node: Conditional Programs, Prev: Conditional Sources, Up: A Program
1933
1934Conditional compilation of programs
1935-----------------------------------
1936
1937Sometimes it is useful to determine the programs that are to be built
1938at configure time. For instance, GNU `cpio' only builds `mt' and `rmt'
1939under special circumstances. The means to achieve conditional
1940compilation of programs are the same you can use to compile source
1941files conditionally: substitutions or conditionals.
1942
1943Conditional programs using `configure' substitutions
1944....................................................
1945
1946In this case, you must notify Automake of all the programs that can
1947possibly be built, but at the same time cause the generated
1948`Makefile.in' to use the programs specified by `configure'. This is
1949done by having `configure' substitute values into each `_PROGRAMS'
1950definition, while listing all optionally built programs in
1951`EXTRA_PROGRAMS'.
1952
1953 bin_PROGRAMS = cpio pax $(MT)
1954 libexec_PROGRAMS = $(RMT)
1955 EXTRA_PROGRAMS = mt rmt
1956
1957 As explained in *Note EXEEXT::, Automake will rewrite
1958`bin_PROGRAMS', `libexec_PROGRAMS', and `EXTRA_PROGRAMS', appending
1959`$(EXEEXT)' to each binary. Obviously it cannot rewrite values
1960obtained at run-time through `configure' substitutions, therefore you
1961should take care of appending `$(EXEEXT)' yourself, as in
1962`AC_SUBST([MT], ['mt${EXEEXT}'])'.
1963
1964Conditional programs using Automake conditionals
1965................................................
1966
1967You can also use Automake conditionals (*note Conditionals::) to select
1968programs to be built. In this case you don't have to worry about
1969`$(EXEEXT)' or `EXTRA_PROGRAMS'.
1970
1971 bin_PROGRAMS = cpio pax
1972 if WANT_MT
1973 bin_PROGRAMS += mt
1974 endif
1975 if WANT_RMT
1976 libexec_PROGRAMS = rmt
1977 endif
1978
1979
1980File: automake.info, Node: A Library, Next: A Shared Library, Prev: A Program, Up: Programs
1981
1982Building a library
1983==================
1984
1985Building a library is much like building a program. In this case, the
1986name of the primary is `LIBRARIES'. Libraries can be installed in
1987`libdir' or `pkglibdir'.
1988
1989 *Note A Shared Library::, for information on how to build shared
1990libraries using libtool and the `LTLIBRARIES' primary.
1991
1992 Each `_LIBRARIES' variable is a list of the libraries to be built.
1993For instance to create a library named `libcpio.a', but not install it,
1994you would write:
1995
1996 noinst_LIBRARIES = libcpio.a
1997
1998 The sources that go into a library are determined exactly as they are
1999for programs, via the `_SOURCES' variables. Note that the library name
2000is canonicalized (*note Canonicalization::), so the `_SOURCES' variable
2001corresponding to `liblob.a' is `liblob_a_SOURCES', not
2002`liblob.a_SOURCES'.
2003
2004 Extra objects can be added to a library using the `LIBRARY_LIBADD'
2005variable. This should be used for objects determined by `configure'.
2006Again from `cpio':
2007
2008 libcpio_a_LIBADD = $(LIBOBJS) $(ALLOCA)
2009
2010 In addition, sources for extra objects that will not exist until
2011configure-time must be added to the `BUILT_SOURCES' variable (*note
2012Sources::).
2013
2014
2015File: automake.info, Node: A Shared Library, Next: Program and Library Variables, Prev: A Library, Up: Programs
2016
2017Building a Shared Library
2018=========================
2019
2020Building shared libraries portably is a relatively complex matter. For
2021this reason, GNU Libtool (*note Introduction: (libtool)Top.) was
2022created to help build shared libraries in a platform-independent way.
2023
2024* Menu:
2025
2026* Libtool Concept:: Introducing Libtool
2027* Libtool Libraries:: Declaring Libtool Libraries
2028* Conditional Libtool Libraries:: Building Libtool Libraries Conditionally
2029* Conditional Libtool Sources:: Choosing Library Sources Conditionally
2030* Libtool Convenience Libraries:: Building Convenience Libtool Libraries
2031* Libtool Modules:: Building Libtool Modules
2032* Libtool Flags:: Using _LIBADD and _LDFLAGS
2033* LTLIBOBJ:: Using $(LTLIBOBJ)
2034* Libtool Issues:: Common Issues Related to Libtool's Use
2035
2036
2037File: automake.info, Node: Libtool Concept, Next: Libtool Libraries, Prev: A Shared Library, Up: A Shared Library
2038
2039The Libtool Concept
2040-------------------
2041
2042Libtool abstracts shared and static libraries into a unified concept
2043henceforth called "libtool libraries". Libtool libraries are files
2044using the `.la' suffix, and can designate a static library, a shared
2045library, or maybe both. Their exact nature cannot be determined until
2046`./configure' is run: not all platforms support all kinds of libraries,
2047and users can explicitly select which libraries should be built.
2048(However the package's maintainers can tune the default, *Note The
2049`AC_PROG_LIBTOOL' macro: (libtool)AC_PROG_LIBTOOL.)
2050
2051 Because object files for shared and static libraries must be compiled
2052differently, libtool is also used during compilation. Object files
2053built by libtool are called "libtool objects": these are files using
2054the `.lo' suffix. Libtool libraries are built from these libtool
2055objects.
2056
2057 You should not assume anything about the structure of `.la' or `.lo'
2058files and how libtool constructs them: this is libtool's concern, and
2059the last thing one wants is to learn about libtool's guts. However the
2060existence of these files matters, because they are used as targets and
2061dependencies in `Makefile's when building libtool libraries. There are
2062situations where you may have to refer to these, for instance when
2063expressing dependencies for building source files conditionally (*note
2064Conditional Libtool Sources::).
2065
2066 People considering writing a plug-in system, with dynamically loaded
2067modules, should look into `libltdl': libtool's dlopening library (*note
2068Using libltdl: (libtool)Using libltdl.). This offers a portable
2069dlopening facility to load libtool libraries dynamically, and can also
2070achieve static linking where unavoidable.
2071
2072 Before we discuss how to use libtool with Automake in details, it
2073should be noted that the libtool manual also has a section about how to
2074use Automake with libtool (*note Using Automake with Libtool:
2075(libtool)Using Automake.).
2076
2077
2078File: automake.info, Node: Libtool Libraries, Next: Conditional Libtool Libraries, Prev: Libtool Concept, Up: A Shared Library
2079
2080Building Libtool Libraries
2081--------------------------
2082
2083Automake uses libtool to build libraries declared with the
2084`LTLIBRARIES' primary. Each `_LTLIBRARIES' variable is a list of
2085libtool libraries to build. For instance, to create a libtool library
2086named `libgettext.la', and install it in `libdir', write:
2087
2088 lib_LTLIBRARIES = libgettext.la
2089 libgettext_la_SOURCES = gettext.c gettext.h ...
2090
2091 Automake predefines the variable `pkglibdir', so you can use
2092`pkglib_LTLIBRARIES' to install libraries in `$(libdir)/@PACKAGE@/'.
2093
2094
2095File: automake.info, Node: Conditional Libtool Libraries, Next: Conditional Libtool Sources, Prev: Libtool Libraries, Up: A Shared Library
2096
2097Building Libtool Libraries Conditionally
2098----------------------------------------
2099
2100Like conditional programs (*note Conditional Programs::), there are two
2101main ways to build conditional libraries: using Automake conditionals
2102or using Autoconf `AC_SUBST'itutions.
2103
2104 The important implementation detail you have to be aware of is that
2105the place where a library will be installed matters to libtool: it
2106needs to be indicated _at link-time_ using the `-rpath' option.
2107
2108 For libraries whose destination directory is known when Automake
2109runs, Automake will automatically supply the appropriate `-rpath'
2110option to libtool. This is the case for libraries listed explicitly in
2111some installable `_LTLIBRARIES' variables such as `lib_LTLIBRARIES'.
2112
2113 However, for libraries determined at configure time (and thus
2114mentioned in `EXTRA_LTLIBRARIES'), Automake does not know the final
2115installation directory. For such libraries you must add the `-rpath'
2116option to the appropriate `_LDFLAGS' variable by hand.
2117
2118 The examples below illustrate the differences between these two
2119methods.
2120
2121 Here is an example where `$(WANTEDLIBS)' is an `AC_SUBST'ed variable
2122set at `./configure'-time to either `libfoo.la', `libbar.la', both, or
2123none. Although `$(WANTEDLIBS)' appears in the `lib_LTLIBRARIES',
2124Automake cannot guess it relates to `libfoo.la' or `libbar.la' by the
2125time it creates the link rule for these two libraries. Therefore the
2126`-rpath' argument must be explicitly supplied.
2127
2128 EXTRA_LTLIBRARIES = libfoo.la libbar.la
2129 lib_LTLIBRARIES = $(WANTEDLIBS)
2130 libfoo_la_SOURCES = foo.c ...
2131 libfoo_la_LDFLAGS = -rpath '$(libdir)'
2132 libbar_la_SOURCES = bar.c ...
2133 libbar_la_LDFLAGS = -rpath '$(libdir)'
2134
2135 Here is how the same `Makefile.am' would look using Automake
2136conditionals named `WANT_LIBFOO' and `WANT_LIBBAR'. Now Automake is
2137able to compute the `-rpath' setting itself, because it's clear that
2138both libraries will end up in `$(libdir)' if they are installed.
2139
2140 lib_LTLIBRARIES =
2141 if WANT_LIBFOO
2142 lib_LTLIBRARIES += libfoo.la
2143 endif
2144 if WANT_LIBBAR
2145 lib_LTLIBRARIES += libbar.la
2146 endif
2147 libfoo_la_SOURCES = foo.c ...
2148 libbar_la_SOURCES = bar.c ...
2149
2150
2151File: automake.info, Node: Conditional Libtool Sources, Next: Libtool Convenience Libraries, Prev: Conditional Libtool Libraries, Up: A Shared Library
2152
2153Libtool Libraries with Conditional Sources
2154------------------------------------------
2155
2156Conditional compilation of sources in a library can be achieved in the
2157same way as conditional compilation of sources in a program (*note
2158Conditional Sources::). The only difference is that `_LIBADD' should
2159be used instead of `_LDADD' and that it should mention libtool objects
2160(`.lo' files).
2161
2162 So, to mimic the `hello' example from *Note Conditional Sources::,
2163we could build a `libhello.la' library using either `hello-linux.c' or
2164`hello-generic.c' with the following `Makefile.am'.
2165
2166 lib_LTLIBRARIES = libhello.la
2167 libhello_la_SOURCES = hello-common.c
2168 EXTRA_libhello_la_SOURCES = hello-linux.c hello-generic.c
2169 libhello_la_LIBADD = $(HELLO_SYSTEM)
2170 libhello_la_DEPENDENCIES = $(HELLO_SYSTEM)
2171
2172And make sure `$(HELLO_SYSTEM)' is set to either `hello-linux.lo' or
2173`hello-generic.lo' in `./configure'.
2174
2175 Or we could simply use an Automake conditional as follows.
2176
2177 lib_LTLIBRARIES = libhello.la
2178 libhello_la_SOURCES = hello-common.c
2179 if LINUX
2180 libhello_la_SOURCES += hello-linux.c
2181 else
2182 libhello_la_SOURCES += hello-generic.c
2183 endif
2184
2185
2186File: automake.info, Node: Libtool Convenience Libraries, Next: Libtool Modules, Prev: Conditional Libtool Sources, Up: A Shared Library
2187
2188Libtool Convenience Libraries
2189-----------------------------
2190
2191Sometimes you want to build libtool libraries which should not be
2192installed. These are called "libtool convenience libraries" and are
2193typically used to encapsulate many sublibraries, later gathered into
2194one big installed library.
2195
2196 Libtool convenience libraries are declared by `noinst_LTLIBRARIES',
2197`check_LTLIBRARIES', or even `EXTRA_LTLIBRARIES'. Unlike installed
2198libtool libraries they do not need an `-rpath' flag at link time
2199(actually this is the only difference).
2200
2201 Convenience libraries listed in `noinst_LTLIBRARIES' are always
2202built. Those listed in `check_LTLIBRARIES' are built only upon `make
2203check'. Finally, libraries listed in `EXTRA_LTLIBRARIES' are never
2204built explicitly: Automake outputs rules to build them, but if the
2205library does not appear as a Makefile dependency anywhere it won't be
2206built (this is why `EXTRA_LTLIBRARIES' is used for conditional
2207compilation).
2208
2209 Here is a sample setup merging libtool convenience libraries from
2210subdirectories into one main `libtop.la' library.
2211
2212 # -- Top-level Makefile.am --
2213 SUBDIRS = sub1 sub2 ...
2214 lib_LTLIBRARIES = libtop.la
2215 libtop_la_SOURCES =
2216 libtop_la_LIBADD = \
2217 sub1/libsub1.la \
2218 sub2/libsub2.la \
2219 ...
2220
2221 # -- sub1/Makefile.am --
2222 noinst_LTLIBRARIES = libsub1.la
2223 libsub1_la_SOURCES = ...
2224
2225 # -- sub2/Makefile.am --
2226 # showing nested convenience libraries
2227 SUBDIRS = sub2.1 sub2.2 ...
2228 noinst_LTLIBRARIES = libsub2.la
2229 libsub2_la_SOURCES =
2230 libsub2_la_LIBADD = \
2231 sub21/libsub21.la \
2232 sub22/libsub22.la \
2233 ...
2234
2235
2236File: automake.info, Node: Libtool Modules, Next: Libtool Flags, Prev: Libtool Convenience Libraries, Up: A Shared Library
2237
2238Libtool Modules
2239---------------
2240
2241These are libtool libraries meant to be dlopened. They are indicated
2242to libtool by passing `-module' at link-time.
2243
2244 pkglib_LTLIBRARIES = mymodule.la
2245 mymodule_la_SOURCES = doit.c
2246 mymodule_LDFLAGS = -module
2247
2248 Ordinarily, Automake requires that a Library's name starts with
2249`lib'. However, when building a dynamically loadable module you might
2250wish to use a "nonstandard" name.
2251
2252
2253File: automake.info, Node: Libtool Flags, Next: LTLIBOBJ, Prev: Libtool Modules, Up: A Shared Library
2254
2255_LIBADD and _LDFLAGS
2256--------------------
2257
2258As shown in previous sections, the `LIBRARY_LIBADD' variable should be
2259used to list extra libtool objects (`.lo' files) or libtool libraries
2260(`.la') to add to LIBRARY.
2261
2262 The `LIBRARY_LDFLAGS' variable is the place to list additional
2263libtool flags, such as `-version-info', `-static', and a lot more. See
2264*Note Using libltdl: (libtool)Link mode.
2265
2266
2267File: automake.info, Node: LTLIBOBJ, Next: Libtool Issues, Prev: Libtool Flags, Up: A Shared Library
2268
2269`LTLIBOBJS'
2270-----------
2271
2272Where an ordinary library might include `$(LIBOBJS)', a libtool library
2273must use `$(LTLIBOBJS)'. This is required because the object files
2274that libtool operates on do not necessarily end in `.o'.
2275
2276 Nowadays, the computation of `LTLIBOBJS' from `LIBOBJS' is performed
2277automatically by Autoconf (*note `AC_LIBOBJ' vs. `LIBOBJS':
2278(autoconf)AC_LIBOBJ vs LIBOBJS.).
2279
2280
2281File: automake.info, Node: Libtool Issues, Prev: LTLIBOBJ, Up: A Shared Library
2282
2283Common Issues Related to Libtool's Use
2284--------------------------------------
2285
2286`required file `./ltmain.sh' not found'
2287.......................................
2288
2289Libtool comes with a tool called `libtoolize' that will install
2290libtool's supporting files into a package. Running this command will
2291install `ltmain.sh'. You should execute it before `aclocal' and
2292`automake'.
2293
2294 People upgrading old packages to newer autotools are likely to face
2295this issue because older Automake versions used to call `libtoolize'.
2296Therefore old build scripts do not call `libtoolize'.
2297
2298 Since Automake 1.6, it has been decided that running `libtoolize'
2299was none of Automake's business. Instead, that functionality has been
2300moved into the `autoreconf' command (*note Using `autoreconf':
2301(autoconf)autoreconf Invocation.). If you do not want to remember what
2302to run and when, just learn the `autoreconf' command. Hopefully,
2303replacing existing `bootstrap.sh' or `autogen.sh' scripts by a call to
2304`autoreconf' should also free you from any similar incompatible change
2305in the future.
2306
2307Objects `created with both libtool and without'
2308...............................................
2309
2310Sometimes, the same source file is used both to build a libtool library
2311and to build another non-libtool target (be it a program or another
2312library).
2313
2314 Let's consider the following `Makefile.am'.
2315
2316 bin_PROGRAMS = prog
2317 prog_SOURCES = prog.c foo.c ...
2318
2319 lib_LTLIBRARIES = libfoo.la
2320 libfoo_la_SOURCES = foo.c ...
2321
2322(In this trivial case the issue could be avoided by linking `libfoo.la'
2323with `prog' instead of listing `foo.c' in `prog_SOURCES'. But let's
2324assume we really want to keep `prog' and `libfoo.la' separate.)
2325
2326 Technically, it means that we should build `foo.$(OBJEXT)' for
2327`prog', and `foo.lo' for `libfoo.la'. The problem is that in the
2328course of creating `foo.lo', libtool may erase (or replace)
2329`foo.$(OBJEXT)' - and this cannot be avoided.
2330
2331 Therefore, when Automake detects this situation it will complain
2332with a message such as
2333 object `foo.$(OBJEXT)' created both with libtool and without
2334
2335 A workaround for this issue is to ensure that these two objects get
2336different basenames. As explained in *Note renamed objects::, this
2337happens automatically when per-targets flags are used.
2338
2339 bin_PROGRAMS = prog
2340 prog_SOURCES = prog.c foo.c ...
2341 prog_CFLAGS = $(AM_CFLAGS)
2342
2343 lib_LTLIBRARIES = libfoo.la
2344 libfoo_la_SOURCES = foo.c ...
2345
2346Adding `prog_CFLAGS = $(AM_CFLAGS)' is almost a no-op, because when the
2347`prog_CFLAGS' is defined, it is used instead of `AM_CFLAGS'. However
2348as a side effect it will cause `prog.c' and `foo.c' to be compiled as
2349`prog-prog.$(OBJEXT)' and `prog-foo.$(OBJEXT)' which solves the issue.
2350
2351
2352File: automake.info, Node: Program and Library Variables, Next: LIBOBJS, Prev: A Shared Library, Up: Programs
2353
2354Program and Library Variables
2355=============================
2356
2357Associated with each program are a collection of variables which can be
2358used to modify how that program is built. There is a similar list of
2359such variables for each library. The canonical name of the program (or
2360library) is used as a base for naming these variables.
2361
2362 In the list below, we use the name "maude" to refer to the program or
2363library. In your `Makefile.am' you would replace this with the
2364canonical name of your program. This list also refers to "maude" as a
2365program, but in general the same rules apply for both static and dynamic
2366libraries; the documentation below notes situations where programs and
2367libraries differ.
2368
2369`maude_SOURCES'
2370 This variable, if it exists, lists all the source files which are
2371 compiled to build the program. These files are added to the
2372 distribution by default. When building the program, Automake will
2373 cause each source file to be compiled to a single `.o' file (or
2374 `.lo' when using libtool). Normally these object files are named
2375 after the source file, but other factors can change this. If a
2376 file in the `_SOURCES' variable has an unrecognized extension,
2377 Automake will do one of two things with it. If a suffix rule
2378 exists for turning files with the unrecognized extension into `.o'
2379 files, then automake will treat this file as it will any other
2380 source file (*note Support for Other Languages::). Otherwise, the
2381 file will be ignored as though it were a header file.
2382
2383 The prefixes `dist_' and `nodist_' can be used to control whether
2384 files listed in a `_SOURCES' variable are distributed. `dist_' is
2385 redundant, as sources are distributed by default, but it can be
2386 specified for clarity if desired.
2387
2388 It is possible to have both `dist_' and `nodist_' variants of a
2389 given `_SOURCES' variable at once; this lets you easily distribute
2390 some files and not others, for instance:
2391
2392 nodist_maude_SOURCES = nodist.c
2393 dist_maude_SOURCES = dist-me.c
2394
2395 By default the output file (on Unix systems, the `.o' file) will be
2396 put into the current build directory. However, if the option
2397 `subdir-objects' is in effect in the current directory then the
2398 `.o' file will be put into the subdirectory named after the source
2399 file. For instance, with `subdir-objects' enabled,
2400 `sub/dir/file.c' will be compiled to `sub/dir/file.o'. Some
2401 people prefer this mode of operation. You can specify
2402 `subdir-objects' in `AUTOMAKE_OPTIONS' (*note Options::).
2403
2404`EXTRA_maude_SOURCES'
2405 Automake needs to know the list of files you intend to compile
2406 _statically_. For one thing, this is the only way Automake has of
2407 knowing what sort of language support a given `Makefile.in'
2408 requires. (1) This means that, for example, you can't put a
2409 configure substitution like `@my_sources@' into a `_SOURCES'
2410 variable. If you intend to conditionally compile source files and
2411 use `configure' to substitute the appropriate object names into,
2412 e.g., `_LDADD' (see below), then you should list the corresponding
2413 source files in the `EXTRA_' variable.
2414
2415 This variable also supports `dist_' and `nodist_' prefixes, e.g.,
2416 `nodist_EXTRA_maude_SOURCES'.
2417
2418`maude_AR'
2419 A static library is created by default by invoking `$(AR) cru'
2420 followed by the name of the library and then the objects being put
2421 into the library. You can override this by setting the `_AR'
2422 variable. This is usually used with C++; some C++ compilers
2423 require a special invocation in order to instantiate all the
2424 templates which should go into a library. For instance, the SGI
2425 C++ compiler likes this variable set like so:
2426 libmaude_a_AR = $(CXX) -ar -o
2427
2428`maude_LIBADD'
2429 Extra objects can be added to a _library_ using the `_LIBADD'
2430 variable. For instance this should be used for objects determined
2431 by `configure' (*note A Library::).
2432
2433`maude_LDADD'
2434 Extra objects can be added to a _program_ by listing them in the
2435 `_LDADD' variable. For instance this should be used for objects
2436 determined by `configure' (*note Linking::).
2437
2438 `_LDADD' and `_LIBADD' are inappropriate for passing
2439 program-specific linker flags (except for `-l', `-L', `-dlopen'
2440 and `-dlpreopen'). Use the `_LDFLAGS' variable for this purpose.
2441
2442 For instance, if your `configure.in' uses `AC_PATH_XTRA', you
2443 could link your program against the X libraries like so:
2444
2445 maude_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS)
2446
2447`maude_LDFLAGS'
2448 This variable is used to pass extra flags to the link step of a
2449 program or a shared library.
2450
2451`maude_DEPENDENCIES'
2452 It is also occasionally useful to have a program depend on some
2453 other target which is not actually part of that program. This can
2454 be done using the `_DEPENDENCIES' variable. Each program depends
2455 on the contents of such a variable, but no further interpretation
2456 is done.
2457
2458 If `_DEPENDENCIES' is not supplied, it is computed by Automake.
2459 The automatically-assigned value is the contents of `_LDADD' or
2460 `_LIBADD', with most configure substitutions, `-l', `-L',
2461 `-dlopen' and `-dlpreopen' options removed. The configure
2462 substitutions that are left in are only `$(LIBOBJS)' and
2463 `$(ALLOCA)'; these are left because it is known that they will not
2464 cause an invalid value for `_DEPENDENCIES' to be generated.
2465
2466`maude_LINK'
2467 You can override the linker on a per-program basis. By default the
2468 linker is chosen according to the languages used by the program.
2469 For instance, a program that includes C++ source code would use
2470 the C++ compiler to link. The `_LINK' variable must hold the name
2471 of a command which can be passed all the `.o' file names as
2472 arguments. Note that the name of the underlying program is _not_
2473 passed to `_LINK'; typically one uses `$@':
2474
2475 maude_LINK = $(CCLD) -magic -o $@
2476
2477`maude_CCASFLAGS'
2478`maude_CFLAGS'
2479`maude_CPPFLAGS'
2480`maude_CXXFLAGS'
2481`maude_FFLAGS'
2482`maude_GCJFLAGS'
2483`maude_LFLAGS'
2484`maude_OBJCFLAGS'
2485`maude_RFLAGS'
2486`maude_YFLAGS'
2487 Automake allows you to set compilation flags on a per-program (or
2488 per-library) basis. A single source file can be included in
2489 several programs, and it will potentially be compiled with
2490 different flags for each program. This works for any language
2491 directly supported by Automake. These "per-target compilation
2492 flags" are `_CCASFLAGS', `_CFLAGS', `_CPPFLAGS', `_CXXFLAGS',
2493 `_FFLAGS', `_GCJFLAGS', `_LFLAGS', `_OBJCFLAGS', `_RFLAGS', and
2494 `_YFLAGS'.
2495
2496 When using a per-target compilation flag, Automake will choose a
2497 different name for the intermediate object files. Ordinarily a
2498 file like `sample.c' will be compiled to produce `sample.o'.
2499 However, if the program's `_CFLAGS' variable is set, then the
2500 object file will be named, for instance, `maude-sample.o'. (See
2501 also *Note renamed objects::.)
2502
2503 In compilations with per-target flags, the ordinary `AM_' form of
2504 the flags variable is _not_ automatically included in the
2505 compilation (however, the user form of the variable _is_ included).
2506 So for instance, if you want the hypothetical `maude' compilations
2507 to also use the value of `AM_CFLAGS', you would need to write:
2508
2509 maude_CFLAGS = ... your flags ... $(AM_CFLAGS)
2510
2511`maude_DEPENDENCIES'
2512 It is also occasionally useful to have a program depend on some
2513 other target which is not actually part of that program. This can
2514 be done using the `_DEPENDENCIES' variable. Each program depends
2515 on the contents of such a variable, but no further interpretation
2516 is done.
2517
2518 If `_DEPENDENCIES' is not supplied, it is computed by Automake.
2519 The automatically-assigned value is the contents of `_LDADD' or
2520 `_LIBADD', with most configure substitutions, `-l', `-L',
2521 `-dlopen' and `-dlpreopen' options removed. The configure
2522 substitutions that are left in are only `@LIBOBJS@' and
2523 `@ALLOCA@'; these are left because it is known that they will not
2524 cause an invalid value for `_DEPENDENCIES' to be generated.
2525
2526`maude_SHORTNAME'
2527 On some platforms the allowable file names are very short. In
2528 order to support these systems and per-program compilation flags
2529 at the same time, Automake allows you to set a "short name" which
2530 will influence how intermediate object files are named. For
2531 instance, if you set `maude_SHORTNAME' to `m', then in the above
2532 per-program compilation flag example the object file would be named
2533 `m-sample.o' rather than `maude-sample.o'. This facility is
2534 rarely needed in practice, and we recommend avoiding it until you
2535 find it is required.
2536
2537 ---------- Footnotes ----------
2538
2539 (1) There are other, more obscure reasons reasons for this
2540limitation as well.
2541
2542
2543File: automake.info, Node: LIBOBJS, Next: Program variables, Prev: Program and Library Variables, Up: Programs
2544
2545Special handling for LIBOBJS and ALLOCA
2546=======================================
2547
2548Automake explicitly recognizes the use of `$(LIBOBJS)' and `$(ALLOCA)',
2549and uses this information, plus the list of `LIBOBJS' files derived
2550from `configure.in' to automatically include the appropriate source
2551files in the distribution (*note Dist::). These source files are also
2552automatically handled in the dependency-tracking scheme; see *Note
2553Dependencies::.
2554
2555 `$(LIBOBJS)' and `$(ALLOCA)' are specially recognized in any
2556`_LDADD' or `_LIBADD' variable.
2557
2558
2559File: automake.info, Node: Program variables, Next: Yacc and Lex, Prev: LIBOBJS, Up: Programs
2560
2561Variables used when building a program
2562======================================
2563
2564Occasionally it is useful to know which `Makefile' variables Automake
2565uses for compilations; for instance you might need to do your own
2566compilation in some special cases.
2567
2568 Some variables are inherited from Autoconf; these are `CC',
2569`CFLAGS', `CPPFLAGS', `DEFS', `LDFLAGS', and `LIBS'.
2570
2571 There are some additional variables which Automake itself defines:
2572
2573`AM_CPPFLAGS'
2574 The contents of this variable are passed to every compilation
2575 which invokes the C preprocessor; it is a list of arguments to the
2576 preprocessor. For instance, `-I' and `-D' options should be
2577 listed here.
2578
2579 Automake already provides some `-I' options automatically. In
2580 particular it generates `-I$(srcdir)', `-I.', and a `-I' pointing
2581 to the directory holding `config.h' (if you've used
2582 `AC_CONFIG_HEADERS' or `AM_CONFIG_HEADER'). You can disable the
2583 default `-I' options using the `nostdinc' option.
2584
2585 `AM_CPPFLAGS' is ignored in preference to a per-executable (or
2586 per-library) `_CPPFLAGS' variable if it is defined.
2587
2588`INCLUDES'
2589 This does the same job as `AM_CPPFLAGS'. It is an older name for
2590 the same functionality. This variable is deprecated; we suggest
2591 using `AM_CPPFLAGS' instead.
2592
2593`AM_CFLAGS'
2594 This is the variable which the `Makefile.am' author can use to pass
2595 in additional C compiler flags. It is more fully documented
2596 elsewhere. In some situations, this is not used, in preference to
2597 the per-executable (or per-library) `_CFLAGS'.
2598
2599`COMPILE'
2600 This is the command used to actually compile a C source file. The
2601 filename is appended to form the complete command line.
2602
2603`AM_LDFLAGS'
2604 This is the variable which the `Makefile.am' author can use to pass
2605 in additional linker flags. In some situations, this is not used,
2606 in preference to the per-executable (or per-library) `_LDFLAGS'.
2607
2608`LINK'
2609 This is the command used to actually link a C program. It already
2610 includes `-o $@' and the usual variable references (for instance,
2611 `CFLAGS'); it takes as "arguments" the names of the object files
2612 and libraries to link in.
2613
2614
2615File: automake.info, Node: Yacc and Lex, Next: C++ Support, Prev: Program variables, Up: Programs
2616
2617Yacc and Lex support
2618====================
2619
2620Automake has somewhat idiosyncratic support for Yacc and Lex.
2621
2622 Automake assumes that the `.c' file generated by `yacc' (or `lex')
2623should be named using the basename of the input file. That is, for a
2624yacc source file `foo.y', Automake will cause the intermediate file to
2625be named `foo.c' (as opposed to `y.tab.c', which is more traditional).
2626
2627 The extension of a yacc source file is used to determine the
2628extension of the resulting `C' or `C++' file. Files with the extension
2629`.y' will be turned into `.c' files; likewise, `.yy' will become `.cc';
2630`.y++', `c++'; and `.yxx', `.cxx'.
2631
2632 Likewise, lex source files can be used to generate `C' or `C++'; the
2633extensions `.l', `.ll', `.l++', and `.lxx' are recognized.
2634
2635 You should never explicitly mention the intermediate (`C' or `C++')
2636file in any `SOURCES' variable; only list the source file.
2637
2638 The intermediate files generated by `yacc' (or `lex') will be
2639included in any distribution that is made. That way the user doesn't
2640need to have `yacc' or `lex'.
2641
2642 If a `yacc' source file is seen, then your `configure.in' must
2643define the variable `YACC'. This is most easily done by invoking the
2644macro `AC_PROG_YACC' (*note Particular Program Checks:
2645(autoconf)Particular Programs.).
2646
2647 When `yacc' is invoked, it is passed `YFLAGS' and `AM_YFLAGS'. The
2648former is a user variable and the latter is intended for the
2649`Makefile.am' author.
2650
2651 `AM_YFLAGS' is usually used to pass the `-d' option to `yacc'.
2652Automake knows what this means and will automatically adjust its rules
2653to update and distribute the header file built by `yacc -d'. What
2654Automake cannot guess, though, is where this header will be used: it is
2655up to you to ensure the header gets built before it is first used.
2656Typically this is necessary in order for dependency tracking to work
2657when the header is included by another file. The common solution is
2658listing the header file in `BUILT_SOURCES' (*note Sources::) as follows.
2659
2660 BUILT_SOURCES = parser.h
2661 AM_YFLAGS = -d
2662 bin_PROGRAMS = foo
2663 foo_SOURCES = ... parser.y ...
2664
2665 If a `lex' source file is seen, then your `configure.in' must define
2666the variable `LEX'. You can use `AC_PROG_LEX' to do this (*note
2667Particular Program Checks: (autoconf)Particular Programs.), but using
2668`AM_PROG_LEX' macro (*note Macros::) is recommended.
2669
2670 When `lex' is invoked, it is passed `LFLAGS' and `AM_LFLAGS'. The
2671former is a user variable and the latter is intended for the
2672`Makefile.am' author.
2673
2674 Automake makes it possible to include multiple `yacc' (or `lex')
2675source files in a single program. When there is more than one distinct
2676`yacc' (or `lex') source file in a directory, Automake uses a small
2677program called `ylwrap' to run `yacc' (or `lex') in a subdirectory.
2678This is necessary because yacc's output filename is fixed, and a
2679parallel make could conceivably invoke more than one instance of `yacc'
2680simultaneously. The `ylwrap' program is distributed with Automake. It
2681should appear in the directory specified by `AC_CONFIG_AUX_DIR' (*note
2682Finding `configure' Input: (autoconf)Input.), or the current directory
2683if that macro is not used in `configure.in'.
2684
2685 For `yacc', simply managing locking is insufficient. The output of
2686`yacc' always uses the same symbol names internally, so it isn't
2687possible to link two `yacc' parsers into the same executable.
2688
2689 We recommend using the following renaming hack used in `gdb':
2690 #define yymaxdepth c_maxdepth
2691 #define yyparse c_parse
2692 #define yylex c_lex
2693 #define yyerror c_error
2694 #define yylval c_lval
2695 #define yychar c_char
2696 #define yydebug c_debug
2697 #define yypact c_pact
2698 #define yyr1 c_r1
2699 #define yyr2 c_r2
2700 #define yydef c_def
2701 #define yychk c_chk
2702 #define yypgo c_pgo
2703 #define yyact c_act
2704 #define yyexca c_exca
2705 #define yyerrflag c_errflag
2706 #define yynerrs c_nerrs
2707 #define yyps c_ps
2708 #define yypv c_pv
2709 #define yys c_s
2710 #define yy_yys c_yys
2711 #define yystate c_state
2712 #define yytmp c_tmp
2713 #define yyv c_v
2714 #define yy_yyv c_yyv
2715 #define yyval c_val
2716 #define yylloc c_lloc
2717 #define yyreds c_reds
2718 #define yytoks c_toks
2719 #define yylhs c_yylhs
2720 #define yylen c_yylen
2721 #define yydefred c_yydefred
2722 #define yydgoto c_yydgoto
2723 #define yysindex c_yysindex
2724 #define yyrindex c_yyrindex
2725 #define yygindex c_yygindex
2726 #define yytable c_yytable
2727 #define yycheck c_yycheck
2728 #define yyname c_yyname
2729 #define yyrule c_yyrule
2730
2731 For each define, replace the `c_' prefix with whatever you like.
2732These defines work for `bison', `byacc', and traditional `yacc's. If
2733you find a parser generator that uses a symbol not covered here, please
2734report the new name so it can be added to the list.
2735
2736
2737File: automake.info, Node: C++ Support, Next: Assembly Support, Prev: Yacc and Lex, Up: Programs
2738
2739C++ Support
2740===========
2741
2742Automake includes full support for C++.
2743
2744 Any package including C++ code must define the output variable `CXX'
2745in `configure.in'; the simplest way to do this is to use the
2746`AC_PROG_CXX' macro (*note Particular Program Checks:
2747(autoconf)Particular Programs.).
2748
2749 A few additional variables are defined when a C++ source file is
2750seen:
2751
2752`CXX'
2753 The name of the C++ compiler.
2754
2755`CXXFLAGS'
2756 Any flags to pass to the C++ compiler.
2757
2758`AM_CXXFLAGS'
2759 The maintainer's variant of `CXXFLAGS'.
2760
2761`CXXCOMPILE'
2762 The command used to actually compile a C++ source file. The file
2763 name is appended to form the complete command line.
2764
2765`CXXLINK'
2766 The command used to actually link a C++ program.
2767
2768
2769File: automake.info, Node: Assembly Support, Next: Fortran 77 Support, Prev: C++ Support, Up: Programs
2770
2771Assembly Support
2772================
2773
2774Automake includes some support for assembly code.
2775
2776 The variable `CCAS' holds the name of the compiler used to build
2777assembly code. This compiler must work a bit like a C compiler; in
2778particular it must accept `-c' and `-o'. The value of `CCASFLAGS' is
2779passed to the compilation.
2780
2781 You are required to set `CCAS' and `CCASFLAGS' via `configure.in'.
2782The autoconf macro `AM_PROG_AS' will do this for you. Unless they are
2783already set, it simply sets `CCAS' to the C compiler and `CCASFLAGS' to
2784the C compiler flags.
2785
2786 Only the suffixes `.s' and `.S' are recognized by `automake' as
2787being files containing assembly code.
2788
2789
2790File: automake.info, Node: Fortran 77 Support, Next: Java Support, Prev: Assembly Support, Up: Programs
2791
2792Fortran 77 Support
2793==================
2794
2795Automake includes full support for Fortran 77.
2796
2797 Any package including Fortran 77 code must define the output variable
2798`F77' in `configure.in'; the simplest way to do this is to use the
2799`AC_PROG_F77' macro (*note Particular Program Checks:
2800(autoconf)Particular Programs.). *Note Fortran 77 and Autoconf::.
2801
2802 A few additional variables are defined when a Fortran 77 source file
2803is seen:
2804
2805`F77'
2806 The name of the Fortran 77 compiler.
2807
2808`FFLAGS'
2809 Any flags to pass to the Fortran 77 compiler.
2810
2811`AM_FFLAGS'
2812 The maintainer's variant of `FFLAGS'.
2813
2814`RFLAGS'
2815 Any flags to pass to the Ratfor compiler.
2816
2817`AM_RFLAGS'
2818 The maintainer's variant of `RFLAGS'.
2819
2820`F77COMPILE'
2821 The command used to actually compile a Fortran 77 source file.
2822 The file name is appended to form the complete command line.
2823
2824`FLINK'
2825 The command used to actually link a pure Fortran 77 program or
2826 shared library.
2827
2828
2829 Automake can handle preprocessing Fortran 77 and Ratfor source files
2830in addition to compiling them(1). Automake also contains some support
2831for creating programs and shared libraries that are a mixture of
2832Fortran 77 and other languages (*note Mixing Fortran 77 With C and
2833C++::).
2834
2835 These issues are covered in the following sections.
2836
2837* Menu:
2838
2839* Preprocessing Fortran 77::
2840* Compiling Fortran 77 Files::
2841* Mixing Fortran 77 With C and C++::
2842* Fortran 77 and Autoconf::
2843
2844 ---------- Footnotes ----------
2845
2846 (1) Much, if not most, of the information in the following sections
2847pertaining to preprocessing Fortran 77 programs was taken almost
2848verbatim from *Note Catalogue of Rules: (make)Catalogue of Rules.
2849
2850
2851File: automake.info, Node: Preprocessing Fortran 77, Next: Compiling Fortran 77 Files, Prev: Fortran 77 Support, Up: Fortran 77 Support
2852
2853Preprocessing Fortran 77
2854------------------------
2855
2856`N.f' is made automatically from `N.F' or `N.r'. This rule runs just
2857the preprocessor to convert a preprocessable Fortran 77 or Ratfor
2858source file into a strict Fortran 77 source file. The precise command
2859used is as follows:
2860
2861`.F'
2862 `$(F77) -F $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
2863 $(AM_FFLAGS) $(FFLAGS)'
2864
2865`.r'
2866 `$(F77) -F $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)'
2867
2868
2869
2870File: automake.info, Node: Compiling Fortran 77 Files, Next: Mixing Fortran 77 With C and C++, Prev: Preprocessing Fortran 77, Up: Fortran 77 Support
2871
2872Compiling Fortran 77 Files
2873--------------------------
2874
2875`N.o' is made automatically from `N.f', `N.F' or `N.r' by running the
2876Fortran 77 compiler. The precise command used is as follows:
2877
2878`.f'
2879 `$(F77) -c $(AM_FFLAGS) $(FFLAGS)'
2880
2881`.F'
2882 `$(F77) -c $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
2883 $(AM_FFLAGS) $(FFLAGS)'
2884
2885`.r'
2886 `$(F77) -c $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)'
2887
2888
2889
2890File: automake.info, Node: Mixing Fortran 77 With C and C++, Next: Fortran 77 and Autoconf, Prev: Compiling Fortran 77 Files, Up: Fortran 77 Support
2891
2892Mixing Fortran 77 With C and C++
2893--------------------------------
2894
2895Automake currently provides _limited_ support for creating programs and
2896shared libraries that are a mixture of Fortran 77 and C and/or C++.
2897However, there are many other issues related to mixing Fortran 77 with
2898other languages that are _not_ (currently) handled by Automake, but
2899that are handled by other packages(1).
2900
2901 Automake can help in two ways:
2902
2903 1. Automatic selection of the linker depending on which combinations
2904 of source code.
2905
2906 2. Automatic selection of the appropriate linker flags (e.g. `-L' and
2907 `-l') to pass to the automatically selected linker in order to link
2908 in the appropriate Fortran 77 intrinsic and run-time libraries.
2909
2910 These extra Fortran 77 linker flags are supplied in the output
2911 variable `FLIBS' by the `AC_F77_LIBRARY_LDFLAGS' Autoconf macro
2912 supplied with newer versions of Autoconf (Autoconf version 2.13 and
2913 later). *Note Fortran 77 Compiler Characteristics:
2914 (autoconf)Fortran 77 Compiler Characteristics.
2915
2916 If Automake detects that a program or shared library (as mentioned in
2917some `_PROGRAMS' or `_LTLIBRARIES' primary) contains source code that
2918is a mixture of Fortran 77 and C and/or C++, then it requires that the
2919macro `AC_F77_LIBRARY_LDFLAGS' be called in `configure.in', and that
2920either `$(FLIBS)' or `@FLIBS@' appear in the appropriate `_LDADD' (for
2921programs) or `_LIBADD' (for shared libraries) variables. It is the
2922responsibility of the person writing the `Makefile.am' to make sure
2923that `$(FLIBS)' or `@FLIBS@' appears in the appropriate `_LDADD' or
2924`_LIBADD' variable.
2925
2926 For example, consider the following `Makefile.am':
2927
2928 bin_PROGRAMS = foo
2929 foo_SOURCES = main.cc foo.f
2930 foo_LDADD = libfoo.la @FLIBS@
2931
2932 pkglib_LTLIBRARIES = libfoo.la
2933 libfoo_la_SOURCES = bar.f baz.c zardoz.cc
2934 libfoo_la_LIBADD = $(FLIBS)
2935
2936 In this case, Automake will insist that `AC_F77_LIBRARY_LDFLAGS' is
2937mentioned in `configure.in'. Also, if `@FLIBS@' hadn't been mentioned
2938in `foo_LDADD' and `libfoo_la_LIBADD', then Automake would have issued
2939a warning.
2940
2941* Menu:
2942
2943* How the Linker is Chosen::
2944
2945 ---------- Footnotes ----------
2946
2947 (1) For example, the cfortran package
2948(http://www-zeus.desy.de/~burow/cfortran/) addresses all of these
2949inter-language issues, and runs under nearly all Fortran 77, C and C++
2950compilers on nearly all platforms. However, `cfortran' is not yet Free
2951Software, but it will be in the next major release.
2952
2953
2954File: automake.info, Node: How the Linker is Chosen, Prev: Mixing Fortran 77 With C and C++, Up: Mixing Fortran 77 With C and C++
2955
2956How the Linker is Chosen
2957........................
2958
2959The following diagram demonstrates under what conditions a particular
2960linker is chosen by Automake.
2961
2962 For example, if Fortran 77, C and C++ source code were to be compiled
2963into a program, then the C++ linker will be used. In this case, if the
2964C or Fortran 77 linkers required any special libraries that weren't
2965included by the C++ linker, then they must be manually added to an
2966`_LDADD' or `_LIBADD' variable by the user writing the `Makefile.am'.
2967
2968 \ Linker
2969 source \
2970 code \ C C++ Fortran
2971 ----------------- +---------+---------+---------+
2972 | | | |
2973 C | x | | |
2974 | | | |
2975 +---------+---------+---------+
2976 | | | |
2977 C++ | | x | |
2978 | | | |
2979 +---------+---------+---------+
2980 | | | |
2981 Fortran | | | x |
2982 | | | |
2983 +---------+---------+---------+
2984 | | | |
2985 C + C++ | | x | |
2986 | | | |
2987 +---------+---------+---------+
2988 | | | |
2989 C + Fortran | | | x |
2990 | | | |
2991 +---------+---------+---------+
2992 | | | |
2993 C++ + Fortran | | x | |
2994 | | | |
2995 +---------+---------+---------+
2996 | | | |
2997 C + C++ + Fortran | | x | |
2998 | | | |
2999 +---------+---------+---------+
3000
3001
3002File: automake.info, Node: Fortran 77 and Autoconf, Prev: Mixing Fortran 77 With C and C++, Up: Fortran 77 Support
3003
3004Fortran 77 and Autoconf
3005-----------------------
3006
3007The current Automake support for Fortran 77 requires a recent enough
3008version of Autoconf that also includes support for Fortran 77. Full
3009Fortran 77 support was added to Autoconf 2.13, so you will want to use
3010that version of Autoconf or later.
3011
3012
3013File: automake.info, Node: Java Support, Next: Support for Other Languages, Prev: Fortran 77 Support, Up: Programs
3014
3015Java Support
3016============
3017
3018Automake includes support for compiled Java, using `gcj', the Java
3019front end to the GNU Compiler Collection.
3020
3021 Any package including Java code to be compiled must define the output
3022variable `GCJ' in `configure.in'; the variable `GCJFLAGS' must also be
3023defined somehow (either in `configure.in' or `Makefile.am'). The
3024simplest way to do this is to use the `AM_PROG_GCJ' macro.
3025
3026 By default, programs including Java source files are linked with
3027`gcj'.
3028
3029 As always, the contents of `AM_GCJFLAGS' are passed to every
3030compilation invoking `gcj' (in its role as an ahead-of-time compiler -
3031when invoking it to create `.class' files, `AM_JAVACFLAGS' is used
3032instead). If it is necessary to pass options to `gcj' from
3033`Makefile.am', this variable, and not the user variable `GCJFLAGS',
3034should be used.
3035
3036 `gcj' can be used to compile `.java', `.class', `.zip', or `.jar'
3037files.
3038
3039 When linking, `gcj' requires that the main class be specified using
3040the `--main=' option. The easiest way to do this is to use the
3041`_LDFLAGS' variable for the program.
3042
3043
3044File: automake.info, Node: Support for Other Languages, Next: ANSI, Prev: Java Support, Up: Programs
3045
3046Support for Other Languages
3047===========================
3048
3049Automake currently only includes full support for C, C++ (*note C++
3050Support::), Fortran 77 (*note Fortran 77 Support::), and Java (*note
3051Java Support::). There is only rudimentary support for other
3052languages, support for which will be improved based on user demand.
3053
3054 Some limited support for adding your own languages is available via
3055the suffix rule handling; see *Note Suffixes::.
3056
3057
3058File: automake.info, Node: ANSI, Next: Dependencies, Prev: Support for Other Languages, Up: Programs
3059
3060Automatic de-ANSI-fication
3061==========================
3062
3063Although the GNU standards allow the use of ANSI C, this can have the
3064effect of limiting portability of a package to some older compilers
3065(notably the SunOS C compiler).
3066
3067 Automake allows you to work around this problem on such machines by
3068"de-ANSI-fying" each source file before the actual compilation takes
3069place.
3070
3071 If the `Makefile.am' variable `AUTOMAKE_OPTIONS' (*note Options::)
3072contains the option `ansi2knr' then code to handle de-ANSI-fication is
3073inserted into the generated `Makefile.in'.
3074
3075 This causes each C source file in the directory to be treated as
3076ANSI C. If an ANSI C compiler is available, it is used. If no ANSI C
3077compiler is available, the `ansi2knr' program is used to convert the
3078source files into K&R C, which is then compiled.
3079
3080 The `ansi2knr' program is simple-minded. It assumes the source code
3081will be formatted in a particular way; see the `ansi2knr' man page for
3082details.
3083
3084 Support for de-ANSI-fication requires the source files `ansi2knr.c'
3085and `ansi2knr.1' to be in the same package as the ANSI C source; these
3086files are distributed with Automake. Also, the package `configure.in'
3087must call the macro `AM_C_PROTOTYPES' (*note Macros::).
3088
3089 Automake also handles finding the `ansi2knr' support files in some
3090other directory in the current package. This is done by prepending the
3091relative path to the appropriate directory to the `ansi2knr' option.
3092For instance, suppose the package has ANSI C code in the `src' and
3093`lib' subdirectories. The files `ansi2knr.c' and `ansi2knr.1' appear
3094in `lib'. Then this could appear in `src/Makefile.am':
3095
3096 AUTOMAKE_OPTIONS = ../lib/ansi2knr
3097
3098 If no directory prefix is given, the files are assumed to be in the
3099current directory.
3100
3101 Note that automatic de-ANSI-fication will not work when the package
3102is being built for a different host architecture. That is because
3103automake currently has no way to build `ansi2knr' for the build machine.
3104
3105 Using `LIBOBJS' with source de-ANSI-fication used to require
3106hand-crafted code in `configure' to append `$U' to basenames in
3107`LIBOBJS'. This is no longer true today. Starting with version 2.54,
3108Autoconf takes care of rewriting `LIBOBJS' and `LTLIBOBJS'. (*note
3109`AC_LIBOBJ' vs. `LIBOBJS': (autoconf)AC_LIBOBJ vs LIBOBJS.)
3110
3111
3112File: automake.info, Node: Dependencies, Next: EXEEXT, Prev: ANSI, Up: Programs
3113
3114Automatic dependency tracking
3115=============================
3116
3117As a developer it is often painful to continually update the
3118`Makefile.in' whenever the include-file dependencies change in a
3119project. Automake supplies a way to automatically track dependency
3120changes.
3121
3122 Automake always uses complete dependencies for a compilation,
3123including system headers. Automake's model is that dependency
3124computation should be a side effect of the build. To this end,
3125dependencies are computed by running all compilations through a special
3126wrapper program called `depcomp'. `depcomp' understands how to coax
3127many different C and C++ compilers into generating dependency
3128information in the format it requires. `automake -a' will install
3129`depcomp' into your source tree for you. If `depcomp' can't figure out
3130how to properly invoke your compiler, dependency tracking will simply
3131be disabled for your build.
3132
3133 Experience with earlier versions of Automake (1) taught us that it
3134is not reliable to generate dependencies only on the maintainer's
3135system, as configurations vary too much. So instead Automake
3136implements dependency tracking at build time.
3137
3138 Automatic dependency tracking can be suppressed by putting
3139`no-dependencies' in the variable `AUTOMAKE_OPTIONS', or passing
3140`no-dependencies' as an argument to `AM_INIT_AUTOMAKE' (this should be
3141the preferred way). Or, you can invoke `automake' with the `-i'
3142option. Dependency tracking is enabled by default.
3143
3144 The person building your package also can choose to disable
3145dependency tracking by configuring with `--disable-dependency-tracking'.
3146
3147 ---------- Footnotes ----------
3148
3149 (1) See `http://sources.redhat.com/automake/dependencies.html' for
3150more information on the history and experiences with automatic
3151dependency tracking in Automake
3152
3153
3154File: automake.info, Node: EXEEXT, Prev: Dependencies, Up: Programs
3155
3156Support for executable extensions
3157=================================
3158
3159On some platforms, such as Windows, executables are expected to have an
3160extension such as `.exe'. On these platforms, some compilers (GCC
3161among them) will automatically generate `foo.exe' when asked to
3162generate `foo'.
3163
3164 Automake provides mostly-transparent support for this. Unfortunately
3165_mostly_ doesn't yet mean _fully_. Until the English dictionary is
3166revised, you will have to assist Automake if your package must support
3167those platforms.
3168
3169 One thing you must be aware of is that, internally, Automake rewrites
3170something like this:
3171
3172 bin_PROGRAMS = liver
3173
3174 to this:
3175
3176 bin_PROGRAMS = liver$(EXEEXT)
3177
3178 The targets Automake generates are likewise given the `$(EXEEXT)'
3179extension. `EXEEXT'
3180
3181 However, Automake cannot apply this rewriting to `configure'
3182substitutions. This means that if you are conditionally building a
3183program using such a substitution, then your `configure.in' must take
3184care to add `$(EXEEXT)' when constructing the output variable.
3185
3186 With Autoconf 2.13 and earlier, you must explicitly use `AC_EXEEXT'
3187to get this support. With Autoconf 2.50, `AC_EXEEXT' is run
3188automatically if you configure a compiler (say, through `AC_PROG_CC').
3189
3190 Sometimes maintainers like to write an explicit link rule for their
3191program. Without executable extension support, this is easy--you
3192simply write a target with the same name as the program. However, when
3193executable extension support is enabled, you must instead add the
3194`$(EXEEXT)' suffix.
3195
3196 Unfortunately, due to the change in Autoconf 2.50, this means you
3197must always add this extension. However, this is a problem for
3198maintainers who know their package will never run on a platform that
3199has executable extensions. For those maintainers, the `no-exeext'
3200option (*note Options::) will disable this feature. This works in a
3201fairly ugly way; if `no-exeext' is seen, then the presence of a target
3202named `foo' in `Makefile.am' will override an automake-generated target
3203of the form `foo$(EXEEXT)'. Without the `no-exeext' option, this use
3204will give an error.
3205
3206
3207File: automake.info, Node: Other objects, Next: Other GNU Tools, Prev: Programs, Up: Top
3208
3209Other Derived Objects
3210*********************
3211
3212Automake can handle derived objects which are not C programs. Sometimes
3213the support for actually building such objects must be explicitly
3214supplied, but Automake will still automatically handle installation and
3215distribution.
3216
3217* Menu:
3218
3219* Scripts:: Executable scripts
3220* Headers:: Header files
3221* Data:: Architecture-independent data files
3222* Sources:: Derived sources
3223
3224
3225File: automake.info, Node: Scripts, Next: Headers, Prev: Other objects, Up: Other objects
3226
3227Executable Scripts
3228==================
3229
3230It is possible to define and install programs which are scripts. Such
3231programs are listed using the `SCRIPTS' primary name. Automake doesn't
3232define any dependencies for scripts; the `Makefile.am' should include
3233the appropriate rules.
3234
3235 Automake does not assume that scripts are derived objects; such
3236objects must be deleted by hand (*note Clean::).
3237
3238 The `automake' program itself is a Perl script that is generated at
3239configure time from `automake.in'. Here is how this is handled:
3240
3241 bin_SCRIPTS = automake
3242
3243 Since `automake' appears in the `AC_OUTPUT' macro, a target for it
3244is automatically generated, and it is also automatically cleaned
3245(despite the fact it's a script).
3246
3247 Script objects can be installed in `bindir', `sbindir',
3248`libexecdir', or `pkgdatadir'.
3249
3250 Scripts that need not being installed can be listed in
3251`noinst_SCRIPTS', and among them, those which are needed only by `make
3252check' should go in `check_SCRIPTS'.
3253
3254
3255File: automake.info, Node: Headers, Next: Data, Prev: Scripts, Up: Other objects
3256
3257Header files
3258============
3259
3260Header files are specified by the `HEADERS' family of variables.
3261Generally header files are not installed, so the `noinst_HEADERS'
3262variable will be the most used. (1)
3263
3264 All header files must be listed somewhere; missing ones will not
3265appear in the distribution. Often it is clearest to list uninstalled
3266headers with the rest of the sources for a program. *Note A Program::.
3267Headers listed in a `_SOURCES' variable need not be listed in any
3268`_HEADERS' variable.
3269
3270 Headers can be installed in `includedir', `oldincludedir', or
3271`pkgincludedir'.
3272
3273 ---------- Footnotes ----------
3274
3275 (1) However, for the case of a non-installed header file that is
3276actually used by a particular program, we recommend listing it in the
3277program's `_SOURCES' variable instead of in `noinst_HEADERS'. We
3278believe this is more clear.
3279
3280
3281File: automake.info, Node: Data, Next: Sources, Prev: Headers, Up: Other objects
3282
3283Architecture-independent data files
3284===================================
3285
3286Automake supports the installation of miscellaneous data files using the
3287`DATA' family of variables.
3288
3289 Such data can be installed in the directories `datadir',
3290`sysconfdir', `sharedstatedir', `localstatedir', or `pkgdatadir'.
3291
3292 By default, data files are _not_ included in a distribution. Of
3293course, you can use the `dist_' prefix to change this on a per-variable
3294basis.
3295
3296 Here is how Automake declares its auxiliary data files:
3297
3298 dist_pkgdata_DATA = clean-kr.am clean.am ...
3299
3300
3301File: automake.info, Node: Sources, Prev: Data, Up: Other objects
3302
3303Built sources
3304=============
3305
3306Because Automake's automatic dependency tracking works as a side-effect
3307of compilation (*note Dependencies::) there is a bootstrap issue: a
3308target should not be compiled before its dependencies are made, but
3309these dependencies are unknown until the target is first compiled.
3310
3311 Ordinarily this is not a problem, because dependencies are
3312distributed sources: they preexist and do not need to be built.
3313Suppose that `foo.c' includes `foo.h'. When it first compiles `foo.o',
3314`make' only knows that `foo.o' depends on `foo.c'. As a side-effect of
3315this compilation `depcomp' records the `foo.h' dependency so that
3316following invocations of `make' will honor it. In these conditions,
3317it's clear there is no problem: either `foo.o' doesn't exist and has to
3318be built (regardless of the dependencies), either accurate dependencies
3319exist and they can be used to decide whether `foo.o' should be rebuilt.
3320
3321 It's a different story if `foo.h' doesn't exist by the first `make'
3322run. For instance there might be a rule to build `foo.h'. This time
3323`file.o''s build will fail because the compiler can't find `foo.h'.
3324`make' failed to trigger the rule to build `foo.h' first by lack of
3325dependency information.
3326
3327 The `BUILT_SOURCES' variable is a workaround for this problem. A
3328source file listed in `BUILT_SOURCES' is made on `make all' or `make
3329check' (or even `make install') before other targets are processed.
3330However, such a source file is not _compiled_ unless explicitly
3331requested by mentioning it in some other `_SOURCES' variable.
3332
3333 So, to conclude our introductory example, we could use
3334`BUILT_SOURCES = foo.h' to ensure `foo.h' gets built before any other
3335target (including `foo.o') during `make all' or `make check'.
3336
3337 `BUILT_SOURCES' is actually a bit of a misnomer, as any file which
3338must be created early in the build process can be listed in this
3339variable. Moreover, all built sources do not necessarily have to be
3340listed in `BUILT_SOURCES'. For instance a generated `.c' file doesn't
3341need to appear in `BUILT_SOURCES' (unless it is included by another
3342source), because it's a known dependency of the associated object.
3343
3344 It might be important to emphasize that `BUILT_SOURCES' is honored
3345only by `make all', `make check' and `make install'. This means you
3346cannot build a specific target (e.g., `make foo') in a clean tree if it
3347depends on a built source. However it will succeed if you have run
3348`make all' earlier, because accurate dependencies are already available.
3349
3350 The next section illustrates and discusses the handling of built
3351sources on a toy example.
3352
3353* Menu:
3354
3355* Built sources example:: Several ways to handle built sources.
3356
3357
3358File: automake.info, Node: Built sources example, Prev: Sources, Up: Sources
3359
3360Built sources example
3361---------------------
3362
3363Suppose that `foo.c' includes `bindir.h', which is
3364installation-dependent and not distributed: it needs to be built. Here
3365`bindir.h' defines the preprocessor macro `bindir' to the value of the
3366`make' variable `bindir' (inherited from `configure').
3367
3368 We suggest several implementations below. It's not meant to be an
3369exhaustive listing of all ways to handle built sources, but it will give
3370you a few ideas if you encounter this issue.
3371
3372First try
3373---------
3374
3375This first implementation will illustrate the bootstrap issue mentioned
3376in the previous section (*note Sources::).
3377
3378 Here is a tentative `Makefile.am'.
3379
3380 # This won't work.
3381 bin_PROGRAMS = foo
3382 foo_SOURCES = foo.c
3383 nodist_foo_SOURCES = bindir.h
3384 CLEANFILES = bindir.h
3385 bindir.h: Makefile
3386 echo '#define bindir "$(bindir)"' >$@
3387
3388 This setup doesn't work, because Automake doesn't know that `foo.c'
3389includes `bindir.h'. Remember, automatic dependency tracking works as
3390a side-effect of compilation, so the dependencies of `foo.o' will be
3391known only after `foo.o' has been compiled (*note Dependencies::). The
3392symptom is as follows.
3393
3394 % make
3395 source='foo.c' object='foo.o' libtool=no \
3396 depfile='.deps/foo.Po' tmpdepfile='.deps/foo.TPo' \
3397 depmode=gcc /bin/sh ./depcomp \
3398 gcc -I. -I. -g -O2 -c `test -f 'foo.c' || echo './'`foo.c
3399 foo.c:2: bindir.h: No such file or directory
3400 make: *** [foo.o] Error 1
3401
3402Using `BUILT_SOURCES'
3403---------------------
3404
3405A solution is to require `bindir.h' to be built before anything else.
3406This is what `BUILT_SOURCES' is meant for (*note Sources::).
3407
3408 bin_PROGRAMS = foo
3409 foo_SOURCES = foo.c
3410 BUILT_SOURCES = bindir.h
3411 CLEANFILES = bindir.h
3412 bindir.h: Makefile
3413 echo '#define bindir "$(bindir)"' >$@
3414
3415 See how `bindir.h' get built first:
3416
3417 % make
3418 echo '#define bindir "/usr/local/bin"' >bindir.h
3419 make all-am
3420 make[1]: Entering directory `/home/adl/tmp'
3421 source='foo.c' object='foo.o' libtool=no \
3422 depfile='.deps/foo.Po' tmpdepfile='.deps/foo.TPo' \
3423 depmode=gcc /bin/sh ./depcomp \
3424 gcc -I. -I. -g -O2 -c `test -f 'foo.c' || echo './'`foo.c
3425 gcc -g -O2 -o foo foo.o
3426 make[1]: Leaving directory `/home/adl/tmp'
3427
3428 However, as said earlier, `BUILT_SOURCES' applies only to the `all',
3429`check', and `install' targets. It still fails if you try to run `make
3430foo' explicitly:
3431
3432 % make clean
3433 test -z "bindir.h" || rm -f bindir.h
3434 test -z "foo" || rm -f foo
3435 rm -f *.o core *.core
3436 % : > .deps/foo.Po # Suppress previously recorded dependencies
3437 % make foo
3438 source='foo.c' object='foo.o' libtool=no \
3439 depfile='.deps/foo.Po' tmpdepfile='.deps/foo.TPo' \
3440 depmode=gcc /bin/sh ./depcomp \
3441 gcc -I. -I. -g -O2 -c `test -f 'foo.c' || echo './'`foo.c
3442 foo.c:2: bindir.h: No such file or directory
3443 make: *** [foo.o] Error 1
3444
3445Recording dependencies manually
3446-------------------------------
3447
3448Usually people are happy enough with `BUILT_SOURCES' because they never
3449run targets such as `make foo' before `make all', as in the previous
3450example. However if this matters to you, you can avoid `BUILT_SOURCES'
3451and record such dependencies explicitly in the `Makefile.am'.
3452
3453 bin_PROGRAMS = foo
3454 foo_SOURCES = foo.c
3455 foo.$(OBJEXT): bindir.h
3456 CLEANFILES = bindir.h
3457 bindir.h: Makefile
3458 echo '#define bindir "$(bindir)"' >$@
3459
3460 You don't have to list _all_ the dependencies of `foo.o' explicitly,
3461only those which might need to be built. If a dependency already
3462exists, it will not hinder the first compilation and will be recorded
3463by the normal dependency tracking code. (Note that after this first
3464compilation the dependency tracking code will also have recorded the
3465dependency between `foo.o' and `bindir.h'; so our explicit dependency
3466is really useful to the first build only.)
3467
3468 Adding explicit dependencies like this can be a bit dangerous if you
3469are not careful enough. This is due to the way Automake tries not to
3470overwrite your rules (it assumes you know better than it).
3471`foo.$(OBJEXT): bindir.h' supersedes any rule Automake may want to
3472output to build `foo.$(OBJEXT)'. It happens to work in this case
3473because Automake doesn't have to output any `foo.$(OBJEXT):' target: it
3474relies on a suffix rule instead (i.e., `.c.$(OBJEXT):'). Always check
3475the generated `Makefile.in' if you do this.
3476
3477Build `bindir.h' from `configure'
3478---------------------------------
3479
3480It's possible to define this preprocessor macro from `configure',
3481either in `config.h' (*note Defining Directories: (autoconf)Defining
3482Directories.), or by processing a `bindir.h.in' file using
3483`AC_CONFIG_FILES' (*note Configuration Actions: (autoconf)Configuration
3484Actions.).
3485
3486 At this point it should be clear that building `bindir.h' from
3487`configure' work well for this example. `bindir.h' will exist before
3488you build any target, hence will not cause any dependency issue.
3489
3490 The Makefile can be shrunk as follows. We do not even have to
3491mention `bindir.h'.
3492
3493 bin_PROGRAMS = foo
3494 foo_SOURCES = foo.c
3495
3496 However, it's not always possible to build sources from `configure',
3497especially when these sources are generated by a tool that needs to be
3498built first...
3499
3500Build `bindir.c', not `bindir.h'.
3501---------------------------------
3502
3503Another attractive idea is to define `bindir' as a variable or function
3504exported from `bindir.o', and build `bindir.c' instead of `bindir.h'.
3505
3506 noinst_PROGRAMS = foo
3507 foo_SOURCES = foo.c bindir.h
3508 nodist_foo_SOURCES = bindir.c
3509 CLEANFILES = bindir.c
3510 bindir.c: Makefile
3511 echo 'const char bindir[] = "$(bindir)";' >$
3512
3513 `bindir.h' contains just the variable's declaration and doesn't need
3514to be built, so it won't cause any trouble. `bindir.o' is always
3515dependent on `bindir.c', so `bindir.c' will get built first.
3516
3517Which is best?
3518--------------
3519
3520There is no panacea, of course. Each solution has its merits and
3521drawbacks.
3522
3523 You cannot use `BUILT_SOURCES' if the ability to run `make foo' on a
3524clean tree is important to you.
3525
3526 You won't add explicit dependencies if you are leery of overriding
3527an Automake target by mistake.
3528
3529 Building files from `./configure' is not always possible, neither is
3530converting `.h' files into `.c' files.
3531
3532
3533File: automake.info, Node: Other GNU Tools, Next: Documentation, Prev: Other objects, Up: Top
3534
3535Other GNU Tools
3536***************
3537
3538Since Automake is primarily intended to generate `Makefile.in's for use
3539in GNU programs, it tries hard to interoperate with other GNU tools.
3540
3541* Menu:
3542
3543* Emacs Lisp:: Emacs Lisp
3544* gettext:: Gettext
3545* Libtool:: Libtool
3546* Java:: Java
3547* Python:: Python
3548
3549
3550File: automake.info, Node: Emacs Lisp, Next: gettext, Prev: Other GNU Tools, Up: Other GNU Tools
3551
3552Emacs Lisp
3553==========
3554
3555Automake provides some support for Emacs Lisp. The `LISP' primary is
3556used to hold a list of `.el' files. Possible prefixes for this primary
3557are `lisp_' and `noinst_'. Note that if `lisp_LISP' is defined, then
3558`configure.in' must run `AM_PATH_LISPDIR' (*note Macros::).
3559
3560 By default Automake will byte-compile all Emacs Lisp source files
3561using the Emacs found by `AM_PATH_LISPDIR'. If you wish to avoid
3562byte-compiling, simply define the variable `ELCFILES' to be empty.
3563Byte-compiled Emacs Lisp files are not portable among all versions of
3564Emacs, so it makes sense to turn this off if you expect sites to have
3565more than one version of Emacs installed. Furthermore, many packages
3566don't actually benefit from byte-compilation. Still, we recommend that
3567you leave it enabled by default. It is probably better for sites with
3568strange setups to cope for themselves than to make the installation less
3569nice for everybody else.
3570
3571 Lisp sources are not distributed by default. You can prefix the
3572`LISP' primary with `dist_', as in `dist_lisp_LISP' or
3573`dist_noinst_LISP', to indicate that these files should be distributed.
3574
3575
3576File: automake.info, Node: gettext, Next: Libtool, Prev: Emacs Lisp, Up: Other GNU Tools
3577
3578Gettext
3579=======
3580
3581If `AM_GNU_GETTEXT' is seen in `configure.in', then Automake turns on
3582support for GNU gettext, a message catalog system for
3583internationalization (*note GNU Gettext: (gettext)GNU Gettext.).
3584
3585 The `gettext' support in Automake requires the addition of two
3586subdirectories to the package, `intl' and `po'. Automake insures that
3587these directories exist and are mentioned in `SUBDIRS'.
3588
3589
3590File: automake.info, Node: Libtool, Next: Java, Prev: gettext, Up: Other GNU Tools
3591
3592Libtool
3593=======
3594
3595Automake provides support for GNU Libtool (*note Introduction:
3596(libtool)Top.) with the `LTLIBRARIES' primary. *Note A Shared
3597Library::.
3598
3599
3600File: automake.info, Node: Java, Next: Python, Prev: Libtool, Up: Other GNU Tools
3601
3602Java
3603====
3604
3605Automake provides some minimal support for Java compilation with the
3606`JAVA' primary.
3607
3608 Any `.java' files listed in a `_JAVA' variable will be compiled with
3609`JAVAC' at build time. By default, `.class' files are not included in
3610the distribution.
3611
3612 Currently Automake enforces the restriction that only one `_JAVA'
3613primary can be used in a given `Makefile.am'. The reason for this
3614restriction is that, in general, it isn't possible to know which
3615`.class' files were generated from which `.java' files - so it would be
3616impossible to know which files to install where. For instance, a
3617`.java' file can define multiple classes; the resulting `.class' file
3618names cannot be predicted without parsing the `.java' file.
3619
3620 There are a few variables which are used when compiling Java sources:
3621
3622`JAVAC'
3623 The name of the Java compiler. This defaults to `javac'.
3624
3625`JAVACFLAGS'
3626 The flags to pass to the compiler. This is considered to be a user
3627 variable (*note User Variables::).
3628
3629`AM_JAVACFLAGS'
3630 More flags to pass to the Java compiler. This, and not
3631 `JAVACFLAGS', should be used when it is necessary to put Java
3632 compiler flags into `Makefile.am'.
3633
3634`JAVAROOT'
3635 The value of this variable is passed to the `-d' option to
3636 `javac'. It defaults to `$(top_builddir)'.
3637
3638`CLASSPATH_ENV'
3639 This variable is an `sh' expression which is used to set the
3640 `CLASSPATH' environment variable on the `javac' command line. (In
3641 the future we will probably handle class path setting differently.)
3642
3643
3644File: automake.info, Node: Python, Prev: Java, Up: Other GNU Tools
3645
3646Python
3647======
3648
3649Automake provides support for Python compilation with the `PYTHON'
3650primary.
3651
3652 Any files listed in a `_PYTHON' variable will be byte-compiled with
3653`py-compile' at install time. `py-compile' actually creates both
3654standard (`.pyc') and byte-compiled (`.pyo') versions of the source
3655files. Note that because byte-compilation occurs at install time, any
3656files listed in `noinst_PYTHON' will not be compiled. Python source
3657files are included in the distribution by default.
3658
3659 Automake ships with an Autoconf macro called `AM_PATH_PYTHON' which
3660will determine some Python-related directory variables (see below). If
3661you have called `AM_PATH_PYTHON' from `configure.in', then you may use
3662the following variables to list you Python source files in your
3663variables: `python_PYTHON', `pkgpython_PYTHON', `pyexecdir_PYTHON',
3664`pkgpyexecdir_PYTHON', depending where you want your files installed.
3665
3666 `AM_PATH_PYTHON' takes a single optional argument. This argument,
3667if present, is the minimum version of Python which can be used for this
3668package. If the version of Python found on the system is older than the
3669required version, then `AM_PATH_PYTHON' will cause an error.
3670
3671 `AM_PATH_PYTHON' creates several output variables based on the
3672Python installation found during configuration.
3673
3674`PYTHON'
3675 The name of the Python executable.
3676
3677`PYTHON_VERSION'
3678 The Python version number, in the form MAJOR.MINOR (e.g. `1.5').
3679 This is currently the value of `sys.version[:3]'.
3680
3681`PYTHON_PREFIX'
3682 The string `${prefix}'. This term may be used in future work
3683 which needs the contents of Python's `sys.prefix', but general
3684 consensus is to always use the value from configure.
3685
3686`PYTHON_EXEC_PREFIX'
3687 The string `${exec_prefix}'. This term may be used in future work
3688 which needs the contents of Python's `sys.exec_prefix', but general
3689 consensus is to always use the value from configure.
3690
3691`PYTHON_PLATFORM'
3692 The canonical name used by Python to describe the operating
3693 system, as given by `sys.platform'. This value is sometimes
3694 needed when building Python extensions.
3695
3696`pythondir'
3697 The directory name for the `site-packages' subdirectory of the
3698 standard Python install tree.
3699
3700`pkgpythondir'
3701 This is is the directory under `pythondir' which is named after the
3702 package. That is, it is `$(pythondir)/$(PACKAGE)'. It is provided
3703 as a convenience.
3704
3705`pyexecdir'
3706 This is the directory where Python extension modules (shared
3707 libraries) should be installed.
3708
3709`pkgpyexecdir'
3710 This is a convenience variable which is defined as
3711 `$(pyexecdir)/$(PACKAGE)'.
3712
3713 All these directory variables have values that start with either
3714`${prefix}' or `${exec_prefix}' unexpanded. This works fine in
3715`Makefiles', but it makes these variables hard to use in `configure'.
3716This is mandated by the GNU coding standards, so that the user can run
3717`make prefix=/foo install'. The Autoconf manual has a section with
3718more details on this topic (*note Installation Directory Variables:
3719(autoconf)Installation Directory Variables.).
3720
3721
3722File: automake.info, Node: Documentation, Next: Install, Prev: Other GNU Tools, Up: Top
3723
3724Building documentation
3725**********************
3726
3727Currently Automake provides support for Texinfo and man pages.
3728
3729* Menu:
3730
3731* Texinfo:: Texinfo
3732* Man pages:: Man pages
3733
3734
3735File: automake.info, Node: Texinfo, Next: Man pages, Prev: Documentation, Up: Documentation
3736
3737Texinfo
3738=======
3739
3740If the current directory contains Texinfo source, you must declare it
3741with the `TEXINFOS' primary. Generally Texinfo files are converted
3742into info, and thus the `info_TEXINFOS' variable is most commonly used
3743here. Any Texinfo source file must end in the `.texi', `.txi', or
3744`.texinfo' extension. We recommend `.texi' for new manuals.
3745
3746 Automake generates rules to build `.info', `.dvi', `.ps', and `.pdf'
3747files from your Texinfo sources. The `.info' files are built by `make
3748all' and installed by `make install' (unless you use `no-installinfo',
3749see below). The other files can be built on request by `make dvi',
3750`make ps', and `make pdf'.
3751
3752 If the `.texi' file `@include's `version.texi', then that file will
3753be automatically generated. The file `version.texi' defines four
3754Texinfo flag you can reference using `@value{EDITION}',
3755`@value{VERSION}', `@value{UPDATED}', and `@value{UPDATED-MONTH}'.
3756
3757`EDITION'
3758`VERSION'
3759 Both of these flags hold the version number of your program. They
3760 are kept separate for clarity.
3761
3762`UPDATED'
3763 This holds the date the primary `.texi' file was last modified.
3764
3765`UPDATED-MONTH'
3766 This holds the name of the month in which the primary `.texi' file
3767 was last modified.
3768
3769 The `version.texi' support requires the `mdate-sh' program; this
3770program is supplied with Automake and automatically included when
3771`automake' is invoked with the `--add-missing' option.
3772
3773 If you have multiple Texinfo files, and you want to use the
3774`version.texi' feature, then you have to have a separate version file
3775for each Texinfo file. Automake will treat any include in a Texinfo
3776file that matches `vers*.texi' just as an automatically generated
3777version file.
3778
3779 When an info file is rebuilt, the program named by the `MAKEINFO'
3780variable is used to invoke it. If the `makeinfo' program is found on
3781the system then it will be used by default; otherwise `missing' will be
3782used instead. The flags in the variables `MAKEINFOFLAGS' and
3783`AM_MAKEINFOFLAGS' will be passed to the `makeinfo' invocation; the
3784first of these is intended for use by the user (*note User Variables::)
3785and the second by the `Makefile.am' writer.
3786
3787 Sometimes an info file actually depends on more than one `.texi'
3788file. For instance, in GNU Hello, `hello.texi' includes the file
3789`gpl.texi'. You can tell Automake about these dependencies using the
3790`TEXI_TEXINFOS' variable. Here is how GNU Hello does it:
3791
3792 info_TEXINFOS = hello.texi
3793 hello_TEXINFOS = gpl.texi
3794
3795 By default, Automake requires the file `texinfo.tex' to appear in
3796the same directory as the Texinfo source. However, if you used
3797`AC_CONFIG_AUX_DIR' in `configure.in' (*note Finding `configure' Input:
3798(autoconf)Input.), then `texinfo.tex' is looked for there. Automake
3799supplies `texinfo.tex' if `--add-missing' is given.
3800
3801 If your package has Texinfo files in many directories, you can use
3802the variable `TEXINFO_TEX' to tell Automake where to find the canonical
3803`texinfo.tex' for your package. The value of this variable should be
3804the relative path from the current `Makefile.am' to `texinfo.tex':
3805
3806 TEXINFO_TEX = ../doc/texinfo.tex
3807
3808 The option `no-texinfo.tex' can be used to eliminate the requirement
3809for `texinfo.tex'. Use of the variable `TEXINFO_TEX' is preferable,
3810however, because that allows the `dvi', `ps', and `pdf' targets to
3811still work.
3812
3813 Automake generates an `install-info' target; some people apparently
3814use this. By default, info pages are installed by `make install'.
3815This can be prevented via the `no-installinfo' option.
3816
3817
3818File: automake.info, Node: Man pages, Prev: Texinfo, Up: Documentation
3819
3820Man pages
3821=========
3822
3823A package can also include man pages (but see the GNU standards on this
3824matter, *Note Man Pages: (standards)Man Pages.) Man pages are declared
3825using the `MANS' primary. Generally the `man_MANS' variable is used.
3826Man pages are automatically installed in the correct subdirectory of
3827`mandir', based on the file extension.
3828
3829 File extensions such as `.1c' are handled by looking for the valid
3830part of the extension and using that to determine the correct
3831subdirectory of `mandir'. Valid section names are the digits `0'
3832through `9', and the letters `l' and `n'.
3833
3834 Sometimes developers prefer to name a man page something like
3835`foo.man' in the source, and then rename it to have the correct suffix,
3836e.g. `foo.1', when installing the file. Automake also supports this
3837mode. For a valid section named SECTION, there is a corresponding
3838directory named `manSECTIONdir', and a corresponding `_MANS' variable.
3839Files listed in such a variable are installed in the indicated section.
3840If the file already has a valid suffix, then it is installed as-is;
3841otherwise the file suffix is changed to match the section.
3842
3843 For instance, consider this example:
3844 man1_MANS = rename.man thesame.1 alsothesame.1c
3845
3846 In this case, `rename.man' will be renamed to `rename.1' when
3847installed, but the other files will keep their names.
3848
3849 By default, man pages are installed by `make install'. However,
3850since the GNU project does not require man pages, many maintainers do
3851not expend effort to keep the man pages up to date. In these cases, the
3852`no-installman' option will prevent the man pages from being installed
3853by default. The user can still explicitly install them via `make
3854install-man'.
3855
3856 Here is how the man pages are handled in GNU `cpio' (which includes
3857both Texinfo documentation and man pages):
3858
3859 man_MANS = cpio.1 mt.1
3860 EXTRA_DIST = $(man_MANS)
3861
3862 Man pages are not currently considered to be source, because it is
3863not uncommon for man pages to be automatically generated. Therefore
3864they are not automatically included in the distribution. However, this
3865can be changed by use of the `dist_' prefix.
3866
3867 The `nobase_' prefix is meaningless for man pages and is disallowed.
3868
3869
3870File: automake.info, Node: Install, Next: Clean, Prev: Documentation, Up: Top
3871
3872What Gets Installed
3873*******************
3874
3875Basics of installation
3876======================
3877
3878Naturally, Automake handles the details of actually installing your
3879program once it has been built. All files named by the various
3880primaries are automatically installed in the appropriate places when the
3881user runs `make install'.
3882
3883 A file named in a primary is installed by copying the built file into
3884the appropriate directory. The base name of the file is used when
3885installing.
3886
3887 bin_PROGRAMS = hello subdir/goodbye
3888
3889 In this example, both `hello' and `goodbye' will be installed in
3890`$(bindir)'.
3891
3892 Sometimes it is useful to avoid the basename step at install time.
3893For instance, you might have a number of header files in subdirectories
3894of the source tree which are laid out precisely how you want to install
3895them. In this situation you can use the `nobase_' prefix to suppress
3896the base name step. For example:
3897
3898 nobase_include_HEADERS = stdio.h sys/types.h
3899
3900 Will install `stdio.h' in `$(includedir)' and `types.h' in
3901`$(includedir)/sys'.
3902
3903The two parts of install
3904========================
3905
3906Automake generates separate `install-data' and `install-exec' targets,
3907in case the installer is installing on multiple machines which share
3908directory structure--these targets allow the machine-independent parts
3909to be installed only once. `install-exec' installs platform-dependent
3910files, and `install-data' installs platform-independent files. The
3911`install' target depends on both of these targets. While Automake
3912tries to automatically segregate objects into the correct category, the
3913`Makefile.am' author is, in the end, responsible for making sure this
3914is done correctly.
3915
3916 Variables using the standard directory prefixes `data', `info',
3917`man', `include', `oldinclude', `pkgdata', or `pkginclude' (e.g.
3918`data_DATA') are installed by `install-data'.
3919
3920 Variables using the standard directory prefixes `bin', `sbin',
3921`libexec', `sysconf', `localstate', `lib', or `pkglib' (e.g.
3922`bin_PROGRAMS') are installed by `install-exec'.
3923
3924 Any variable using a user-defined directory prefix with `exec' in
3925the name (e.g. `myexecbin_PROGRAMS' is installed by `install-exec'.
3926All other user-defined prefixes are installed by `install-data'.
3927
3928Extending installation
3929======================
3930
3931It is possible to extend this mechanism by defining an
3932`install-exec-local' or `install-data-local' target. If these targets
3933exist, they will be run at `make install' time. These rules can do
3934almost anything; care is required.
3935
3936 Automake also supports two install hooks, `install-exec-hook' and
3937`install-data-hook'. These hooks are run after all other install rules
3938of the appropriate type, exec or data, have completed. So, for
3939instance, it is possible to perform post-installation modifications
3940using an install hook.
3941
3942Staged installs
3943===============
3944
3945Automake generates support for the `DESTDIR' variable in all install
3946rules. `DESTDIR' is used during the `make install' step to relocate
3947install objects into a staging area. Each object and path is prefixed
3948with the value of `DESTDIR' before being copied into the install area.
3949Here is an example of typical DESTDIR usage:
3950
3951 make DESTDIR=/tmp/staging install
3952
3953 This places install objects in a directory tree built under
3954`/tmp/staging'. If `/gnu/bin/foo' and `/gnu/share/aclocal/foo.m4' are
3955to be installed, the above command would install
3956`/tmp/staging/gnu/bin/foo' and `/tmp/staging/gnu/share/aclocal/foo.m4'.
3957
3958 This feature is commonly used to build install images and packages.
3959For more information, see *Note Makefile Conventions:
3960(standards)Makefile Conventions.
3961
3962 Support for `DESTDIR' is implemented by coding it directly into the
3963install rules. If your `Makefile.am' uses a local install rule (e.g.,
3964`install-exec-local') or an install hook, then you must write that code
3965to respect `DESTDIR'.
3966
3967Rules for the user
3968==================
3969
3970Automake also generates an `uninstall' target, an `installdirs' target,
3971and an `install-strip' target.
3972
3973 Automake supports `uninstall-local' and `uninstall-hook'. There is
3974no notion of separate uninstalls for "exec" and "data", as these
3975features would not provide additional functionality.
3976
3977 Note that `uninstall' is not meant as a replacement for a real
3978packaging tool.
3979
3980
3981File: automake.info, Node: Clean, Next: Dist, Prev: Install, Up: Top
3982
3983What Gets Cleaned
3984*****************
3985
3986The GNU Makefile Standards specify a number of different clean rules.
3987See *Note Standard Targets for Users: (standards)Standard Targets.
3988
3989 Generally the files that can be cleaned are determined automatically
3990by Automake. Of course, Automake also recognizes some variables that
3991can be defined to specify additional files to clean. These variables
3992are `MOSTLYCLEANFILES', `CLEANFILES', `DISTCLEANFILES', and
3993`MAINTAINERCLEANFILES'.
3994
3995 As the GNU Standards aren't always explicit as to which files should
3996be removed by which target, we've adopted a heuristic which we believe
3997was first formulated by Franc,ois Pinard:
3998
3999 * If `make' built it, and it is commonly something that one would
4000 want to rebuild (for instance, a `.o' file), then `mostlyclean'
4001 should delete it.
4002
4003 * Otherwise, if `make' built it, then `clean' should delete it.
4004
4005 * If `configure' built it, then `distclean' should delete it.
4006
4007 * If the maintainer built it (for instance, a `.info' file), then
4008 `maintainer-clean' should delete it. However `maintainer-clean'
4009 should not delete anything that needs to exist in order to run
4010 `./configure && make'.
4011
4012 We recommend that you follow this same set of heuristics in your
4013`Makefile.am'.
4014
4015
4016File: automake.info, Node: Dist, Next: Tests, Prev: Clean, Up: Top
4017
4018What Goes in a Distribution
4019***************************
4020
4021Basics of distribution
4022======================
4023
4024The `dist' target in the generated `Makefile.in' can be used to
4025generate a gzip'd `tar' file and other flavors of archive for
4026distribution. The files is named based on the `PACKAGE' and `VERSION'
4027variables defined by `AM_INIT_AUTOMAKE' (*note Macros::); more
4028precisely the gzip'd `tar' file is named `PACKAGE-VERSION.tar.gz'. You
4029can use the `make' variable `GZIP_ENV' to control how gzip is run. The
4030default setting is `--best'.
4031
4032 For the most part, the files to distribute are automatically found by
4033Automake: all source files are automatically included in a distribution,
4034as are all `Makefile.am's and `Makefile.in's. Automake also has a
4035built-in list of commonly used files which are automatically included
4036if they are found in the current directory (either physically, or as
4037the target of a `Makefile.am' rule). This list is printed by `automake
4038--help'. Also, files which are read by `configure' (i.e. the source
4039files corresponding to the files specified in various Autoconf macros
4040such as `AC_CONFIG_FILES' and siblings) are automatically distributed.
4041Helper scripts installed with `automake --add-missing' are also
4042distributed.
4043
4044 Still, sometimes there are files which must be distributed, but which
4045are not covered in the automatic rules. These files should be listed in
4046the `EXTRA_DIST' variable. You can mention files from subdirectories
4047in `EXTRA_DIST'.
4048
4049 You can also mention a directory in `EXTRA_DIST'; in this case the
4050entire directory will be recursively copied into the distribution.
4051Please note that this will also copy _everything_ in the directory,
4052including CVS/RCS version control files. We recommend against using
4053this feature.
4054
4055 If you define `SUBDIRS', Automake will recursively include the
4056subdirectories in the distribution. If `SUBDIRS' is defined
4057conditionally (*note Conditionals::), Automake will normally include all
4058directories that could possibly appear in `SUBDIRS' in the
4059distribution. If you need to specify the set of directories
4060conditionally, you can set the variable `DIST_SUBDIRS' to the exact
4061list of subdirectories to include in the distribution (*note Top
4062level::).
4063
4064Fine-grained distribution control
4065=================================
4066
4067Sometimes you need tighter control over what does _not_ go into the
4068distribution; for instance you might have source files which are
4069generated and which you do not want to distribute. In this case
4070Automake gives fine-grained control using the `dist' and `nodist'
4071prefixes. Any primary or `_SOURCES' variable can be prefixed with
4072`dist_' to add the listed files to the distribution. Similarly,
4073`nodist_' can be used to omit the files from the distribution.
4074
4075 As an example, here is how you would cause some data to be
4076distributed while leaving some source code out of the distribution:
4077
4078 dist_data_DATA = distribute-this
4079 bin_PROGRAMS = foo
4080 nodist_foo_SOURCES = do-not-distribute.c
4081
4082The dist hook
4083=============
4084
4085Occasionally it is useful to be able to change the distribution before
4086it is packaged up. If the `dist-hook' target exists, it is run after
4087the distribution directory is filled, but before the actual tar (or
4088shar) file is created. One way to use this is for distributing files
4089in subdirectories for which a new `Makefile.am' is overkill:
4090
4091 dist-hook:
4092 mkdir $(distdir)/random
4093 cp -p $(srcdir)/random/a1 $(srcdir)/random/a2 $(distdir)/random
4094
4095 Another way to to use this is for removing unnecessary files that get
4096recursively included by specifying a directory in EXTRA_DIST:
4097
4098 EXTRA_DIST = doc
4099
4100 dist-hook:
4101 rm -rf `find $(distdir)/doc -name CVS`
4102
4103Checking the distribution
4104=========================
4105
4106Automake also generates a `distcheck' target which can be of help to
4107ensure that a given distribution will actually work. `distcheck' makes
4108a distribution, then tries to do a `VPATH' build, run the test suite,
4109and finally make another tarfile to ensure the distribution is
4110self-contained.
4111
4112 Building the package involves running `./configure'. If you need to
4113supply additional flags to `configure', define them in the
4114`DISTCHECK_CONFIGURE_FLAGS' variable, either in your top-level
4115`Makefile.am', or on the command line when invoking `make'.
4116
4117 If the target `distcheck-hook' is defined in your `Makefile.am',
4118then it will be invoked by `distcheck' after the new distribution has
4119been unpacked, but before the unpacked copy is configured and built.
4120Your `distcheck-hook' can do almost anything, though as always caution
4121is advised. Generally this hook is used to check for potential
4122distribution errors not caught by the standard mechanism.
4123
4124 Speaking about potential distribution errors, `distcheck' will also
4125ensure that the `distclean' target actually removes all built files.
4126This is done by running `make distcleancheck' at the end of the `VPATH'
4127build. By default, `distcleancheck' will run `distclean' and then make
4128sure the build tree has been emptied by running
4129`$(distcleancheck_listfiles)'. Usually this check will find generated
4130files that you forgot to add to the `DISTCLEANFILES' variable (*note
4131Clean::).
4132
4133 The `distcleancheck' behavior should be OK for most packages,
4134otherwise you have the possibility to override the definition of either
4135the `distcleancheck' target, or the `$(distcleancheck_listfiles)'
4136variable. For instance to disable `distcleancheck' completely, add the
4137following rule to your top-level `Makefile.am':
4138
4139 distcleancheck:
4140 @:
4141
4142 If you want `distcleancheck' to ignore built files which have not
4143been cleaned because they are also part of the distribution, add the
4144following definition instead:
4145
4146 distcleancheck_listfiles = \
4147 find -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
4148
4149 The above definition is not the default because it's usually an
4150error if your Makefiles cause some distributed files to be rebuilt when
4151the user build the package. (Think about the user missing the tool
4152required to build the file; or if the required tool is built by your
4153package, consider the cross-compilation case where it can't be run.)
4154There is a FAQ entry about this (*note distcleancheck::), make sure you
4155read it before playing with `distcleancheck_listfiles'.
4156
4157 `distcheck' also checks that the `uninstall' target works properly,
4158both for ordinary and `DESTDIR' builds. It does this by invoking `make
4159uninstall', and then it checks the install tree to see if any files are
4160left over. This check will make sure that you correctly coded your
4161`uninstall'-related targets.
4162
4163 By default, the checking is done by the `distuninstallcheck' target,
4164and the list of files in the install tree is generated by
4165`$(distuninstallcheck_listfiles') (this is a variable whose value is a
4166shell command to run that prints the list of files to stdout).
4167
4168 Either of these can be overridden to modify the behavior of
4169`distcheck'. For instance, to disable this check completely, you would
4170write:
4171
4172 distuninstallcheck:
4173 @:
4174
4175The types of distributions
4176==========================
4177
4178Automake generates a `.tar.gz' file when asked to create a distribution
4179and other archives formats, *Note Options::. The target `dist-gzip'
4180generates the `.tar.gz' file only.
4181
4182
4183File: automake.info, Node: Tests, Next: Options, Prev: Dist, Up: Top
4184
4185Support for test suites
4186***********************
4187
4188Automake supports two forms of test suites.
4189
4190Simple Tests
4191============
4192
4193If the variable `TESTS' is defined, its value is taken to be a list of
4194programs to run in order to do the testing. The programs can either be
4195derived objects or source objects; the generated rule will look both in
4196`srcdir' and `.'. Programs needing data files should look for them in
4197`srcdir' (which is both an environment variable and a make variable) so
4198they work when building in a separate directory (*note Build
4199Directories: (autoconf)Build Directories.), and in particular for the
4200`distcheck' target (*note Dist::).
4201
4202 The number of failures will be printed at the end of the run. If a
4203given test program exits with a status of 77, then its result is ignored
4204in the final count. This feature allows non-portable tests to be
4205ignored in environments where they don't make sense.
4206
4207 The variable `TESTS_ENVIRONMENT' can be used to set environment
4208variables for the test run; the environment variable `srcdir' is set in
4209the rule. If all your test programs are scripts, you can also set
4210`TESTS_ENVIRONMENT' to an invocation of the shell (e.g. `$(SHELL)
4211-x'); this can be useful for debugging the tests.
4212
4213 You may define the variable `XFAIL_TESTS' to a list of tests
4214(usually a subset of `TESTS') that are expected to fail. This will
4215reverse the result of those tests.
4216
4217 Automake ensures that each program listed in `TESTS' is built before
4218any tests are run; you can list both source and derived programs in
4219`TESTS'. For instance, you might want to run a C program as a test.
4220To do this you would list its name in `TESTS' and also in
4221`check_PROGRAMS', and then specify it as you would any other program.
4222
4223DejaGnu Tests
4224=============
4225
4226If `dejagnu' (ftp://ftp.gnu.org/gnu/dejagnu/) appears in
4227`AUTOMAKE_OPTIONS', then a `dejagnu'-based test suite is assumed. The
4228variable `DEJATOOL' is a list of names which are passed, one at a time,
4229as the `--tool' argument to `runtest' invocations; it defaults to the
4230name of the package.
4231
4232 The variable `RUNTESTDEFAULTFLAGS' holds the `--tool' and `--srcdir'
4233flags that are passed to dejagnu by default; this can be overridden if
4234necessary.
4235
4236 The variables `EXPECT' and `RUNTEST' can also be overridden to
4237provide project-specific values. For instance, you will need to do
4238this if you are testing a compiler toolchain, because the default
4239values do not take into account host and target names.
4240
4241 The contents of the variable `RUNTESTFLAGS' are passed to the
4242`runtest' invocation. This is considered a "user variable" (*note User
4243Variables::). If you need to set `runtest' flags in `Makefile.am', you
4244can use `AM_RUNTESTFLAGS' instead.
4245
4246 Automake will generate rules to create a local `site.exp' file,
4247defining various variables detected by `./configure'. This file is
4248automatically read by DejaGnu. It is OK for the user of a package to
4249edit this file in order to tune the test suite. However this is not
4250the place where the test suite author should define new variables: this
4251should be done elsewhere in the real test suite code. Especially,
4252`site.exp' should not be distributed.
4253
4254 For more information regarding DejaGnu test suites, see *Note Top:
4255(dejagnu)Top.
4256
4257 In either case, the testing is done via `make check'.
4258
4259Install Tests
4260=============
4261
4262The `installcheck' target is available to the user as a way to run any
4263tests after the package has been installed. You can add tests to this
4264by writing an `installcheck-local' target.
4265
4266
4267File: automake.info, Node: Options, Next: Miscellaneous, Prev: Tests, Up: Top
4268
4269Changing Automake's Behavior
4270****************************
4271
4272Various features of Automake can be controlled by options in the
4273`Makefile.am'. Such options are applied on a per-`Makefile' basis when
4274listed in a special `Makefile' variable named `AUTOMAKE_OPTIONS'. They
4275are applied globally to all processed `Makefiles' when listed in the
4276first argument of `AM_INIT_AUTOMAKE' in `configure.in'. Currently
4277understood options are:
4278
4279`gnits'
4280`gnu'
4281`foreign'
4282`cygnus'
4283 Set the strictness as appropriate. The `gnits' option also implies
4284 `readme-alpha' and `check-news'.
4285
4286`ansi2knr'
4287`PATH/ansi2knr'
4288 Turn on automatic de-ANSI-fication. *Note ANSI::. If preceded by
4289 a path, the generated `Makefile.in' will look in the specified
4290 directory to find the `ansi2knr' program. The path should be a
4291 relative path to another directory in the same distribution
4292 (Automake currently does not check this).
4293
4294`check-news'
4295 Cause `make dist' to fail unless the current version number appears
4296 in the first few lines of the `NEWS' file.
4297
4298`dejagnu'
4299 Cause `dejagnu'-specific rules to be generated. *Note Tests::.
4300
4301`dist-bzip2'
4302 Generate a `dist-bzip2' target, creating a bzip2 tar archive of the
4303 distribution. `dist' will create it in addition to the other
4304 formats. bzip2 archives are frequently smaller than gzipped
4305 archives.
4306
4307`dist-shar'
4308 Generate a `dist-shar' target, creating a shar archive of the
4309 distribution. `dist' will create it in addition to the other
4310 formats.
4311
4312`dist-zip'
4313 Generate a `dist-zip' target, creating a zip archive of the
4314 distribution. `dist' will create it in addition to the other
4315 formats.
4316
4317`dist-tarZ'
4318 Generate a `dist-tarZ' target, creating a compressed tar archive of
4319 the distribution. `dist' will create it in addition to the other
4320 formats.
4321
4322`no-define'
4323 This options is meaningful only when passed as an argument to
4324 `AM_INIT_AUTOMAKE'. It will prevent the `PACKAGE' and `VERSION'
4325 variables to be `AC_DEFINE'd.
4326
4327`no-dependencies'
4328 This is similar to using `--include-deps' on the command line, but
4329 is useful for those situations where you don't have the necessary
4330 bits to make automatic dependency tracking work *Note
4331 Dependencies::. In this case the effect is to effectively disable
4332 automatic dependency tracking.
4333
4334`no-exeext'
4335 If your `Makefile.am' defines a target `foo', it will override a
4336 target named `foo$(EXEEXT)'. This is necessary when `EXEEXT' is
4337 found to be empty. However, by default automake will generate an
4338 error for this use. The `no-exeext' option will disable this
4339 error. This is intended for use only where it is known in advance
4340 that the package will not be ported to Windows, or any other
4341 operating system using extensions on executables.
4342
4343`no-installinfo'
4344 The generated `Makefile.in' will not cause info pages to be built
4345 or installed by default. However, `info' and `install-info'
4346 targets will still be available. This option is disallowed at
4347 `GNU' strictness and above.
4348
4349`no-installman'
4350 The generated `Makefile.in' will not cause man pages to be
4351 installed by default. However, an `install-man' target will still
4352 be available for optional installation. This option is disallowed
4353 at `GNU' strictness and above.
4354
4355`nostdinc'
4356 This option can be used to disable the standard `-I' options which
4357 are ordinarily automatically provided by Automake.
4358
4359`no-texinfo.tex'
4360 Don't require `texinfo.tex', even if there are texinfo files in
4361 this directory.
4362
4363`readme-alpha'
4364 If this release is an alpha release, and the file `README-alpha'
4365 exists, then it will be added to the distribution. If this option
4366 is given, version numbers are expected to follow one of two forms.
4367 The first form is `MAJOR.MINOR.ALPHA', where each element is a
4368 number; the final period and number should be left off for
4369 non-alpha releases. The second form is `MAJOR.MINORALPHA', where
4370 ALPHA is a letter; it should be omitted for non-alpha releases.
4371
4372`std-options'
4373 Make the `installcheck' target check that installed scripts and
4374 programs support the `--help' and `--version' options. This also
4375 provides a basic check that the program's run-time dependencies
4376 are satisfied after installation.
4377
4378 In a few situations, programs (or scripts) have to be exempted
4379 from this test. For instance `false' (from GNU sh-utils) is never
4380 successful, even for `--help' or `--version'. You can list such
4381 programs in the variable `AM_INSTALLCHECK_STD_OPTIONS_EXEMPT'.
4382 Programs (not scripts) listed in this variable should be suffixed
4383 by `$(EXEEXT)' for the sake of Win32 or OS/2. For instance
4384 suppose we build `false' as a program but `true.sh' as a script,
4385 and that neither of them support `--help' or `--version':
4386
4387 AUTOMAKE_OPTIONS = std-options
4388 bin_PROGRAMS = false ...
4389 bin_SCRIPTS = true.sh ...
4390 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false$(EXEEXT) true.sh
4391
4392`subdir-objects'
4393 If this option is specified, then objects are placed into the
4394 subdirectory of the build directory corresponding to the
4395 subdirectory of the source file. For instance if the source file
4396 is `subdir/file.cxx', then the output file would be
4397 `subdir/file.o'.
4398
4399VERSION
4400 A version number (e.g. `0.30') can be specified. If Automake is
4401 not newer than the version specified, creation of the `Makefile.in'
4402 will be suppressed.
4403
4404`-WCATEGORY' or `--warnings=CATEGORY'
4405 These options behave exactly like their command-line counterpart
4406 (*note Invoking Automake::). This allows you to enable or disable
4407 some warning categories on a per-file basis. You can also setup
4408 some warnings for your entire project; for instance try
4409 `AM_INIT_AUTOMAKE([-Wall])' in your `configure.in'.
4410
4411
4412 Unrecognized options are diagnosed by `automake'.
4413
4414 If you want an option to apply to all the files in the tree, you can
4415use the `AM_INIT_AUTOMAKE' macro in `configure.in'. *Note Macros::.
4416
4417
4418File: automake.info, Node: Miscellaneous, Next: Include, Prev: Options, Up: Top
4419
4420Miscellaneous Rules
4421*******************
4422
4423There are a few rules and variables that didn't fit anywhere else.
4424
4425* Menu:
4426
4427* Tags:: Interfacing to etags and mkid
4428* Suffixes:: Handling new file extensions
4429* Multilibs:: Support for multilibs.
4430
4431
4432File: automake.info, Node: Tags, Next: Suffixes, Prev: Miscellaneous, Up: Miscellaneous
4433
4434Interfacing to `etags'
4435======================
4436
4437Automake will generate rules to generate `TAGS' files for use with GNU
4438Emacs under some circumstances.
4439
4440 If any C, C++ or Fortran 77 source code or headers are present, then
4441`tags' and `TAGS' targets will be generated for the directory.
4442
4443 At the topmost directory of a multi-directory package, a `tags'
4444target file will be generated which, when run, will generate a `TAGS'
4445file that includes by reference all `TAGS' files from subdirectories.
4446
4447 The `tags' target will also be generated if the variable
4448`ETAGS_ARGS' is defined. This variable is intended for use in
4449directories which contain taggable source that `etags' does not
4450understand. The user can use the `ETAGSFLAGS' to pass additional flags
4451to `etags'; `AM_ETAGSFLAGS' is also available for use in `Makefile.am'.
4452
4453 Here is how Automake generates tags for its source, and for nodes in
4454its Texinfo file:
4455
4456 ETAGS_ARGS = automake.in --lang=none \
4457 --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
4458
4459 If you add filenames to `ETAGS_ARGS', you will probably also want to
4460set `TAGS_DEPENDENCIES'. The contents of this variable are added
4461directly to the dependencies for the `tags' target.
4462
4463 Automake also generates a `ctags' target which can be used to build
4464`vi'-style `tags' files. The variable `CTAGS' is the name of the
4465program to invoke (by default `ctags'); `CTAGSFLAGS' can be used by the
4466user to pass additional flags, and `AM_CTAGSFLAGS' can be used by the
4467`Makefile.am'.
4468
4469 Automake will also generate an `ID' target which will run `mkid' on
4470the source. This is only supported on a directory-by-directory basis.
4471
4472 Automake also supports the GNU Global Tags program
4473(http://www.gnu.org/software/global/). The `GTAGS' target runs Global
4474Tags automatically and puts the result in the top build directory. The
4475variable `GTAGS_ARGS' holds arguments which are passed to `gtags'.
4476
4477
4478File: automake.info, Node: Suffixes, Next: Multilibs, Prev: Tags, Up: Miscellaneous
4479
4480Handling new file extensions
4481============================
4482
4483It is sometimes useful to introduce a new implicit rule to handle a file
4484type that Automake does not know about.
4485
4486 For instance, suppose you had a compiler which could compile `.foo'
4487files to `.o' files. You would simply define an suffix rule for your
4488language:
4489
4490 .foo.o:
4491 foocc -c -o $@ $<
4492
4493 Then you could directly use a `.foo' file in a `_SOURCES' variable
4494and expect the correct results:
4495
4496 bin_PROGRAMS = doit
4497 doit_SOURCES = doit.foo
4498
4499 This was the simpler and more common case. In other cases, you will
4500have to help Automake to figure which extensions you are defining your
4501suffix rule for. This usually happens when your extensions does not
4502start with a dot. Then, all you have to do is to put a list of new
4503suffixes in the `SUFFIXES' variable *before* you define your implicit
4504rule.
4505
4506 For instance the following definition prevents Automake to
4507misinterpret `.idlC.cpp:' as an attempt to transform `.idlC' into
4508`.cpp'.
4509
4510 SUFFIXES = .idl C.cpp
4511 .idlC.cpp:
4512 # whatever
4513
4514 As you may have noted, the `SUFFIXES' variable behaves like the
4515`.SUFFIXES' special target of `make'. You should not touch `.SUFFIXES'
4516yourself, but use `SUFFIXES' instead and let Automake generate the
4517suffix list for `.SUFFIXES'. Any given `SUFFIXES' go at the start of
4518the generated suffixes list, followed by Automake generated suffixes
4519not already in the list.
4520
4521
4522File: automake.info, Node: Multilibs, Prev: Suffixes, Up: Miscellaneous
4523
4524Support for Multilibs
4525=====================
4526
4527Automake has support for an obscure feature called multilibs. A
4528"multilib" is a library which is built for multiple different ABIs at a
4529single time; each time the library is built with a different target
4530flag combination. This is only useful when the library is intended to
4531be cross-compiled, and it is almost exclusively used for compiler
4532support libraries.
4533
4534 The multilib support is still experimental. Only use it if you are
4535familiar with multilibs and can debug problems you might encounter.
4536
4537
4538File: automake.info, Node: Include, Next: Conditionals, Prev: Miscellaneous, Up: Top
4539
4540Include
4541*******
4542
4543Automake supports an `include' directive which can be used to include
4544other `Makefile' fragments when `automake' is run. Note that these
4545fragments are read and interpreted by `automake', not by `make'. As
4546with conditionals, `make' has no idea that `include' is in use.
4547
4548 There are two forms of `include':
4549
4550`include $(srcdir)/file'
4551 Include a fragment which is found relative to the current source
4552 directory.
4553
4554`include $(top_srcdir)/file'
4555 Include a fragment which is found relative to the top source
4556 directory.
4557
4558 Note that if a fragment is included inside a conditional, then the
4559condition applies to the entire contents of that fragment.
4560
4561 Makefile fragments included this way are always distributed because
4562there are needed to rebuild `Makefile.in'.
4563
4564
4565File: automake.info, Node: Conditionals, Next: Gnits, Prev: Include, Up: Top
4566
4567Conditionals
4568************
4569
4570Automake supports a simple type of conditionals.
4571
4572 Before using a conditional, you must define it by using
4573`AM_CONDITIONAL' in the `configure.in' file (*note Macros::).
4574
4575 - Macro: AM_CONDITIONAL (CONDITIONAL, CONDITION)
4576 The conditional name, CONDITIONAL, should be a simple string
4577 starting with a letter and containing only letters, digits, and
4578 underscores. It must be different from `TRUE' and `FALSE' which
4579 are reserved by Automake.
4580
4581 The shell CONDITION (suitable for use in a shell `if' statement)
4582 is evaluated when `configure' is run. Note that you must arrange
4583 for _every_ `AM_CONDITIONAL' to be invoked every time `configure'
4584 is run - if `AM_CONDITIONAL' is run conditionally (e.g., in a
4585 shell `if' statement), then the result will confuse automake.
4586
4587 Conditionals typically depend upon options which the user provides to
4588the `configure' script. Here is an example of how to write a
4589conditional which is true if the user uses the `--enable-debug' option.
4590
4591 AC_ARG_ENABLE(debug,
4592 [ --enable-debug Turn on debugging],
4593 [case "${enableval}" in
4594 yes) debug=true ;;
4595 no) debug=false ;;
4596 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
4597 esac],[debug=false])
4598 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
4599
4600 Here is an example of how to use that conditional in `Makefile.am':
4601
4602 if DEBUG
4603 DBG = debug
4604 else
4605 DBG =
4606 endif
4607 noinst_PROGRAMS = $(DBG)
4608
4609 This trivial example could also be handled using EXTRA_PROGRAMS
4610(*note Conditional Programs::).
4611
4612 You may only test a single variable in an `if' statement, possibly
4613negated using `!'. The `else' statement may be omitted. Conditionals
4614may be nested to any depth. You may specify an argument to `else' in
4615which case it must be the negation of the condition used for the
4616current `if'. Similarly you may specify the condition which is closed
4617by an `end':
4618
4619 if DEBUG
4620 DBG = debug
4621 else !DEBUG
4622 DBG =
4623 endif !DEBUG
4624
4625Unbalanced conditions are errors.
4626
4627 Note that conditionals in Automake are not the same as conditionals
4628in GNU Make. Automake conditionals are checked at configure time by the
4629`configure' script, and affect the translation from `Makefile.in' to
4630`Makefile'. They are based on options passed to `configure' and on
4631results that `configure' has discovered about the host system. GNU
4632Make conditionals are checked at `make' time, and are based on
4633variables passed to the make program or defined in the `Makefile'.
4634
4635 Automake conditionals will work with any make program.
4636
4637
4638File: automake.info, Node: Gnits, Next: Cygnus, Prev: Conditionals, Up: Top
4639
4640The effect of `--gnu' and `--gnits'
4641***********************************
4642
4643The `--gnu' option (or `gnu' in the `AUTOMAKE_OPTIONS' variable) causes
4644`automake' to check the following:
4645
4646 * The files `INSTALL', `NEWS', `README', `AUTHORS', and `ChangeLog',
4647 plus one of `COPYING.LIB', `COPYING.LESSER' or `COPYING', are
4648 required at the topmost directory of the package.
4649
4650 * The options `no-installman' and `no-installinfo' are prohibited.
4651
4652 Note that this option will be extended in the future to do even more
4653checking; it is advisable to be familiar with the precise requirements
4654of the GNU standards. Also, `--gnu' can require certain non-standard
4655GNU programs to exist for use by various maintainer-only targets; for
4656instance in the future `pathchk' might be required for `make dist'.
4657
4658 The `--gnits' option does everything that `--gnu' does, and checks
4659the following as well:
4660
4661 * `make installcheck' will check to make sure that the `--help' and
4662 `--version' really print a usage message and a version string,
4663 respectively. This is the `std-options' option (*note Options::).
4664
4665 * `make dist' will check to make sure the `NEWS' file has been
4666 updated to the current version.
4667
4668 * `VERSION' is checked to make sure its format complies with Gnits
4669 standards.
4670
4671 * If `VERSION' indicates that this is an alpha release, and the file
4672 `README-alpha' appears in the topmost directory of a package, then
4673 it is included in the distribution. This is done in `--gnits'
4674 mode, and no other, because this mode is the only one where version
4675 number formats are constrained, and hence the only mode where
4676 Automake can automatically determine whether `README-alpha' should
4677 be included.
4678
4679 * The file `THANKS' is required.
4680
4681
4682File: automake.info, Node: Cygnus, Next: Extending, Prev: Gnits, Up: Top
4683
4684The effect of `--cygnus'
4685************************
4686
4687Some packages, notably GNU GCC and GNU gdb, have a build environment
4688originally written at Cygnus Support (subsequently renamed Cygnus
4689Solutions, and then later purchased by Red Hat). Packages with this
4690ancestry are sometimes referred to as "Cygnus" trees.
4691
4692 A Cygnus tree has slightly different rules for how a `Makefile.in'
4693is to be constructed. Passing `--cygnus' to `automake' will cause any
4694generated `Makefile.in' to comply with Cygnus rules.
4695
4696 Here are the precise effects of `--cygnus':
4697
4698 * Info files are always created in the build directory, and not in
4699 the source directory.
4700
4701 * `texinfo.tex' is not required if a Texinfo source file is
4702 specified. The assumption is that the file will be supplied, but
4703 in a place that Automake cannot find. This assumption is an
4704 artifact of how Cygnus packages are typically bundled.
4705
4706 * `make dist' is not supported, and the rules for it are not
4707 generated. Cygnus-style trees use their own distribution
4708 mechanism.
4709
4710 * Certain tools will be searched for in the build tree as well as in
4711 the user's `PATH'. These tools are `runtest', `expect',
4712 `makeinfo' and `texi2dvi'.
4713
4714 * `--foreign' is implied.
4715
4716 * The options `no-installinfo' and `no-dependencies' are implied.
4717
4718 * The macros `AM_MAINTAINER_MODE' and `AM_CYGWIN32' are required.
4719
4720 * The `check' target doesn't depend on `all'.
4721
4722 GNU maintainers are advised to use `gnu' strictness in preference to
4723the special Cygnus mode. Some day, perhaps, the differences between
4724Cygnus trees and GNU trees will disappear (for instance, as GCC is made
4725more standards compliant). At that time the special Cygnus mode will be
4726removed.
4727
4728
4729File: automake.info, Node: Extending, Next: Distributing, Prev: Cygnus, Up: Top
4730
4731When Automake Isn't Enough
4732**************************
4733
4734Automake's implicit copying semantics means that many problems can be
4735worked around by simply adding some `make' targets and rules to
4736`Makefile.in'. Automake will ignore these additions.
4737
4738 There are some caveats to doing this. Although you can overload a
4739target already used by Automake, it is often inadvisable, particularly
4740in the topmost directory of a package with subdirectories. However,
4741various useful targets have a `-local' version you can specify in your
4742`Makefile.in'. Automake will supplement the standard target with these
4743user-supplied targets.
4744
4745 The targets that support a local version are `all', `info', `dvi',
4746`ps', `pdf', `check', `install-data', `install-exec', `uninstall',
4747`installdirs', `installcheck' and the various `clean' targets
4748(`mostlyclean', `clean', `distclean', and `maintainer-clean'). Note
4749that there are no `uninstall-exec-local' or `uninstall-data-local'
4750targets; just use `uninstall-local'. It doesn't make sense to
4751uninstall just data or just executables.
4752
4753 For instance, here is one way to install a file in `/etc':
4754
4755 install-data-local:
4756 $(INSTALL_DATA) $(srcdir)/afile $(DESTDIR)/etc/afile
4757
4758 Some targets also have a way to run another target, called a "hook",
4759after their work is done. The hook is named after the principal target,
4760with `-hook' appended. The targets allowing hooks are `install-data',
4761`install-exec', `uninstall', `dist', and `distcheck'.
4762
4763 For instance, here is how to create a hard link to an installed
4764program:
4765
4766 install-exec-hook:
4767 ln $(DESTDIR)$(bindir)/program$(EXEEXT) \
4768 $(DESTDIR)$(bindir)/proglink$(EXEEXT)
4769
4770 Although cheaper and more portable than symbolic links, hard links
4771will not work everywhere (for instance OS/2 does not have `ln').
4772Ideally you should fall back to `cp -p' when `ln' does not work. An
4773easy way, if symbolic links are acceptable to you, is to add
4774`AC_PROG_LN_S' to `configure.in' (*note Particular Program Checks:
4775(autoconf)Particular Programs.) and use `$(LN_S)' in `Makefile.am'.
4776
4777 For instance, here is how you could install a versioned copy of a
4778program using `$(LN_S)':
4779
4780 install-exec-hook:
4781 cd $(DESTDIR)$(bindir) && \
4782 mv -f prog$(EXEEXT) prog-$(VERSION)$(EXEEXT) && \
4783 $(LN_S) prog-$(VERSION)$(EXEEXT) prog$(EXEEXT)
4784
4785 Note that we rename the program so that a new version will erase the
4786symbolic link, not the real binary. Also we `cd' into the destination
4787directory in order to create relative links.
4788
4789
4790File: automake.info, Node: Distributing, Next: API versioning, Prev: Extending, Up: Top
4791
4792Distributing `Makefile.in's
4793***************************
4794
4795Automake places no restrictions on the distribution of the resulting
4796`Makefile.in's. We still encourage software authors to distribute
4797their work under terms like those of the GPL, but doing so is not
4798required to use Automake.
4799
4800 Some of the files that can be automatically installed via the
4801`--add-missing' switch do fall under the GPL. However, these also have
4802a special exception allowing you to distribute them with your package,
4803regardless of the licensing you choose.
4804
4805
4806File: automake.info, Node: API versioning, Next: FAQ, Prev: Distributing, Up: Top
4807
4808Automake API versioning
4809***********************
4810
4811New Automake releases usually include bug fixes and new features.
4812Unfortunately they may also introduce new bugs and incompatibilities.
4813This makes four reasons why a package may require a particular Automake
4814version.
4815
4816 Things get worse when maintaining a large tree of packages, each one
4817requiring a different version of Automake. In the past, this meant that
4818any developer (and sometime users) had to install several versions of
4819Automake in different places, and switch `$PATH' appropriately for each
4820package.
4821
4822 Starting with version 1.6, Automake installs versioned binaries.
4823This means you can install several versions of Automake in the same
4824`$prefix', and can select an arbitrary Automake version by running
4825`automake-1.6' or `automake-1.7' without juggling with `$PATH'.
4826Furthermore, `Makefile''s generated by Automake 1.6 will use
4827`automake-1.6' explicitly in their rebuild rules.
4828
4829 Note that `1.6' in `automake-1.6' is Automake's API version, not
4830Automake's version. If a bug fix release is made, for instance
4831Automake 1.6.1, the API version will remain 1.6. This means that a
4832package which work with Automake 1.6 should also work with 1.6.1; after
4833all, this is what people expect from bug fix releases.
4834
4835 Note that if your package relies on a feature or a bug fix
4836introduced in a release, you can pass this version as an option to
4837Automake to ensure older releases will not be used. For instance, use
4838this in your `configure.in':
4839
4840 AM_INIT_AUTOMAKE(1.6.1) dnl Require Automake 1.6.1 or better.
4841
4842or, in a particular `Makefile.am':
4843
4844 AUTOMAKE_OPTIONS = 1.6.1 # Require Automake 1.6.1 or better.
4845
4846Automake will print an error message if its version is older than the
4847requested version.
4848
4849What is in the API
4850==================
4851
4852Automake's programming interface is not easy to define. Basically it
4853should include at least all *documented* variables and targets that a
4854`Makefile.am' author can use, any behavior associated with them (e.g.
4855the places where `-hook''s are run), the command line interface of
4856`automake' and `aclocal', ...
4857
4858What is not in the API
4859======================
4860
4861Every undocumented variable, target, or command line option, is not part
4862of the API. You should avoid using them, as they could change from one
4863version to the other (even in bug fix releases, if this helps to fix a
4864bug).
4865
4866 If it turns out you need to use such a undocumented feature, contact
4867<automake@gnu.org> and try to get it documented and exercised by the
4868test-suite.
4869
4870
4871File: automake.info, Node: FAQ, Next: Macro and Variable Index, Prev: API versioning, Up: Top
4872
4873Frequently Asked Questions about Automake
4874*****************************************
4875
4876This chapter covers some questions that often come up on the mailing
4877lists.
4878
4879* Menu:
4880
4881* CVS:: CVS and generated files
4882* maintainer-mode:: missing and AM_MAINTAINER_MODE
4883* wildcards:: Why doesn't Automake support wildcards?
4884* distcleancheck:: Files left in build directory after distclean
4885* renamed objects:: Why are object files sometimes renamed?
4886
4887
4888File: automake.info, Node: CVS, Next: maintainer-mode, Prev: FAQ, Up: FAQ
4889
4890CVS and generated files
4891=======================
4892
4893Background: distributed generated files
4894---------------------------------------
4895
4896Packages made with Autoconf and Automake ship with some generated files
4897like `configure' or `Makefile.in'. These files were generated on the
4898developer's host and are distributed so that end-users do not have to
4899install the maintainer tools required to rebuild them. Other generated
4900files like Lex scanners, Yacc parsers, or Info documentation, are
4901usually distributed on similar grounds.
4902
4903 Automake outputs rules in `Makefile's to rebuild these files. For
4904instance `make' will run `autoconf' to rebuild `configure' whenever
4905`configure.in' is changed. This makes development safer by ensuring a
4906`configure' is never out-of-date with respect to `configure.in'.
4907
4908 As generated files shipped in packages are up-to-date, and because
4909`tar' preserves timestamps, these rebuild rules are not triggered when
4910a user unpacks and builds a package.
4911
4912Background: CVS and timestamps
4913------------------------------
4914
4915Unless you use CVS keywords (in which case files must be updated at
4916commit time), CVS preserves timestamps during `cvs commit' and `cvs
4917import -d' operations.
4918
4919 When you check out a file using `cvs checkout' its timestamp is set
4920to that of the revision which is being checked out.
4921
4922 However, during `cvs update', files will have the date of the
4923update, not the original timestamp of this revision. This is meant to
4924make sure that `make' notices sources files have been updated.
4925
4926 This timestamp shift is troublesome when both sources and generated
4927files are kept under CVS. Because CVS processes files in alphabetical
4928order, `configure.in' will appear older than `configure' after a `cvs
4929update' that updates both files, even if `configure' was newer than
4930`configure.in' when it was checked in. Calling `make' will then
4931trigger a spurious rebuild of `configure'.
4932
4933Living with CVS in Autoconfiscated projects
4934-------------------------------------------
4935
4936There are basically two clans amongst maintainers: those who keep all
4937distributed files under CVS, including generated files, and those who
4938keep generated files _out_ of CVS.
4939
4940All files in CVS
4941................
4942
4943 * The CVS repository contains all distributed files so you know
4944 exactly what is distributed, and you can checkout any prior
4945 version entirely.
4946
4947 * Maintainers can see how generated files evolve (for instance you
4948 can see what happens to your `Makefile.in's when you upgrade
4949 Automake and make sure they look OK).
4950
4951 * Users do not need the autotools to build a checkout of the
4952 project, it works just like a released tarball.
4953
4954 * If users use `cvs update' to update their copy, instead of `cvs
4955 checkout' to fetch a fresh one, timestamps will be inaccurate.
4956 Some rebuild rules will be triggered and attempt to run developer
4957 tools such as `autoconf' or `automake'.
4958
4959 Actually, calls to such tools are all wrapped into a call to the
4960 `missing' script discussed later (*note maintainer-mode::).
4961 `missing' will take care of fixing the timestamps when these tools
4962 are not installed, so that the build can continue.
4963
4964 * In distributed development, developers are likely to have different
4965 version of the maintainer tools installed. In this case rebuilds
4966 triggered by timestamp lossage will lead to spurious changes to
4967 generated files. There are several solutions to this:
4968
4969 * All developers should use the same versions, so that the
4970 rebuilt files are identical to files in CVS. (This starts to
4971 be difficult when each project you work on uses different
4972 versions.)
4973
4974 * Or people use a script to fix the timestamp after a checkout
4975 (the GCC folks have such a script).
4976
4977 * Or `configure.in' uses `AM_MAINTAINER_MODE', which will
4978 disable all these rebuild rules by default. This is further
4979 discussed in *Note maintainer-mode::.
4980
4981 * Although we focused on spurious rebuilds, the converse can also
4982 happen. CVS's timestamp handling can also let you think an
4983 out-of-date file is up-to-date.
4984
4985 For instance, suppose a developer has modified `Makefile.am' and
4986 rebuilt `Makefile.in', and then decide to do a last-minute change
4987 to `Makefile.am' right before checking in both files (without
4988 rebuilding `Makefile.in' to account for the change).
4989
4990 This last change to `Makefile.am' make the copy of `Makefile.in'
4991 out-of-date. Since CVS processes files alphabetically, when
4992 another developer `cvs update' his or her tree, `Makefile.in' will
4993 happen to be newer than `Makefile.am'. This other developer will
4994 not see `Makefile.in' is out-of-date.
4995
4996
4997Generated files out of CVS
4998..........................
4999
5000One way to get CVS and `make' working peacefully is to never store
5001generated files in CVS, i.e., do not CVS-control files which are
5002`Makefile' targets (or _derived_ files in Make terminology).
5003
5004 This way developers are not annoyed by changes to generated files.
5005It does not matter if they all have different versions (assuming they
5006are compatible, of course). And finally, timestamps are not lost,
5007changes to sources files can't be missed as in the
5008`Makefile.am'/`Makefile.in' example discussed earlier.
5009
5010 The drawback is that the CVS repository is not an exact copy of what
5011is distributed and that users now need to install various development
5012tools (maybe even specific versions) before they can build a checkout.
5013But, after all, CVS's job is versioning, not distribution.
5014
5015 Allowing developers to use different versions of their tools can also
5016hide bugs during distributed development. Indeed, developers will be
5017using (hence testing) their own generated files, instead of the
5018generated files that will be released actually. The developer who
5019prepares the tarball might be using a version of the tool that produces
5020bogus output (for instance a non-portable C file), something other
5021developers could have noticed if they weren't using their own versions
5022of this tool.
5023
5024Third-party files
5025-----------------
5026
5027Another class of files not discussed here (because they do not cause
5028timestamp issues) are files which are shipped with a package, but
5029maintained elsewhere. For instance tools like `gettextize' and
5030`autopoint' (from Gettext) or `libtoolize' (from Libtool), will install
5031or update files in your package.
5032
5033 These files, whether they are kept under CVS or not, raise similar
5034concerns about version mismatch between developers' tools. The Gettext
5035manual has a section about this, see *Note CVS Issues: (gettext)CVS
5036Issues.
5037
5038
5039File: automake.info, Node: maintainer-mode, Next: wildcards, Prev: CVS, Up: FAQ
5040
5041`missing' and `AM_MAINTAINER_MODE'
5042==================================
5043
5044`missing'
5045---------
5046
5047The `missing' script is a wrapper around several maintainer tools,
5048designed to warn users if a maintainer tool is required but missing.
5049Typical maintainer tools are `autoconf', `automake', `bison', etc.
5050Because file generated by these tools are shipped with the other
5051sources of a package, these tools shouldn't be required during a user
5052build and they are not checked for in `configure'.
5053
5054 However, if for some reason a rebuild rule is triggered and involves
5055a missing tool, `missing' will notice it and warn the user. Besides
5056the warning, when a tool is missing, `missing' will attempt to fix
5057timestamps in a way which allow the build to continue. For instance
5058`missing' will touch `configure' if `autoconf' is not installed. When
5059all distributed files are kept under CVS, this feature of `missing'
5060allows user _with no maintainer tools_ to build a package off CVS,
5061bypassing any timestamp inconsistency implied by `cvs update'.
5062
5063 If the required tool is installed, `missing' will run it and won't
5064attempt to continue after failures. This is correct during
5065development: developers love fixing failures. However, users with
5066wrong versions of maintainer tools may get an error when the rebuild
5067rule is spuriously triggered, halting the build. This failure to let
5068the build continue is one of the arguments of the `AM_MAINTAINER_MODE'
5069advocates.
5070
5071`AM_MAINTAINER_MODE'
5072--------------------
5073
5074`AM_MAINTAINER_MODE' disables the so called "rebuild rules" by default.
5075If you have `AM_MAINTAINER_MODE' in `configure.ac', and run
5076`./configure && make', then `make' will *never* attempt to rebuilt
5077`configure', `Makefile.in's, Lex or Yacc outputs, etc. I.e., this
5078disables build rules for files which are usually distributed and that
5079users should normally not have to update.
5080
5081 If you run `./configure --enable-maintainer-mode', then these
5082rebuild rules will be active.
5083
5084 People use `AM_MAINTAINER_MODE' either because they do want their
5085users (or themselves) annoyed by timestamps lossage (*note CVS::), or
5086because they simply can't stand the rebuild rules and prefer running
5087maintainer tools explicitly.
5088
5089 `AM_MAINTAINER_MODE' also allows you to disable some custom build
5090rules conditionally. Some developers use this feature to disable rules
5091that need exotic tools that users may not have available.
5092
5093 Several years ago Franc,ois Pinard pointed out several arguments
5094against `AM_MAINTAINER_MODE'. Most of them relate to insecurity. By
5095removing dependencies you get non-dependable builds: change to sources
5096files can have no effect on generated files and this can be very
5097confusing when unnoticed. He adds that security shouldn't be reserved
5098to maintainers (what `--enable-maintainer-mode' suggests), on the
5099contrary. If one user has to modify a `Makefile.am', then either
5100`Makefile.in' should be updated or a warning should be output (this is
5101what Automake uses `missing' for) but the last thing you want is that
5102nothing happens and the user doesn't notice it (this is what happens
5103when rebuild rules are disabled by `AM_MAINTAINER_MODE').
5104
5105 Jim Meyering, the inventor of the `AM_MAINTAINER_MODE' macro was
5106swayed by Franc,ois's arguments, and got rid of `AM_MAINTAINER_MODE' in
5107all of his packages.
5108
5109 Still many people continue to use `AM_MAINTAINER_MODE', because it
5110helps them working on projects where all files are kept under CVS, and
5111because `missing' isn't enough if you have the wrong version of the
5112tools.
5113
5114
5115File: automake.info, Node: wildcards, Next: distcleancheck, Prev: maintainer-mode, Up: FAQ
5116
5117Why doesn't Automake support wildcards?
5118=======================================
5119
5120Developers are lazy. They often would like to use wildcards in
5121`Makefile.am's, so they don't need to remember they have to update
5122`Makefile.am's every time they add, delete, or rename a file.
5123
5124 There are several objections to this:
5125 * When using CVS (or similar) developers need to remember they have
5126 to run `cvs add' or `cvs rm' anyway. Updating `Makefile.am'
5127 accordingly quickly becomes a reflex.
5128
5129 Conversely, if your application doesn't compile because you forgot
5130 to add a file in `Makefile.am', it will help you remember to `cvs
5131 add' it.
5132
5133 * Using wildcards makes easy to distribute files by mistake. For
5134 instance some code a developer is experimenting with (a test case,
5135 say) but which should not be part of the distribution.
5136
5137 * Using wildcards it's easy to omit some files by mistake. For
5138 instance one developer creates a new file, uses it at many places,
5139 but forget to commit it. Another developer then checkout the
5140 incomplete project and is able to run `make dist' successfully,
5141 even though a file is missing.
5142
5143 * Listing files, you control *exactly* what you distribute. If some
5144 file that should be distributed is missing from your tree, `make
5145 dist' will complain. Besides, you don't distribute more than what
5146 you listed.
5147
5148 * Finally it's really hard to `forget' adding a file to
5149 `Makefile.am', because if you don't add it, it doesn't get
5150 compiled nor installed, so you can't even test it.
5151
5152 Still, these are philosophical objections, and as such you may
5153disagree, or find enough value in wildcards to dismiss all of them.
5154Before you start writing a patch against Automake to teach it about
5155wildcards, let's see the main technical issue: portability.
5156
5157 Although `$(wildcard ...)' works with GNU `make', it is not portable
5158to other `make' implementations.
5159
5160 The only way Automake could support `$(wildcard ...)' is by
5161expending `$(wildcard ...)' when `automake' is run. Resulting
5162`Makefile.in's would be portable since they would list all files and
5163not use `$(wildcard ...)'. However that means developers need to
5164remember they must run `automake' each time they add, delete, or rename
5165files.
5166
5167 Compared to editing `Makefile.am', this is really little win. Sure,
5168it's easier and faster to type `automake; make' than to type `emacs
5169Makefile.am; make'. But nobody bothered enough to write a patch add
5170support for this syntax. Some people use scripts to generated file
5171lists in `Makefile.am' or in separate `Makefile' fragments.
5172
5173 Even if you don't care about portability, and are tempted to use
5174`$(wildcard ...)' anyway because you target only GNU Make, you should
5175know there are many places where Automake need to know exactly which
5176files should be processed. As Automake doesn't know how to expand
5177`$(wildcard ...)', you cannot use it in these places. `$(wildcard
5178...)' is a black box comparable to `AC_SUBST'ed variables as far
5179Automake is concerned.
5180
5181 You can get warnings about `$(wildcard ...') constructs using the
5182`-Wportability' flag.
5183
5184
5185File: automake.info, Node: distcleancheck, Next: renamed objects, Prev: wildcards, Up: FAQ
5186
5187Files left in build directory after distclean
5188=============================================
5189
5190This is a diagnostic you might encounter while running `make distcheck'.
5191
5192 As explained in *Note Dist::, `make distcheck' attempts to build and
5193check your package for errors like this one.
5194
5195 `make distcheck' will perform a `VPATH' build of your package, and
5196then call `make distclean'. Files left in the build directory after
5197`make distclean' has run are listed after this error.
5198
5199 This diagnostic really covers two kinds of errors:
5200
5201 * files that are forgotten by distclean;
5202
5203 * distributed files that are erroneously rebuilt.
5204
5205 The former left-over files are not distributed, so the fix is to mark
5206them for cleaning (*note Clean::), this is obvious and doesn't deserve
5207more explanations.
5208
5209 The latter bug is not always easy to understand and fix, so let's
5210proceed with an example. Suppose our package contains a program for
5211which we want to build a man page using `help2man'. GNU `help2man'
5212produces simple manual pages from the `--help' and `--version' output
5213of other commands (*note Overview: (help2man)Top.). Because we don't
5214to force want our users to install `help2man', we decide to distribute
5215the generated man page using the following setup.
5216
5217 # This Makefile.am is bogus.
5218 bin_PROGRAMS = foo
5219 foo_SOURCES = foo.c
5220 dist_man_MANS = foo.1
5221
5222 foo.1: foo$(EXEEXT)
5223 help2man --output=foo.1 ./foo$(EXEEXT)
5224
5225 This will effectively distribute the man page. However, `make
5226distcheck' will fail with:
5227
5228 ERROR: files left in build directory after distclean:
5229 ./foo.1
5230
5231 Why was `foo.1' rebuilt? Because although distributed, `foo.1'
5232depends on a non-distributed built file: `foo$(EXEEXT)'.
5233`foo$(EXEEXT)' is built by the user, so it will always appear to be
5234newer than the distributed `foo.1'.
5235
5236 `make distcheck' caught an inconsistency in our package. Our intent
5237was to distribute `foo.1' so users do not need installing `help2man',
5238however since this our rule causes this file to be always rebuilt,
5239users _do_ need `help2man'. Either we should ensure that `foo.1' is
5240not rebuilt by users, or there is no point in distributing `foo.1'.
5241
5242 More generally, the rule is that distributed files should never
5243depend on non-distributed built files. If you distribute something
5244generated, distribute its sources.
5245
5246 One way to fix the above example, while still distributing `foo.1'
5247is to not depend on `foo$(EXEEXT)'. For instance, assuming `foo
5248--version' and `foo --help' do not change unless `foo.c' or
5249`configure.ac' change, we could write the following `Makefile.am':
5250
5251 bin_PROGRAMS = foo
5252 foo_SOURCES = foo.c
5253 dist_man_MANS = foo.1
5254
5255 foo.1: foo.c $(top_srcdir)/configure.ac
5256 $(MAKE) $(AM_MAKEFLAGS) foo$(EXEEXT)
5257 help2man --output=foo.1 ./foo$(EXEEXT)
5258
5259 This way, `foo.1' will not get rebuilt every time `foo$(EXEEXT)'
5260changes. The `make' call makes sure `foo$(EXEEXT)' is up-to-date
5261before `help2man'. Another way to ensure this would be to use separate
5262directories for binaries and man pages, and set `SUBDIRS' so that
5263binaries are built before man pages.
5264
5265 We could also decide not to distribute `foo.1'. In this case it's
5266fine to have `foo.1' dependent upon `foo$(EXEEXT)', since both will
5267have to be rebuilt. However it would be impossible to build the
5268package in a cross-compilation, because building `foo.1' involves an
5269_execution_ of `foo$(EXEEXT)'.
5270
5271 Another context where such errors are common is when distributed
5272files are built by tools which are built by the package. The pattern
5273is similar:
5274
5275 distributed-file: built-tools distributed-sources
5276 build-command
5277
5278should be changed to
5279
5280 distributed-file: distributed-sources
5281 $(MAKE) $(AM_MAKEFLAGS) built-tools
5282 build-command
5283
5284or you could choose not to distribute `distributed-file', if
5285cross-compilation does not matter.
5286
5287 The points made through these examples are worth a summary:
5288
5289 * Distributed files should never depend upon non-distributed built
5290 files.
5291
5292 * Distributed files should be distributed will all their
5293 dependencies.
5294
5295 * If a file is _intended_ be rebuilt by users, there is no point in
5296 distributing it.
5297
5298 For desperate cases, it's always possible to disable this check by
5299setting `distcleancheck_listfiles' as documented in *Note Dist::. Make
5300sure you do understand the reason why `make distcheck' complains before
5301you do this. `distcleancheck_listfiles' is a way to _hide_ errors, not
5302to fix them. You can always do better.
5303
5304
5305File: automake.info, Node: renamed objects, Prev: distcleancheck, Up: FAQ
5306
5307Why are object files sometimes renamed?
5308=======================================
5309
5310This happens when per-target compilation flags are used. Object files
5311need to be renamed just in case they would clash with object files
5312compiled from the same sources, but with different flags. Consider the
5313following example.
5314
5315 bin_PROGRAMS = true false
5316 true_SOURCES = generic.c
5317 true_CPPFLAGS = -DEXIT_CODE=0
5318 false_SOURCES = generic.c
5319 false_CPPFLAGS = -DEXIT_CODE=1
5320
5321Obviously the two programs are built from the same source, but it would
5322be bad if they shared the same object, because `generic.o' cannot be
5323built with both `-DEXIT_CODE=0' *and* `-DEXIT_CODE=1'. Therefore
5324`automake' outputs rules to build two different objects:
5325`true-generic.o' and `false-generic.o'.
5326
5327 `automake' doesn't actually look whether sources files are shared to
5328decide if it must rename objects. It will just rename all objects of a
5329target as soon as it sees per-target compilation flags are used.
5330
5331 It's OK to share object files when per-target compilation flags are
5332not used. For instance `true' and `false' will both use `version.o' in
5333the following example.
5334
5335 AM_CPPFLAGS = -DVERSION=1.0
5336 bin_PROGRAMS = true false
5337 true_SOURCES = true.c version.c
5338 false_SOURCES = false.c version.c
5339
5340 Note that the renaming of objects is also affected by the
5341`_SHORTNAME' variable (*note Program and Library Variables::).
5342
5343
5344File: automake.info, Node: Macro and Variable Index, Next: General Index, Prev: FAQ, Up: Top
5345
5346Macro and Variable Index
5347************************
5348
5349* Menu:
5350
5351* _LDADD: Linking.
5352* _LDFLAGS: Linking.
5353* _LIBADD: A Library.
5354* _SOURCES: Program Sources.
5355* _TEXINFOS: Texinfo.
5356* AC_CANONICAL_HOST: Optional.
5357* AC_CANONICAL_SYSTEM: Optional.
5358* AC_CONFIG_AUX_DIR: Optional.
5359* AC_CONFIG_FILES: Requirements.
5360* AC_CONFIG_HEADERS: Optional.
5361* AC_DEFUN: Extending aclocal.
5362* AC_F77_LIBRARY_LDFLAGS: Optional.
5363* AC_LIBOBJ <1>: LTLIBOBJ.
5364* AC_LIBOBJ: Optional.
5365* AC_LIBSOURCE: Optional.
5366* AC_LIBSOURCES: Optional.
5367* AC_OUTPUT: Requirements.
5368* AC_PREREQ: Extending aclocal.
5369* AC_PROG_CXX: Optional.
5370* AC_PROG_F77: Optional.
5371* AC_PROG_LEX: Optional.
5372* AC_PROG_LIBTOOL: Optional.
5373* AC_PROG_RANLIB: Optional.
5374* AC_PROG_YACC: Optional.
5375* AC_SUBST: Optional.
5376* ACLOCAL_AMFLAGS: Rebuilding.
5377* AM_C_PROTOTYPES <1>: ANSI.
5378* AM_C_PROTOTYPES <2>: Public macros.
5379* AM_C_PROTOTYPES: Optional.
5380* AM_CFLAGS: Program variables.
5381* AM_CONDITIONAL: Conditionals.
5382* AM_CONFIG_HEADER: Public macros.
5383* AM_CPPFLAGS: Program variables.
5384* am_cv_sys_posix_termios: Public macros.
5385* AM_CXXFLAGS: C++ Support.
5386* AM_ETAGSFLAGS: Tags.
5387* AM_FFLAGS: Fortran 77 Support.
5388* AM_GCJFLAGS: Java Support.
5389* AM_GNU_GETTEXT: Optional.
5390* AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL: Public macros.
5391* AM_INIT_AUTOMAKE: Requirements.
5392* AM_INSTALLCHECK_STD_OPTIONS_EXEMPT: Options.
5393* AM_JAVACFLAGS: Java.
5394* AM_LDFLAGS <1>: Program variables.
5395* AM_LDFLAGS: Linking.
5396* AM_MAINTAINER_MODE <1>: maintainer-mode.
5397* AM_MAINTAINER_MODE: Optional.
5398* AM_MAKEINFOFLAGS: Texinfo.
5399* AM_PATH_LISPDIR: Public macros.
5400* AM_PROG_GCJ: Public macros.
5401* AM_RFLAGS: Fortran 77 Support.
5402* AM_RUNTESTFLAGS: Tests.
5403* AUTOCONF: Invoking Automake.
5404* AUTOMAKE_OPTIONS <1>: Options.
5405* AUTOMAKE_OPTIONS <2>: Dependencies.
5406* AUTOMAKE_OPTIONS: ANSI.
5407* bin_PROGRAMS: Program Sources.
5408* bin_SCRIPTS: Scripts.
5409* build_alias: Optional.
5410* BUILT_SOURCES: Sources.
5411* CC: Program variables.
5412* CCAS: Assembly Support.
5413* CCASFLAGS: Assembly Support.
5414* CFLAGS: Program variables.
5415* check_LTLIBRARIES: Libtool Convenience Libraries.
5416* check_PROGRAMS: Program Sources.
5417* check_SCRIPTS: Scripts.
5418* CLASSPATH_ENV: Java.
5419* CLEANFILES: Clean.
5420* COMPILE: Program variables.
5421* CPPFLAGS: Program variables.
5422* CXX: C++ Support.
5423* CXXCOMPILE: C++ Support.
5424* CXXFLAGS: C++ Support.
5425* CXXLINK: C++ Support.
5426* DATA <1>: Data.
5427* DATA: Uniform.
5428* data_DATA: Data.
5429* DEFS: Program variables.
5430* DEJATOOL: Tests.
5431* DESTDIR: Install.
5432* dist_: Dist.
5433* dist_lisp_LISP: Emacs Lisp.
5434* dist_noinst_LISP: Emacs Lisp.
5435* DIST_SUBDIRS <1>: Dist.
5436* DIST_SUBDIRS: Top level.
5437* DISTCHECK_CONFIGURE_FLAGS: Dist.
5438* distcleancheck_listfiles <1>: distcleancheck.
5439* distcleancheck_listfiles: Dist.
5440* DISTCLEANFILES: Clean.
5441* distuninstallcheck_listfiles: Dist.
5442* ELCFILES: Emacs Lisp.
5443* ETAGS_ARGS: Tags.
5444* ETAGSFLAGS: Tags.
5445* EXPECT: Tests.
5446* EXTRA_DIST: Dist.
5447* EXTRA_PROGRAMS: Conditional Programs.
5448* F77: Fortran 77 Support.
5449* F77COMPILE: Fortran 77 Support.
5450* FFLAGS: Fortran 77 Support.
5451* FLINK: Fortran 77 Support.
5452* GCJFLAGS: Java Support.
5453* GTAGS_ARGS: Tags.
5454* HEADERS <1>: Headers.
5455* HEADERS: Uniform.
5456* host_alias: Optional.
5457* host_triplet: Optional.
5458* include_HEADERS: Headers.
5459* INCLUDES: Program variables.
5460* info_TEXINFOS: Texinfo.
5461* JAVA: Uniform.
5462* JAVAC: Java.
5463* JAVACFLAGS: Java.
5464* JAVAROOT: Java.
5465* LDADD: Linking.
5466* LDFLAGS: Program variables.
5467* lib_LIBRARIES: A Library.
5468* lib_LTLIBRARIES: Libtool Libraries.
5469* LIBADD: A Library.
5470* libexec_PROGRAMS: Program Sources.
5471* libexec_SCRIPTS: Scripts.
5472* LIBOBJS <1>: LTLIBOBJ.
5473* LIBOBJS: Optional.
5474* LIBRARIES: Uniform.
5475* LIBS: Program variables.
5476* LINK: Program variables.
5477* LISP <1>: Emacs Lisp.
5478* LISP: Uniform.
5479* lisp_LISP: Emacs Lisp.
5480* localstate_DATA: Data.
5481* LTLIBOBJS: LTLIBOBJ.
5482* MAINTAINERCLEANFILES: Clean.
5483* MAKE: Top level.
5484* MAKEFLAGS: Top level.
5485* MAKEINFO: Texinfo.
5486* MAKEINFOFLAGS: Texinfo.
5487* man_MANS: Man pages.
5488* MANS <1>: Man pages.
5489* MANS: Uniform.
5490* MOSTLYCLEANFILES: Clean.
5491* nodist_: Dist.
5492* noinst_HEADERS: Headers.
5493* noinst_LIBRARIES: A Library.
5494* noinst_LISP: Emacs Lisp.
5495* noinst_LTLIBRARIES: Libtool Convenience Libraries.
5496* noinst_PROGRAMS: Program Sources.
5497* noinst_SCRIPTS: Scripts.
5498* oldinclude_HEADERS: Headers.
5499* PACKAGE: Dist.
5500* PACKAGE, directory: Uniform.
5501* PACKAGE, prevent definition: Public macros.
5502* pkgdata_DATA: Data.
5503* pkgdata_SCRIPTS: Scripts.
5504* pkgdatadir: Uniform.
5505* pkginclude_HEADERS: Headers.
5506* pkgincludedir: Uniform.
5507* pkglib_LIBRARIES: A Library.
5508* pkglib_LTLIBRARIES: Libtool Libraries.
5509* pkglib_PROGRAMS: Program Sources.
5510* pkglibdir: Uniform.
5511* pkgpyexecdir: Python.
5512* pkgpythondir: Python.
5513* PROGRAMS: Uniform.
5514* pyexecdir: Python.
5515* PYTHON <1>: Python.
5516* PYTHON: Uniform.
5517* PYTHON_EXEC_PREFIX: Python.
5518* PYTHON_PLATFORM: Python.
5519* PYTHON_PREFIX: Python.
5520* PYTHON_VERSION: Python.
5521* pythondir: Python.
5522* RFLAGS: Fortran 77 Support.
5523* RUNTEST: Tests.
5524* RUNTESTDEFAULTFLAGS: Tests.
5525* RUNTESTFLAGS: Tests.
5526* sbin_PROGRAMS: Program Sources.
5527* sbin_SCRIPTS: Scripts.
5528* SCRIPTS <1>: Scripts.
5529* SCRIPTS: Uniform.
5530* sharedstate_DATA: Data.
5531* SOURCES: Program Sources.
5532* SUBDIRS: Top level.
5533* SUFFIXES: Suffixes.
5534* sysconf_DATA: Data.
5535* TAGS_DEPENDENCIES: Tags.
5536* target_alias: Optional.
5537* TESTS: Tests.
5538* TESTS_ENVIRONMENT: Tests.
5539* TEXINFO_TEX: Texinfo.
5540* TEXINFOS <1>: Texinfo.
5541* TEXINFOS: Uniform.
5542* VERSION: Dist.
5543* VERSION, prevent definition: Public macros.
5544* WARNINGS: Invoking Automake.
5545* WITH_DMALLOC: Public macros.
5546* WITH_REGEX: Public macros.
5547* XFAIL_TESTS: Tests.
5548* YACC: Optional.
5549
5550
5551File: automake.info, Node: General Index, Prev: Macro and Variable Index, Up: Top
5552
5553General Index
5554*************
5555
5556* Menu:
5557
5558* ## (special Automake comment): General Operation.
5559* --acdir: aclocal options.
5560* --add-missing: Invoking Automake.
5561* --copy: Invoking Automake.
5562* --cygnus: Invoking Automake.
5563* --enable-maintainer-mode: Optional.
5564* --force-missing: Invoking Automake.
5565* --foreign: Invoking Automake.
5566* --gnits: Invoking Automake.
5567* --gnu: Invoking Automake.
5568* --help <1>: aclocal options.
5569* --help: Invoking Automake.
5570* --include-deps: Invoking Automake.
5571* --libdir: Invoking Automake.
5572* --no-force: Invoking Automake.
5573* --output: aclocal options.
5574* --output-dir: Invoking Automake.
5575* --print-ac-dir: aclocal options.
5576* --verbose <1>: aclocal options.
5577* --verbose: Invoking Automake.
5578* --version <1>: aclocal options.
5579* --version: Invoking Automake.
5580* --warnings: Invoking Automake.
5581* --with-dmalloc: Public macros.
5582* --with-regex: Public macros.
5583* -a: Invoking Automake.
5584* -c: Invoking Automake.
5585* -enable-debug, example: Conditionals.
5586* -f: Invoking Automake.
5587* -gnits, complete description: Gnits.
5588* -gnu, complete description: Gnits.
5589* -gnu, required files: Gnits.
5590* -hook targets: Extending.
5591* -I: aclocal options.
5592* -i: Invoking Automake.
5593* -local targets: Extending.
5594* -module, libtool: Libtool Modules.
5595* -o: Invoking Automake.
5596* -v: Invoking Automake.
5597* -W: Invoking Automake.
5598* .la suffix, defined: Libtool Concept.
5599* _DATA primary, defined: Data.
5600* _DEPENDENCIES, defined: Linking.
5601* _HEADERS primary, defined: Headers.
5602* _JAVA primary, defined: Java.
5603* _LDFLAGS, defined: Linking.
5604* _LDFLAGS, libtool: Libtool Flags.
5605* _LIBADD primary, defined: A Library.
5606* _LIBADD, libtool: Libtool Flags.
5607* _LIBRARIES primary, defined: A Library.
5608* _LISP primary, defined: Emacs Lisp.
5609* _LTLIBRARIES primary, defined: Libtool Libraries.
5610* _MANS primary, defined: Man pages.
5611* _PROGRAMS primary variable: Uniform.
5612* _PYTHON primary, defined: Python.
5613* _SCRIPTS primary, defined: Scripts.
5614* _SOURCES and header files: Program Sources.
5615* _SOURCES primary, defined: Program Sources.
5616* _TEXINFOS primary, defined: Texinfo.
5617* AC_SUBST and SUBDIRS: Top level.
5618* acinclude.m4, defined: Complete.
5619* aclocal program, introduction: Complete.
5620* aclocal search path: Macro search path.
5621* aclocal, extending: Extending aclocal.
5622* aclocal, Invoking: Invoking aclocal.
5623* aclocal, Options: aclocal options.
5624* aclocal.m4, preexisting: Complete.
5625* Adding new SUFFIXES: Suffixes.
5626* all: Extending.
5627* all-local: Extending.
5628* ALLOCA, special handling: LIBOBJS.
5629* AM_CONDITIONAL and SUBDIRS: Top level.
5630* AM_INIT_AUTOMAKE, example use: Complete.
5631* AM_MAINTAINER_MODE, purpose: maintainer-mode.
5632* ansi2knr: ANSI.
5633* ansi2knr and LIBOBJS: ANSI.
5634* ansi2knr and LTLIBOBJS: ANSI.
5635* Append operator: General Operation.
5636* autogen.sh and autoreconf: Libtool Issues.
5637* Automake constraints: Introduction.
5638* Automake options: Invoking Automake.
5639* Automake requirements <1>: Requirements.
5640* Automake requirements: Introduction.
5641* Automake, invoking: Invoking Automake.
5642* Automake, recursive operation: General Operation.
5643* Automatic dependency tracking: Dependencies.
5644* Automatic linker selection: How the Linker is Chosen.
5645* autoreconf and libtoolize: Libtool Issues.
5646* Auxiliary programs: Auxiliary Programs.
5647* Avoiding path stripping: Alternative.
5648* bootstrap.sh and autoreconf: Libtool Issues.
5649* BUGS, reporting: Introduction.
5650* BUILT_SOURCES, defined: Sources.
5651* C++ support: C++ Support.
5652* canonicalizing Automake variables: Canonicalization.
5653* cfortran: Mixing Fortran 77 With C and C++.
5654* check: Extending.
5655* check primary prefix, definition: Uniform.
5656* check-local: Extending.
5657* clean: Extending.
5658* clean-local: Extending.
5659* Comment, special to Automake: General Operation.
5660* Complete example: Complete.
5661* Conditional example, -enable-debug: Conditionals.
5662* conditional libtool libraries: Conditional Libtool Libraries.
5663* Conditional programs: Conditional Programs.
5664* Conditional subdirectories: Top level.
5665* Conditional SUBDIRS: Top level.
5666* Conditionals: Conditionals.
5667* config.guess: Invoking Automake.
5668* configure.in, from GNU Hello: Hello.
5669* configure.in, scanning: configure.
5670* Constraints of Automake: Introduction.
5671* convenience libraries, libtool: Libtool Convenience Libraries.
5672* cpio example: Uniform.
5673* CVS and generated files: CVS.
5674* CVS and third-party files: CVS.
5675* CVS and timestamps: CVS.
5676* cvs-dist: General Operation.
5677* cvs-dist, non-standard example: General Operation.
5678* Cygnus strictness: Cygnus.
5679* DATA primary, defined: Data.
5680* de-ANSI-fication, defined: ANSI.
5681* dejagnu: Tests.
5682* depcomp: Dependencies.
5683* dependencies and distributed files: distcleancheck.
5684* Dependency tracking: Dependencies.
5685* Dependency tracking, disabling: Dependencies.
5686* dirlist: Macro search path.
5687* Disabling dependency tracking: Dependencies.
5688* dist: Dist.
5689* dist-bzip2: Options.
5690* dist-gzip: Dist.
5691* dist-hook <1>: Extending.
5692* dist-hook: Dist.
5693* dist-shar: Options.
5694* dist-tarZ: Options.
5695* dist-zip: Options.
5696* dist_ and nobase_: Alternative.
5697* DIST_SUBDIRS, explained: Top level.
5698* distcheck: Dist.
5699* distclean <1>: distcleancheck.
5700* distclean: Extending.
5701* distclean, diagnostic: distcleancheck.
5702* distclean-local: Extending.
5703* distcleancheck <1>: distcleancheck.
5704* distcleancheck: Dist.
5705* dmalloc, support for: Public macros.
5706* dvi: Extending.
5707* dvi-local: Extending.
5708* E-mail, bug reports: Introduction.
5709* EDITION Texinfo flag: Texinfo.
5710* else: Conditionals.
5711* endif: Conditionals.
5712* Example conditional -enable-debug: Conditionals.
5713* Example of recursive operation: General Operation.
5714* Example of shared libraries: Libtool Libraries.
5715* Example, EXTRA_PROGRAMS: Uniform.
5716* Example, false and true: true.
5717* Example, GNU Hello: Hello.
5718* Example, handling Texinfo files: Hello.
5719* Example, mixed language: Mixing Fortran 77 With C and C++.
5720* Example, regression test: Hello.
5721* Executable extension: EXEEXT.
5722* Exit status 77, special interpretation: Tests.
5723* Expected test failure: Tests.
5724* Extending aclocal: Extending aclocal.
5725* Extending list of installation directories: Uniform.
5726* Extension, executable: EXEEXT.
5727* Extra files distributed with Automake: Invoking Automake.
5728* EXTRA_, prepending: Uniform.
5729* EXTRA_prog_SOURCES, defined: Conditional Sources.
5730* EXTRA_PROGRAMS, defined <1>: Conditional Programs.
5731* EXTRA_PROGRAMS, defined: Uniform.
5732* false Example: true.
5733* Files distributed with Automake: Invoking Automake.
5734* First line of Makefile.am: General Operation.
5735* FLIBS, defined: Mixing Fortran 77 With C and C++.
5736* foreign strictness: Strictness.
5737* Fortran 77 support: Fortran 77 Support.
5738* Fortran 77, mixing with C and C++: Mixing Fortran 77 With C and C++.
5739* Fortran 77, Preprocessing: Preprocessing Fortran 77.
5740* generated files and CVS: CVS.
5741* generated files, distributed: CVS.
5742* Gettext support: gettext.
5743* gnits strictness: Strictness.
5744* GNU Gettext support: gettext.
5745* GNU Hello, configure.in: Hello.
5746* GNU Hello, example: Hello.
5747* GNU make extensions: General Operation.
5748* GNU Makefile standards: Introduction.
5749* gnu strictness: Strictness.
5750* Header files in _SOURCES: Program Sources.
5751* HEADERS primary, defined: Headers.
5752* HEADERS, installation directories: Headers.
5753* Hello example: Hello.
5754* Hello, configure.in: Hello.
5755* hook targets: Extending.
5756* HP-UX 10, lex problems: Public macros.
5757* HTML support, example: Uniform.
5758* id: Tags.
5759* if: Conditionals.
5760* include: Include.
5761* INCLUDES, example usage: Hello.
5762* Including Makefile fragment: Include.
5763* info <1>: Extending.
5764* info: Options.
5765* info-local: Extending.
5766* install <1>: Extending.
5767* install: Install.
5768* Install hook: Install.
5769* Install, two parts of: Install.
5770* install-data: Install.
5771* install-data-hook: Extending.
5772* install-data-local <1>: Extending.
5773* install-data-local: Install.
5774* install-exec <1>: Extending.
5775* install-exec: Install.
5776* install-exec-hook: Extending.
5777* install-exec-local <1>: Extending.
5778* install-exec-local: Install.
5779* install-info <1>: Options.
5780* install-info: Texinfo.
5781* install-info target: Texinfo.
5782* install-man <1>: Options.
5783* install-man: Man pages.
5784* install-man target: Man pages.
5785* install-strip: Install.
5786* Installation directories, extending list: Uniform.
5787* Installation support: Install.
5788* installcheck: Extending.
5789* installcheck-local: Extending.
5790* installdirs <1>: Extending.
5791* installdirs: Install.
5792* installdirs-local: Extending.
5793* Installing headers: Headers.
5794* Installing scripts: Scripts.
5795* installing versioned binaries: Extending.
5796* Invoking aclocal: Invoking aclocal.
5797* Invoking Automake: Invoking Automake.
5798* JAVA primary, defined: Java.
5799* JAVA restrictions: Java.
5800* Java support: Java Support.
5801* lex problems with HP-UX 10: Public macros.
5802* lex, multiple lexers: Yacc and Lex.
5803* LIBADD primary, defined: A Library.
5804* libltdl, introduction: Libtool Concept.
5805* LIBOBJS and ansi2knr: ANSI.
5806* LIBOBJS, special handling: LIBOBJS.
5807* LIBRARIES primary, defined: A Library.
5808* libtool convenience libraries: Libtool Convenience Libraries.
5809* libtool libraries, conditional: Conditional Libtool Libraries.
5810* libtool library, definition: Libtool Concept.
5811* libtool modules: Libtool Modules.
5812* libtool, introduction: Libtool Concept.
5813* libtoolize and autoreconf: Libtool Issues.
5814* libtoolize, no longer run by Automake: Libtool Issues.
5815* Linking Fortran 77 with C and C++: Mixing Fortran 77 With C and C++.
5816* LISP primary, defined: Emacs Lisp.
5817* LN_S example: Extending.
5818* local targets: Extending.
5819* LTLIBOBJS and ansi2knr: ANSI.
5820* LTLIBOBJS, special handling: LTLIBOBJ.
5821* LTLIBRARIES primary, defined: Libtool Libraries.
5822* ltmain.sh not found: Libtool Issues.
5823* Macro search path: Macro search path.
5824* Macros Automake recognizes: Optional.
5825* make check: Tests.
5826* make clean support: Clean.
5827* make dist: Dist.
5828* make distcheck: Dist.
5829* make distcleancheck: Dist.
5830* make distuninstallcheck: Dist.
5831* make install support: Install.
5832* make installcheck: Options.
5833* Make targets, overriding: General Operation.
5834* Makefile fragment, including: Include.
5835* Makefile.am, first line: General Operation.
5836* MANS primary, defined: Man pages.
5837* mdate-sh: Texinfo.
5838* missing, purpose: maintainer-mode.
5839* Mixed language example: Mixing Fortran 77 With C and C++.
5840* Mixing Fortran 77 with C and C++: Mixing Fortran 77 With C and C++.
5841* Mixing Fortran 77 with C and/or C++: Mixing Fortran 77 With C and C++.
5842* modules, libtool: Libtool Modules.
5843* mostlyclean: Extending.
5844* mostlyclean-local: Extending.
5845* Multiple configure.in files: Invoking Automake.
5846* Multiple lex lexers: Yacc and Lex.
5847* Multiple yacc parsers: Yacc and Lex.
5848* no-dependencies: Dependencies.
5849* no-installinfo: Texinfo.
5850* no-installman: Man pages.
5851* no-texinfo.tex: Texinfo.
5852* nobase_: Alternative.
5853* nobase_ and dist_ or nodist_: Alternative.
5854* nodist_ and nobase_: Alternative.
5855* noinst primary prefix, definition: Uniform.
5856* noinstall-info target: Texinfo.
5857* noinstall-man target: Man pages.
5858* Non-GNU packages: Strictness.
5859* Non-standard targets: General Operation.
5860* Objects in subdirectory: Program and Library Variables.
5861* Option, ansi2knr: Options.
5862* Option, check-news: Options.
5863* Option, cygnus: Options.
5864* Option, dejagnu: Options.
5865* Option, dist-bzip2: Options.
5866* Option, dist-shar: Options.
5867* Option, dist-tarZ: Options.
5868* Option, dist-zip: Options.
5869* Option, foreign: Options.
5870* Option, gnits: Options.
5871* Option, gnu: Options.
5872* Option, no-define: Options.
5873* Option, no-dependencies: Options.
5874* Option, no-exeext: Options.
5875* Option, no-installinfo: Options.
5876* Option, no-installman: Options.
5877* Option, no-texinfo: Options.
5878* Option, nostdinc: Options.
5879* Option, readme-alpha: Options.
5880* Option, version: Options.
5881* Option, warnings: Options.
5882* Options, aclocal: aclocal options.
5883* Options, Automake: Invoking Automake.
5884* Options, std-options: Options.
5885* Overriding make targets: General Operation.
5886* Overriding make variables: General Operation.
5887* Path stripping, avoiding: Alternative.
5888* pdf: Extending.
5889* pdf-local: Extending.
5890* per-target compilation flags, defined: Program and Library Variables.
5891* pkgdatadir, defined: Uniform.
5892* pkgincludedir, defined: Uniform.
5893* pkglibdir, defined: Uniform.
5894* POSIX termios headers: Public macros.
5895* Preprocessing Fortran 77: Preprocessing Fortran 77.
5896* Primary variable, DATA: Data.
5897* Primary variable, defined: Uniform.
5898* Primary variable, HEADERS: Headers.
5899* Primary variable, JAVA: Java.
5900* Primary variable, LIBADD: A Library.
5901* Primary variable, LIBRARIES: A Library.
5902* Primary variable, LISP: Emacs Lisp.
5903* Primary variable, LTLIBRARIES: Libtool Libraries.
5904* Primary variable, MANS: Man pages.
5905* Primary variable, PROGRAMS: Uniform.
5906* Primary variable, PYTHON: Python.
5907* Primary variable, SCRIPTS: Scripts.
5908* Primary variable, SOURCES: Program Sources.
5909* Primary variable, TEXINFOS: Texinfo.
5910* prog_LDADD, defined: Linking.
5911* PROGRAMS primary variable: Uniform.
5912* Programs, auxiliary: Auxiliary Programs.
5913* PROGRAMS, bindir: Program Sources.
5914* Programs, conditional: Conditional Programs.
5915* ps: Extending.
5916* ps-local: Extending.
5917* PYTHON primary, defined: Python.
5918* Ratfor programs: Preprocessing Fortran 77.
5919* README-alpha: Gnits.
5920* rebuild rules: CVS.
5921* Recognized macros by Automake: Optional.
5922* Recursive operation of Automake: General Operation.
5923* regex package: Public macros.
5924* Regression test example: Hello.
5925* Reporting BUGS: Introduction.
5926* Requirements of Automake: Requirements.
5927* Requirements, Automake: Introduction.
5928* Restrictions for JAVA: Java.
5929* rx package: Public macros.
5930* Scanning configure.in: configure.
5931* SCRIPTS primary, defined: Scripts.
5932* SCRIPTS, installation directories: Scripts.
5933* Selecting the linker automatically: How the Linker is Chosen.
5934* Shared libraries, support for: A Shared Library.
5935* site.exp: Tests.
5936* SOURCES primary, defined: Program Sources.
5937* Special Automake comment: General Operation.
5938* Strictness, command line: Invoking Automake.
5939* Strictness, defined: Strictness.
5940* Strictness, foreign: Strictness.
5941* Strictness, gnits: Strictness.
5942* Strictness, gnu: Strictness.
5943* Subdirectories, building conditionally: Top level.
5944* Subdirectory, objects in: Program and Library Variables.
5945* SUBDIRS and AC_SUBST: Top level.
5946* SUBDIRS and AM_CONDITIONAL: Top level.
5947* SUBDIRS, conditional: Top level.
5948* SUBDIRS, explained: Top level.
5949* suffix .la, defined: Libtool Concept.
5950* suffix .lo, defined: Libtool Concept.
5951* SUFFIXES, adding: Suffixes.
5952* Support for C++: C++ Support.
5953* Support for Fortran 77: Fortran 77 Support.
5954* Support for GNU Gettext: gettext.
5955* Support for Java: Java Support.
5956* tags: Tags.
5957* TAGS support: Tags.
5958* Target, install-info: Texinfo.
5959* Target, install-man: Man pages.
5960* Target, noinstall-info: Texinfo.
5961* Target, noinstall-man: Man pages.
5962* termios POSIX headers: Public macros.
5963* Test suites: Tests.
5964* Tests, expected failure: Tests.
5965* Texinfo file handling example: Hello.
5966* Texinfo flag, EDITION: Texinfo.
5967* Texinfo flag, UPDATED: Texinfo.
5968* Texinfo flag, UPDATED-MONTH: Texinfo.
5969* Texinfo flag, VERSION: Texinfo.
5970* texinfo.tex: Texinfo.
5971* TEXINFOS primary, defined: Texinfo.
5972* third-party files and CVS: CVS.
5973* timestamps and CVS: CVS.
5974* true Example: true.
5975* underquoted AC_DEFUN: Extending aclocal.
5976* Uniform naming scheme: Uniform.
5977* uninstall <1>: Extending.
5978* uninstall: Install.
5979* uninstall-hook: Extending.
5980* uninstall-local: Extending.
5981* UPDATED Texinfo flag: Texinfo.
5982* UPDATED-MONTH Texinfo flag: Texinfo.
5983* user variables: User Variables.
5984* Variables, overriding: General Operation.
5985* variables, reserved for the user: User Variables.
5986* VERSION Texinfo flag: Texinfo.
5987* versioned binaries, installing: Extending.
5988* wildcards: wildcards.
5989* Windows: EXEEXT.
5990* yacc, multiple parsers: Yacc and Lex.
5991* ylwrap: Yacc and Lex.
5992* zardoz example: Complete.
5993
5994
5995
5996Tag Table:
5997Node: Top1157
5998Node: Introduction3023
5999Ref: Introduction-Footnote-14486
6000Ref: Introduction-Footnote-24635
6001Node: Generalities4836
6002Node: General Operation5440
6003Node: Strictness8115
6004Node: Uniform9851
6005Node: Canonicalization13666
6006Node: User Variables14691
6007Node: Auxiliary Programs15925
6008Node: Examples18264
6009Node: Complete18588
6010Node: Hello20586
6011Node: true23408
6012Node: Invoking Automake26155
6013Node: configure32758
6014Node: Requirements33802
6015Node: Optional34730
6016Node: Invoking aclocal40081
6017Node: aclocal options41690
6018Node: Macro search path42662
6019Node: Macros46829
6020Node: Public macros47309
6021Node: Private macros54228
6022Node: Extending aclocal55620
6023Node: Top level58550
6024Ref: Top level-Footnote-163926
6025Node: Alternative64068
6026Ref: Alternative-Footnote-165436
6027Node: Rebuilding65561
6028Node: Programs66326
6029Node: A Program67367
6030Node: Program Sources68097
6031Node: Linking70063
6032Node: Conditional Sources72359
6033Node: Conditional Programs75086
6034Node: A Library76890
6035Node: A Shared Library78159
6036Node: Libtool Concept79120
6037Node: Libtool Libraries81184
6038Node: Conditional Libtool Libraries81853
6039Node: Conditional Libtool Sources84207
6040Node: Libtool Convenience Libraries85541
6041Node: Libtool Modules87344
6042Node: Libtool Flags87902
6043Node: LTLIBOBJ88403
6044Node: Libtool Issues88901
6045Node: Program and Library Variables91738
6046Ref: Program and Library Variables-Footnote-1100770
6047Node: LIBOBJS100853
6048Node: Program variables101512
6049Node: Yacc and Lex103826
6050Node: C++ Support108761
6051Node: Assembly Support109592
6052Node: Fortran 77 Support110364
6053Ref: Fortran 77 Support-Footnote-1111943
6054Node: Preprocessing Fortran 77112146
6055Node: Compiling Fortran 77 Files112736
6056Node: Mixing Fortran 77 With C and C++113295
6057Ref: Mixing Fortran 77 With C and C++-Footnote-1115656
6058Node: How the Linker is Chosen115959
6059Node: Fortran 77 and Autoconf118504
6060Node: Java Support118919
6061Node: Support for Other Languages120121
6062Node: ANSI120674
6063Node: Dependencies123099
6064Ref: Dependencies-Footnote-1124818
6065Node: EXEEXT124984
6066Node: Other objects127177
6067Node: Scripts127766
6068Node: Headers128850
6069Ref: Headers-Footnote-1129551
6070Node: Data129784
6071Node: Sources130433
6072Node: Built sources example133197
6073Node: Other GNU Tools139623
6074Node: Emacs Lisp140108
6075Node: gettext141358
6076Node: Libtool141855
6077Node: Java142100
6078Node: Python143729
6079Node: Documentation146900
6080Node: Texinfo147198
6081Node: Man pages150864
6082Node: Install153151
6083Node: Clean157517
6084Node: Dist158867
6085Node: Tests166262
6086Node: Options169865
6087Node: Miscellaneous176112
6088Node: Tags176496
6089Node: Suffixes178505
6090Node: Multilibs180057
6091Node: Include180682
6092Node: Conditionals181570
6093Node: Gnits184273
6094Node: Cygnus186132
6095Node: Extending187951
6096Node: Distributing190614
6097Node: API versioning191244
6098Node: FAQ193875
6099Node: CVS194489
6100Node: maintainer-mode201219
6101Node: wildcards204835
6102Node: distcleancheck208084
6103Node: renamed objects212769
6104Node: Macro and Variable Index214272
6105Node: General Index224814
6106
6107End Tag Table
Note: See TracBrowser for help on using the repository browser.