Imported Upstream version 4.3
[platform/upstream/make.git] / doc / make.info-2
1 This is make.info, produced by makeinfo version 6.6 from make.texi.
2
3 This file documents the GNU 'make' utility, which determines
4 automatically which pieces of a large program need to be recompiled, and
5 issues the commands to recompile them.
6
7    This is Edition 0.75, last updated 19 January 2020, of 'The GNU Make
8 Manual', for GNU 'make' version 4.3.
9
10    Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
11 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
12 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Free
13 Software Foundation, Inc.
14
15      Permission is granted to copy, distribute and/or modify this
16      document under the terms of the GNU Free Documentation License,
17      Version 1.3 or any later version published by the Free Software
18      Foundation; with no Invariant Sections, with the Front-Cover Texts
19      being "A GNU Manual," and with the Back-Cover Texts as in (a)
20      below.  A copy of the license is included in the section entitled
21      "GNU Free Documentation License."
22
23      (a) The FSF's Back-Cover Text is: "You have the freedom to copy and
24      modify this GNU manual.  Buying copies from the FSF supports it in
25      developing GNU and promoting software freedom."
26 INFO-DIR-SECTION Software development
27 START-INFO-DIR-ENTRY
28 * Make: (make).            Remake files automatically.
29 END-INFO-DIR-ENTRY
30
31 \1f
32 File: make.info,  Node: Testing,  Next: Options Summary,  Prev: Overriding,  Up: Running
33
34 9.6 Testing the Compilation of a Program
35 ========================================
36
37 Normally, when an error happens in executing a shell command, 'make'
38 gives up immediately, returning a nonzero status.  No further recipes
39 are executed for any target.  The error implies that the goal cannot be
40 correctly remade, and 'make' reports this as soon as it knows.
41
42    When you are compiling a program that you have just changed, this is
43 not what you want.  Instead, you would rather that 'make' try compiling
44 every file that can be tried, to show you as many compilation errors as
45 possible.
46
47    On these occasions, you should use the '-k' or '--keep-going' flag.
48 This tells 'make' to continue to consider the other prerequisites of the
49 pending targets, remaking them if necessary, before it gives up and
50 returns nonzero status.  For example, after an error in compiling one
51 object file, 'make -k' will continue compiling other object files even
52 though it already knows that linking them will be impossible.  In
53 addition to continuing after failed shell commands, 'make -k' will
54 continue as much as possible after discovering that it does not know how
55 to make a target or prerequisite file.  This will always cause an error
56 message, but without '-k', it is a fatal error (*note Summary of
57 Options: Options Summary.).
58
59    The usual behavior of 'make' assumes that your purpose is to get the
60 goals up to date; once 'make' learns that this is impossible, it might
61 as well report the failure immediately.  The '-k' flag says that the
62 real purpose is to test as much as possible of the changes made in the
63 program, perhaps to find several independent problems so that you can
64 correct them all before the next attempt to compile.  This is why Emacs'
65 'M-x compile' command passes the '-k' flag by default.
66
67 \1f
68 File: make.info,  Node: Options Summary,  Prev: Testing,  Up: Running
69
70 9.7 Summary of Options
71 ======================
72
73 Here is a table of all the options 'make' understands:
74
75 '-b'
76 '-m'
77      These options are ignored for compatibility with other versions of
78      'make'.
79
80 '-B'
81 '--always-make'
82      Consider all targets out-of-date.  GNU 'make' proceeds to consider
83      targets and their prerequisites using the normal algorithms;
84      however, all targets so considered are always remade regardless of
85      the status of their prerequisites.  To avoid infinite recursion, if
86      'MAKE_RESTARTS' (*note Other Special Variables: Special Variables.)
87      is set to a number greater than 0 this option is disabled when
88      considering whether to remake makefiles (*note How Makefiles Are
89      Remade: Remaking Makefiles.).
90
91 '-C DIR'
92 '--directory=DIR'
93      Change to directory DIR before reading the makefiles.  If multiple
94      '-C' options are specified, each is interpreted relative to the
95      previous one: '-C / -C etc' is equivalent to '-C /etc'.  This is
96      typically used with recursive invocations of 'make' (*note
97      Recursive Use of 'make': Recursion.).
98
99 '-d'
100
101      Print debugging information in addition to normal processing.  The
102      debugging information says which files are being considered for
103      remaking, which file-times are being compared and with what
104      results, which files actually need to be remade, which implicit
105      rules are considered and which are applied--everything interesting
106      about how 'make' decides what to do.  The '-d' option is equivalent
107      to '--debug=a' (see below).
108
109 '--debug[=OPTIONS]'
110
111      Print debugging information in addition to normal processing.
112      Various levels and types of output can be chosen.  With no
113      arguments, print the "basic" level of debugging.  Possible
114      arguments are below; only the first character is considered, and
115      values must be comma- or space-separated.
116
117      'a (all)'
118           All types of debugging output are enabled.  This is equivalent
119           to using '-d'.
120
121      'b (basic)'
122           Basic debugging prints each target that was found to be
123           out-of-date, and whether the build was successful or not.
124
125      'v (verbose)'
126           A level above 'basic'; includes messages about which makefiles
127           were parsed, prerequisites that did not need to be rebuilt,
128           etc.  This option also enables 'basic' messages.
129
130      'i (implicit)'
131           Prints messages describing the implicit rule searches for each
132           target.  This option also enables 'basic' messages.
133
134      'j (jobs)'
135           Prints messages giving details on the invocation of specific
136           sub-commands.
137
138      'm (makefile)'
139           By default, the above messages are not enabled while trying to
140           remake the makefiles.  This option enables messages while
141           rebuilding makefiles, too.  Note that the 'all' option does
142           enable this option.  This option also enables 'basic'
143           messages.
144
145      'n (none)'
146           Disable all debugging currently enabled.  If additional
147           debugging flags are encountered after this they will still
148           take effect.
149
150 '-e'
151 '--environment-overrides'
152      Give variables taken from the environment precedence over variables
153      from makefiles.  *Note Variables from the Environment: Environment.
154
155 '-E STRING'
156 '--eval=STRING'
157
158      Evaluate STRING as makefile syntax.  This is a command-line version
159      of the 'eval' function (*note Eval Function::).  The evaluation is
160      performed after the default rules and variables have been defined,
161      but before any makefiles are read.
162
163 '-f FILE'
164 '--file=FILE'
165 '--makefile=FILE'
166      Read the file named FILE as a makefile.  *Note Writing Makefiles:
167      Makefiles.
168
169 '-h'
170 '--help'
171
172      Remind you of the options that 'make' understands and then exit.
173
174 '-i'
175 '--ignore-errors'
176      Ignore all errors in recipes executed to remake files.  *Note
177      Errors in Recipes: Errors.
178
179 '-I DIR'
180 '--include-dir=DIR'
181      Specifies a directory DIR to search for included makefiles.  *Note
182      Including Other Makefiles: Include.  If several '-I' options are
183      used to specify several directories, the directories are searched
184      in the order specified.
185
186 '-j [JOBS]'
187 '--jobs[=JOBS]'
188      Specifies the number of recipes (jobs) to run simultaneously.  With
189      no argument, 'make' runs as many recipes simultaneously as
190      possible.  If there is more than one '-j' option, the last one is
191      effective.  *Note Parallel Execution: Parallel, for more
192      information on how recipes are run.  Note that this option is
193      ignored on MS-DOS.
194
195 '-k'
196 '--keep-going'
197      Continue as much as possible after an error.  While the target that
198      failed, and those that depend on it, cannot be remade, the other
199      prerequisites of these targets can be processed all the same.
200      *Note Testing the Compilation of a Program: Testing.
201
202 '-l [LOAD]'
203 '--load-average[=LOAD]'
204 '--max-load[=LOAD]'
205      Specifies that no new recipes should be started if there are other
206      recipes running and the load average is at least LOAD (a
207      floating-point number).  With no argument, removes a previous load
208      limit.  *Note Parallel Execution: Parallel.
209
210 '-L'
211 '--check-symlink-times'
212      On systems that support symbolic links, this option causes 'make'
213      to consider the timestamps on any symbolic links in addition to the
214      timestamp on the file referenced by those links.  When this option
215      is provided, the most recent timestamp among the file and the
216      symbolic links is taken as the modification time for this target
217      file.
218
219 '-n'
220 '--just-print'
221 '--dry-run'
222 '--recon'
223
224      Print the recipe that would be executed, but do not execute it
225      (except in certain circumstances).  *Note Instead of Executing
226      Recipes: Instead of Execution.
227
228 '-o FILE'
229 '--old-file=FILE'
230 '--assume-old=FILE'
231      Do not remake the file FILE even if it is older than its
232      prerequisites, and do not remake anything on account of changes in
233      FILE.  Essentially the file is treated as very old and its rules
234      are ignored.  *Note Avoiding Recompilation of Some Files: Avoiding
235      Compilation.
236
237 '-O[TYPE]'
238 '--output-sync[=TYPE]'
239      Ensure that the complete output from each recipe is printed in one
240      uninterrupted sequence.  This option is only useful when using the
241      '--jobs' option to run multiple recipes simultaneously (*note
242      Parallel Execution: Parallel.) Without this option output will be
243      displayed as it is generated by the recipes.
244
245      With no type or the type 'target', output from the entire recipe of
246      each target is grouped together.  With the type 'line', output from
247      each line in the recipe is grouped together.  With the type
248      'recurse', the output from an entire recursive make is grouped
249      together.  With the type 'none', no output synchronization is
250      performed.  *Note Output During Parallel Execution: Parallel
251      Output.
252
253 '-p'
254 '--print-data-base'
255      Print the data base (rules and variable values) that results from
256      reading the makefiles; then execute as usual or as otherwise
257      specified.  This also prints the version information given by the
258      '-v' switch (see below).  To print the data base without trying to
259      remake any files, use 'make -qp'.  To print the data base of
260      predefined rules and variables, use 'make -p -f /dev/null'.  The
261      data base output contains file name and line number information for
262      recipe and variable definitions, so it can be a useful debugging
263      tool in complex environments.
264
265 '-q'
266 '--question'
267      "Question mode".  Do not run any recipes, or print anything; just
268      return an exit status that is zero if the specified targets are
269      already up to date, one if any remaking is required, or two if an
270      error is encountered.  *Note Instead of Executing Recipes: Instead
271      of Execution.
272
273 '-r'
274 '--no-builtin-rules'
275      Eliminate use of the built-in implicit rules (*note Using Implicit
276      Rules: Implicit Rules.).  You can still define your own by writing
277      pattern rules (*note Defining and Redefining Pattern Rules: Pattern
278      Rules.).  The '-r' option also clears out the default list of
279      suffixes for suffix rules (*note Old-Fashioned Suffix Rules: Suffix
280      Rules.).  But you can still define your own suffixes with a rule
281      for '.SUFFIXES', and then define your own suffix rules.  Note that
282      only _rules_ are affected by the '-r' option; default variables
283      remain in effect (*note Variables Used by Implicit Rules: Implicit
284      Variables.); see the '-R' option below.
285
286 '-R'
287 '--no-builtin-variables'
288      Eliminate use of the built-in rule-specific variables (*note
289      Variables Used by Implicit Rules: Implicit Variables.).  You can
290      still define your own, of course.  The '-R' option also
291      automatically enables the '-r' option (see above), since it doesn't
292      make sense to have implicit rules without any definitions for the
293      variables that they use.
294
295 '-s'
296 '--silent'
297 '--quiet'
298
299      Silent operation; do not print the recipes as they are executed.
300      *Note Recipe Echoing: Echoing.
301
302 '-S'
303 '--no-keep-going'
304 '--stop'
305
306      Cancel the effect of the '-k' option.  This is never necessary
307      except in a recursive 'make' where '-k' might be inherited from the
308      top-level 'make' via 'MAKEFLAGS' (*note Recursive Use of 'make':
309      Recursion.) or if you set '-k' in 'MAKEFLAGS' in your environment.
310
311 '-t'
312 '--touch'
313
314      Touch files (mark them up to date without really changing them)
315      instead of running their recipes.  This is used to pretend that the
316      recipes were done, in order to fool future invocations of 'make'.
317      *Note Instead of Executing Recipes: Instead of Execution.
318
319 '--trace'
320      Show tracing information for 'make' execution.  Prints the entire
321      recipe to be executed, even for recipes that are normally silent
322      (due to '.SILENT' or '@').  Also prints the makefile name and line
323      number where the recipe was defined, and information on why the
324      target is being rebuilt.
325
326 '-v'
327 '--version'
328      Print the version of the 'make' program plus a copyright, a list of
329      authors, and a notice that there is no warranty; then exit.
330
331 '-w'
332 '--print-directory'
333      Print a message containing the working directory both before and
334      after executing the makefile.  This may be useful for tracking down
335      errors from complicated nests of recursive 'make' commands.  *Note
336      Recursive Use of 'make': Recursion.  (In practice, you rarely need
337      to specify this option since 'make' does it for you; see *note The
338      '--print-directory' Option: -w Option.)
339
340 '--no-print-directory'
341      Disable printing of the working directory under '-w'.  This option
342      is useful when '-w' is turned on automatically, but you do not want
343      to see the extra messages.  *Note The '--print-directory' Option:
344      -w Option.
345
346 '-W FILE'
347 '--what-if=FILE'
348 '--new-file=FILE'
349 '--assume-new=FILE'
350      Pretend that the target FILE has just been modified.  When used
351      with the '-n' flag, this shows you what would happen if you were to
352      modify that file.  Without '-n', it is almost the same as running a
353      'touch' command on the given file before running 'make', except
354      that the modification time is changed only in the imagination of
355      'make'.  *Note Instead of Executing Recipes: Instead of Execution.
356
357 '--warn-undefined-variables'
358      Issue a warning message whenever 'make' sees a reference to an
359      undefined variable.  This can be helpful when you are trying to
360      debug makefiles which use variables in complex ways.
361
362 \1f
363 File: make.info,  Node: Implicit Rules,  Next: Archives,  Prev: Running,  Up: Top
364
365 10 Using Implicit Rules
366 ***********************
367
368 Certain standard ways of remaking target files are used very often.  For
369 example, one customary way to make an object file is from a C source
370 file using the C compiler, 'cc'.
371
372    "Implicit rules" tell 'make' how to use customary techniques so that
373 you do not have to specify them in detail when you want to use them.
374 For example, there is an implicit rule for C compilation.  File names
375 determine which implicit rules are run.  For example, C compilation
376 typically takes a '.c' file and makes a '.o' file.  So 'make' applies
377 the implicit rule for C compilation when it sees this combination of
378 file name endings.
379
380    A chain of implicit rules can apply in sequence; for example, 'make'
381 will remake a '.o' file from a '.y' file by way of a '.c' file.
382
383    The built-in implicit rules use several variables in their recipes so
384 that, by changing the values of the variables, you can change the way
385 the implicit rule works.  For example, the variable 'CFLAGS' controls
386 the flags given to the C compiler by the implicit rule for C
387 compilation.
388
389    You can define your own implicit rules by writing "pattern rules".
390
391    "Suffix rules" are a more limited way to define implicit rules.
392 Pattern rules are more general and clearer, but suffix rules are
393 retained for compatibility.
394
395 * Menu:
396
397 * Using Implicit::              How to use an existing implicit rule
398                                   to get the recipes for updating a file.
399 * Catalogue of Rules::          A list of built-in rules.
400 * Implicit Variables::          How to change what predefined rules do.
401 * Chained Rules::               How to use a chain of implicit rules.
402 * Pattern Rules::               How to define new implicit rules.
403 * Last Resort::                 How to define a recipe for rules which
404                                   cannot find any.
405 * Suffix Rules::                The old-fashioned style of implicit rule.
406 * Implicit Rule Search::        The precise algorithm for applying
407                                   implicit rules.
408
409 \1f
410 File: make.info,  Node: Using Implicit,  Next: Catalogue of Rules,  Prev: Implicit Rules,  Up: Implicit Rules
411
412 10.1 Using Implicit Rules
413 =========================
414
415 To allow 'make' to find a customary method for updating a target file,
416 all you have to do is refrain from specifying recipes yourself.  Either
417 write a rule with no recipe, or don't write a rule at all.  Then 'make'
418 will figure out which implicit rule to use based on which kind of source
419 file exists or can be made.
420
421    For example, suppose the makefile looks like this:
422
423      foo : foo.o bar.o
424              cc -o foo foo.o bar.o $(CFLAGS) $(LDFLAGS)
425
426 Because you mention 'foo.o' but do not give a rule for it, 'make' will
427 automatically look for an implicit rule that tells how to update it.
428 This happens whether or not the file 'foo.o' currently exists.
429
430    If an implicit rule is found, it can supply both a recipe and one or
431 more prerequisites (the source files).  You would want to write a rule
432 for 'foo.o' with no recipe if you need to specify additional
433 prerequisites, such as header files, that the implicit rule cannot
434 supply.
435
436    Each implicit rule has a target pattern and prerequisite patterns.
437 There may be many implicit rules with the same target pattern.  For
438 example, numerous rules make '.o' files: one, from a '.c' file with the
439 C compiler; another, from a '.p' file with the Pascal compiler; and so
440 on.  The rule that actually applies is the one whose prerequisites exist
441 or can be made.  So, if you have a file 'foo.c', 'make' will run the C
442 compiler; otherwise, if you have a file 'foo.p', 'make' will run the
443 Pascal compiler; and so on.
444
445    Of course, when you write the makefile, you know which implicit rule
446 you want 'make' to use, and you know it will choose that one because you
447 know which possible prerequisite files are supposed to exist.  *Note
448 Catalogue of Built-In Rules: Catalogue of Rules, for a catalogue of all
449 the predefined implicit rules.
450
451    Above, we said an implicit rule applies if the required prerequisites
452 "exist or can be made".  A file "can be made" if it is mentioned
453 explicitly in the makefile as a target or a prerequisite, or if an
454 implicit rule can be recursively found for how to make it.  When an
455 implicit prerequisite is the result of another implicit rule, we say
456 that "chaining" is occurring.  *Note Chains of Implicit Rules: Chained
457 Rules.
458
459    In general, 'make' searches for an implicit rule for each target, and
460 for each double-colon rule, that has no recipe.  A file that is
461 mentioned only as a prerequisite is considered a target whose rule
462 specifies nothing, so implicit rule search happens for it.  *Note
463 Implicit Rule Search Algorithm: Implicit Rule Search, for the details of
464 how the search is done.
465
466    Note that explicit prerequisites do not influence implicit rule
467 search.  For example, consider this explicit rule:
468
469      foo.o: foo.p
470
471 The prerequisite on 'foo.p' does not necessarily mean that 'make' will
472 remake 'foo.o' according to the implicit rule to make an object file, a
473 '.o' file, from a Pascal source file, a '.p' file.  For example, if
474 'foo.c' also exists, the implicit rule to make an object file from a C
475 source file is used instead, because it appears before the Pascal rule
476 in the list of predefined implicit rules (*note Catalogue of Built-In
477 Rules: Catalogue of Rules.).
478
479    If you do not want an implicit rule to be used for a target that has
480 no recipe, you can give that target an empty recipe by writing a
481 semicolon (*note Defining Empty Recipes: Empty Recipes.).
482
483 \1f
484 File: make.info,  Node: Catalogue of Rules,  Next: Implicit Variables,  Prev: Using Implicit,  Up: Implicit Rules
485
486 10.2 Catalogue of Built-In Rules
487 ================================
488
489 Here is a catalogue of predefined implicit rules which are always
490 available unless the makefile explicitly overrides or cancels them.
491 *Note Canceling Implicit Rules: Canceling Rules, for information on
492 canceling or overriding an implicit rule.  The '-r' or
493 '--no-builtin-rules' option cancels all predefined rules.
494
495    This manual only documents the default rules available on POSIX-based
496 operating systems.  Other operating systems, such as VMS, Windows, OS/2,
497 etc.  may have different sets of default rules.  To see the full list of
498 default rules and variables available in your version of GNU 'make', run
499 'make -p' in a directory with no makefile.
500
501    Not all of these rules will always be defined, even when the '-r'
502 option is not given.  Many of the predefined implicit rules are
503 implemented in 'make' as suffix rules, so which ones will be defined
504 depends on the "suffix list" (the list of prerequisites of the special
505 target '.SUFFIXES').  The default suffix list is: '.out', '.a', '.ln',
506 '.o', '.c', '.cc', '.C', '.cpp', '.p', '.f', '.F', '.m', '.r', '.y',
507 '.l', '.ym', '.lm', '.s', '.S', '.mod', '.sym', '.def', '.h', '.info',
508 '.dvi', '.tex', '.texinfo', '.texi', '.txinfo', '.w', '.ch' '.web',
509 '.sh', '.elc', '.el'.  All of the implicit rules described below whose
510 prerequisites have one of these suffixes are actually suffix rules.  If
511 you modify the suffix list, the only predefined suffix rules in effect
512 will be those named by one or two of the suffixes that are on the list
513 you specify; rules whose suffixes fail to be on the list are disabled.
514 *Note Old-Fashioned Suffix Rules: Suffix Rules, for full details on
515 suffix rules.
516
517 Compiling C programs
518      'N.o' is made automatically from 'N.c' with a recipe of the form
519      '$(CC) $(CPPFLAGS) $(CFLAGS) -c'.
520
521 Compiling C++ programs
522      'N.o' is made automatically from 'N.cc', 'N.cpp', or 'N.C' with a
523      recipe of the form '$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c'.  We
524      encourage you to use the suffix '.cc' for C++ source files instead
525      of '.C'.
526
527 Compiling Pascal programs
528      'N.o' is made automatically from 'N.p' with the recipe '$(PC)
529      $(PFLAGS) -c'.
530
531 Compiling Fortran and Ratfor programs
532      'N.o' is made automatically from 'N.r', 'N.F' or 'N.f' by running
533      the Fortran compiler.  The precise recipe used is as follows:
534
535      '.f'
536           '$(FC) $(FFLAGS) -c'.
537      '.F'
538           '$(FC) $(FFLAGS) $(CPPFLAGS) -c'.
539      '.r'
540           '$(FC) $(FFLAGS) $(RFLAGS) -c'.
541
542 Preprocessing Fortran and Ratfor programs
543      'N.f' is made automatically from 'N.r' or 'N.F'.  This rule runs
544      just the preprocessor to convert a Ratfor or preprocessable Fortran
545      program into a strict Fortran program.  The precise recipe used is
546      as follows:
547
548      '.F'
549           '$(FC) $(CPPFLAGS) $(FFLAGS) -F'.
550      '.r'
551           '$(FC) $(FFLAGS) $(RFLAGS) -F'.
552
553 Compiling Modula-2 programs
554      'N.sym' is made from 'N.def' with a recipe of the form '$(M2C)
555      $(M2FLAGS) $(DEFFLAGS)'.  'N.o' is made from 'N.mod'; the form is:
556      '$(M2C) $(M2FLAGS) $(MODFLAGS)'.
557
558 Assembling and preprocessing assembler programs
559      'N.o' is made automatically from 'N.s' by running the assembler,
560      'as'.  The precise recipe is '$(AS) $(ASFLAGS)'.
561
562      'N.s' is made automatically from 'N.S' by running the C
563      preprocessor, 'cpp'.  The precise recipe is '$(CPP) $(CPPFLAGS)'.
564
565 Linking a single object file
566      'N' is made automatically from 'N.o' by running the linker (usually
567      called 'ld') via the C compiler.  The precise recipe used is
568      '$(CC) $(LDFLAGS) N.o $(LOADLIBES) $(LDLIBS)'.
569
570      This rule does the right thing for a simple program with only one
571      source file.  It will also do the right thing if there are multiple
572      object files (presumably coming from various other source files),
573      one of which has a name matching that of the executable file.
574      Thus,
575
576           x: y.o z.o
577
578      when 'x.c', 'y.c' and 'z.c' all exist will execute:
579
580           cc -c x.c -o x.o
581           cc -c y.c -o y.o
582           cc -c z.c -o z.o
583           cc x.o y.o z.o -o x
584           rm -f x.o
585           rm -f y.o
586           rm -f z.o
587
588      In more complicated cases, such as when there is no object file
589      whose name derives from the executable file name, you must write an
590      explicit recipe for linking.
591
592      Each kind of file automatically made into '.o' object files will be
593      automatically linked by using the compiler ('$(CC)', '$(FC)' or
594      '$(PC)'; the C compiler '$(CC)' is used to assemble '.s' files)
595      without the '-c' option.  This could be done by using the '.o'
596      object files as intermediates, but it is faster to do the compiling
597      and linking in one step, so that's how it's done.
598
599 Yacc for C programs
600      'N.c' is made automatically from 'N.y' by running Yacc with the
601      recipe '$(YACC) $(YFLAGS)'.
602
603 Lex for C programs
604      'N.c' is made automatically from 'N.l' by running Lex.  The actual
605      recipe is '$(LEX) $(LFLAGS)'.
606
607 Lex for Ratfor programs
608      'N.r' is made automatically from 'N.l' by running Lex.  The actual
609      recipe is '$(LEX) $(LFLAGS)'.
610
611      The convention of using the same suffix '.l' for all Lex files
612      regardless of whether they produce C code or Ratfor code makes it
613      impossible for 'make' to determine automatically which of the two
614      languages you are using in any particular case.  If 'make' is
615      called upon to remake an object file from a '.l' file, it must
616      guess which compiler to use.  It will guess the C compiler, because
617      that is more common.  If you are using Ratfor, make sure 'make'
618      knows this by mentioning 'N.r' in the makefile.  Or, if you are
619      using Ratfor exclusively, with no C files, remove '.c' from the
620      list of implicit rule suffixes with:
621
622           .SUFFIXES:
623           .SUFFIXES: .o .r .f .l ...
624
625 Making Lint Libraries from C, Yacc, or Lex programs
626      'N.ln' is made from 'N.c' by running 'lint'.  The precise recipe is
627      '$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i'.  The same recipe is used on
628      the C code produced from 'N.y' or 'N.l'.
629
630 TeX and Web
631      'N.dvi' is made from 'N.tex' with the recipe '$(TEX)'.  'N.tex' is
632      made from 'N.web' with '$(WEAVE)', or from 'N.w' (and from 'N.ch'
633      if it exists or can be made) with '$(CWEAVE)'.  'N.p' is made from
634      'N.web' with '$(TANGLE)' and 'N.c' is made from 'N.w' (and from
635      'N.ch' if it exists or can be made) with '$(CTANGLE)'.
636
637 Texinfo and Info
638      'N.dvi' is made from 'N.texinfo', 'N.texi', or 'N.txinfo', with the
639      recipe '$(TEXI2DVI) $(TEXI2DVI_FLAGS)'.  'N.info' is made from
640      'N.texinfo', 'N.texi', or 'N.txinfo', with the recipe
641      '$(MAKEINFO) $(MAKEINFO_FLAGS)'.
642
643 RCS
644      Any file 'N' is extracted if necessary from an RCS file named
645      either 'N,v' or 'RCS/N,v'.  The precise recipe used is
646      '$(CO) $(COFLAGS)'.  'N' will not be extracted from RCS if it
647      already exists, even if the RCS file is newer.  The rules for RCS
648      are terminal (*note Match-Anything Pattern Rules: Match-Anything
649      Rules.), so RCS files cannot be generated from another source; they
650      must actually exist.
651
652 SCCS
653      Any file 'N' is extracted if necessary from an SCCS file named
654      either 's.N' or 'SCCS/s.N'.  The precise recipe used is
655      '$(GET) $(GFLAGS)'.  The rules for SCCS are terminal (*note
656      Match-Anything Pattern Rules: Match-Anything Rules.), so SCCS files
657      cannot be generated from another source; they must actually exist.
658
659      For the benefit of SCCS, a file 'N' is copied from 'N.sh' and made
660      executable (by everyone).  This is for shell scripts that are
661      checked into SCCS. Since RCS preserves the execution permission of
662      a file, you do not need to use this feature with RCS.
663
664      We recommend that you avoid using of SCCS. RCS is widely held to be
665      superior, and is also free.  By choosing free software in place of
666      comparable (or inferior) proprietary software, you support the free
667      software movement.
668
669    Usually, you want to change only the variables listed in the table
670 above, which are documented in the following section.
671
672    However, the recipes in built-in implicit rules actually use
673 variables such as 'COMPILE.c', 'LINK.p', and 'PREPROCESS.S', whose
674 values contain the recipes listed above.
675
676    'make' follows the convention that the rule to compile a '.X' source
677 file uses the variable 'COMPILE.X'.  Similarly, the rule to produce an
678 executable from a '.X' file uses 'LINK.X'; and the rule to preprocess a
679 '.X' file uses 'PREPROCESS.X'.
680
681    Every rule that produces an object file uses the variable
682 'OUTPUT_OPTION'.  'make' defines this variable either to contain '-o
683 $@', or to be empty, depending on a compile-time option.  You need the
684 '-o' option to ensure that the output goes into the right file when the
685 source file is in a different directory, as when using 'VPATH' (*note
686 Directory Search::).  However, compilers on some systems do not accept a
687 '-o' switch for object files.  If you use such a system, and use
688 'VPATH', some compilations will put their output in the wrong place.  A
689 possible workaround for this problem is to give 'OUTPUT_OPTION' the
690 value '; mv $*.o $@'.
691
692 \1f
693 File: make.info,  Node: Implicit Variables,  Next: Chained Rules,  Prev: Catalogue of Rules,  Up: Implicit Rules
694
695 10.3 Variables Used by Implicit Rules
696 =====================================
697
698 The recipes in built-in implicit rules make liberal use of certain
699 predefined variables.  You can alter the values of these variables in
700 the makefile, with arguments to 'make', or in the environment to alter
701 how the implicit rules work without redefining the rules themselves.
702 You can cancel all variables used by implicit rules with the '-R' or
703 '--no-builtin-variables' option.
704
705    For example, the recipe used to compile a C source file actually says
706 '$(CC) -c $(CFLAGS) $(CPPFLAGS)'.  The default values of the variables
707 used are 'cc' and nothing, resulting in the command 'cc -c'.  By
708 redefining 'CC' to 'ncc', you could cause 'ncc' to be used for all C
709 compilations performed by the implicit rule.  By redefining 'CFLAGS' to
710 be '-g', you could pass the '-g' option to each compilation.  _All_
711 implicit rules that do C compilation use '$(CC)' to get the program name
712 for the compiler and _all_ include '$(CFLAGS)' among the arguments given
713 to the compiler.
714
715    The variables used in implicit rules fall into two classes: those
716 that are names of programs (like 'CC') and those that contain arguments
717 for the programs (like 'CFLAGS').  (The "name of a program" may also
718 contain some command arguments, but it must start with an actual
719 executable program name.)  If a variable value contains more than one
720 argument, separate them with spaces.
721
722    The following tables describe of some of the more commonly-used
723 predefined variables.  This list is not exhaustive, and the default
724 values shown here may not be what 'make' selects for your environment.
725 To see the complete list of predefined variables for your instance of
726 GNU 'make' you can run 'make -p' in a directory with no makefiles.
727
728    Here is a table of some of the more common variables used as names of
729 programs in built-in rules:
730
731 'AR'
732      Archive-maintaining program; default 'ar'.
733
734 'AS'
735      Program for compiling assembly files; default 'as'.
736
737 'CC'
738      Program for compiling C programs; default 'cc'.
739
740 'CXX'
741      Program for compiling C++ programs; default 'g++'.
742
743 'CPP'
744      Program for running the C preprocessor, with results to standard
745      output; default '$(CC) -E'.
746
747 'FC'
748      Program for compiling or preprocessing Fortran and Ratfor programs;
749      default 'f77'.
750
751 'M2C'
752      Program to use to compile Modula-2 source code; default 'm2c'.
753
754 'PC'
755      Program for compiling Pascal programs; default 'pc'.
756
757 'CO'
758      Program for extracting a file from RCS; default 'co'.
759
760 'GET'
761      Program for extracting a file from SCCS; default 'get'.
762
763 'LEX'
764      Program to use to turn Lex grammars into source code; default
765      'lex'.
766
767 'YACC'
768      Program to use to turn Yacc grammars into source code; default
769      'yacc'.
770
771 'LINT'
772      Program to use to run lint on source code; default 'lint'.
773
774 'MAKEINFO'
775      Program to convert a Texinfo source file into an Info file; default
776      'makeinfo'.
777
778 'TEX'
779      Program to make TeX DVI files from TeX source; default 'tex'.
780
781 'TEXI2DVI'
782      Program to make TeX DVI files from Texinfo source; default
783      'texi2dvi'.
784
785 'WEAVE'
786      Program to translate Web into TeX; default 'weave'.
787
788 'CWEAVE'
789      Program to translate C Web into TeX; default 'cweave'.
790
791 'TANGLE'
792      Program to translate Web into Pascal; default 'tangle'.
793
794 'CTANGLE'
795      Program to translate C Web into C; default 'ctangle'.
796
797 'RM'
798      Command to remove a file; default 'rm -f'.
799
800    Here is a table of variables whose values are additional arguments
801 for the programs above.  The default values for all of these is the
802 empty string, unless otherwise noted.
803
804 'ARFLAGS'
805      Flags to give the archive-maintaining program; default 'rv'.
806
807 'ASFLAGS'
808      Extra flags to give to the assembler (when explicitly invoked on a
809      '.s' or '.S' file).
810
811 'CFLAGS'
812      Extra flags to give to the C compiler.
813
814 'CXXFLAGS'
815      Extra flags to give to the C++ compiler.
816
817 'COFLAGS'
818      Extra flags to give to the RCS 'co' program.
819
820 'CPPFLAGS'
821      Extra flags to give to the C preprocessor and programs that use it
822      (the C and Fortran compilers).
823
824 'FFLAGS'
825      Extra flags to give to the Fortran compiler.
826
827 'GFLAGS'
828      Extra flags to give to the SCCS 'get' program.
829
830 'LDFLAGS'
831      Extra flags to give to compilers when they are supposed to invoke
832      the linker, 'ld', such as '-L'.  Libraries ('-lfoo') should be
833      added to the 'LDLIBS' variable instead.
834
835 'LDLIBS'
836      Library flags or names given to compilers when they are supposed to
837      invoke the linker, 'ld'.  'LOADLIBES' is a deprecated (but still
838      supported) alternative to 'LDLIBS'.  Non-library linker flags, such
839      as '-L', should go in the 'LDFLAGS' variable.
840
841 'LFLAGS'
842      Extra flags to give to Lex.
843
844 'YFLAGS'
845      Extra flags to give to Yacc.
846
847 'PFLAGS'
848      Extra flags to give to the Pascal compiler.
849
850 'RFLAGS'
851      Extra flags to give to the Fortran compiler for Ratfor programs.
852
853 'LINTFLAGS'
854      Extra flags to give to lint.
855
856 \1f
857 File: make.info,  Node: Chained Rules,  Next: Pattern Rules,  Prev: Implicit Variables,  Up: Implicit Rules
858
859 10.4 Chains of Implicit Rules
860 =============================
861
862 Sometimes a file can be made by a sequence of implicit rules.  For
863 example, a file 'N.o' could be made from 'N.y' by running first Yacc and
864 then 'cc'.  Such a sequence is called a "chain".
865
866    If the file 'N.c' exists, or is mentioned in the makefile, no special
867 searching is required: 'make' finds that the object file can be made by
868 C compilation from 'N.c'; later on, when considering how to make 'N.c',
869 the rule for running Yacc is used.  Ultimately both 'N.c' and 'N.o' are
870 updated.
871
872    However, even if 'N.c' does not exist and is not mentioned, 'make'
873 knows how to envision it as the missing link between 'N.o' and 'N.y'!
874 In this case, 'N.c' is called an "intermediate file".  Once 'make' has
875 decided to use the intermediate file, it is entered in the data base as
876 if it had been mentioned in the makefile, along with the implicit rule
877 that says how to create it.
878
879    Intermediate files are remade using their rules just like all other
880 files.  But intermediate files are treated differently in two ways.
881
882    The first difference is what happens if the intermediate file does
883 not exist.  If an ordinary file B does not exist, and 'make' considers a
884 target that depends on B, it invariably creates B and then updates the
885 target from B.  But if B is an intermediate file, then 'make' can leave
886 well enough alone.  It won't bother updating B, or the ultimate target,
887 unless some prerequisite of B is newer than that target or there is some
888 other reason to update that target.
889
890    The second difference is that if 'make' _does_ create B in order to
891 update something else, it deletes B later on after it is no longer
892 needed.  Therefore, an intermediate file which did not exist before
893 'make' also does not exist after 'make'.  'make' reports the deletion to
894 you by printing a 'rm -f' command showing which file it is deleting.
895
896    Ordinarily, a file cannot be intermediate if it is mentioned in the
897 makefile as a target or prerequisite.  However, you can explicitly mark
898 a file as intermediate by listing it as a prerequisite of the special
899 target '.INTERMEDIATE'.  This takes effect even if the file is mentioned
900 explicitly in some other way.
901
902    You can prevent automatic deletion of an intermediate file by marking
903 it as a "secondary" file.  To do this, list it as a prerequisite of the
904 special target '.SECONDARY'.  When a file is secondary, 'make' will not
905 create the file merely because it does not already exist, but 'make'
906 does not automatically delete the file.  Marking a file as secondary
907 also marks it as intermediate.
908
909    You can list the target pattern of an implicit rule (such as '%.o')
910 as a prerequisite of the special target '.PRECIOUS' to preserve
911 intermediate files made by implicit rules whose target patterns match
912 that file's name; see *note Interrupts::.
913
914    A chain can involve more than two implicit rules.  For example, it is
915 possible to make a file 'foo' from 'RCS/foo.y,v' by running RCS, Yacc
916 and 'cc'.  Then both 'foo.y' and 'foo.c' are intermediate files that are
917 deleted at the end.
918
919    No single implicit rule can appear more than once in a chain.  This
920 means that 'make' will not even consider such a ridiculous thing as
921 making 'foo' from 'foo.o.o' by running the linker twice.  This
922 constraint has the added benefit of preventing any infinite loop in the
923 search for an implicit rule chain.
924
925    There are some special implicit rules to optimize certain cases that
926 would otherwise be handled by rule chains.  For example, making 'foo'
927 from 'foo.c' could be handled by compiling and linking with separate
928 chained rules, using 'foo.o' as an intermediate file.  But what actually
929 happens is that a special rule for this case does the compilation and
930 linking with a single 'cc' command.  The optimized rule is used in
931 preference to the step-by-step chain because it comes earlier in the
932 ordering of rules.
933
934    Finally, for performance reasons 'make' will not consider
935 non-terminal match-anything rules (i.e., '%:') when searching for a rule
936 to build a prerequisite of an implicit rule (*note Match-Anything
937 Rules::).
938
939 \1f
940 File: make.info,  Node: Pattern Rules,  Next: Last Resort,  Prev: Chained Rules,  Up: Implicit Rules
941
942 10.5 Defining and Redefining Pattern Rules
943 ==========================================
944
945 You define an implicit rule by writing a "pattern rule".  A pattern rule
946 looks like an ordinary rule, except that its target contains the
947 character '%' (exactly one of them).  The target is considered a pattern
948 for matching file names; the '%' can match any nonempty substring, while
949 other characters match only themselves.  The prerequisites likewise use
950 '%' to show how their names relate to the target name.
951
952    Thus, a pattern rule '%.o : %.c' says how to make any file 'STEM.o'
953 from another file 'STEM.c'.
954
955    Note that expansion using '%' in pattern rules occurs *after* any
956 variable or function expansions, which take place when the makefile is
957 read.  *Note How to Use Variables: Using Variables, and *note Functions
958 for Transforming Text: Functions.
959
960 * Menu:
961
962 * Pattern Intro::               An introduction to pattern rules.
963 * Pattern Examples::            Examples of pattern rules.
964 * Automatic Variables::         How to use automatic variables in the
965                                   recipe of implicit rules.
966 * Pattern Match::               How patterns match.
967 * Match-Anything Rules::        Precautions you should take prior to
968                                   defining rules that can match any
969                                   target file whatever.
970 * Canceling Rules::             How to override or cancel built-in rules.
971
972 \1f
973 File: make.info,  Node: Pattern Intro,  Next: Pattern Examples,  Prev: Pattern Rules,  Up: Pattern Rules
974
975 10.5.1 Introduction to Pattern Rules
976 ------------------------------------
977
978 A pattern rule contains the character '%' (exactly one of them) in the
979 target; otherwise, it looks exactly like an ordinary rule.  The target
980 is a pattern for matching file names; the '%' matches any nonempty
981 substring, while other characters match only themselves.
982
983    For example, '%.c' as a pattern matches any file name that ends in
984 '.c'.  's.%.c' as a pattern matches any file name that starts with 's.',
985 ends in '.c' and is at least five characters long.  (There must be at
986 least one character to match the '%'.)  The substring that the '%'
987 matches is called the "stem".
988
989    '%' in a prerequisite of a pattern rule stands for the same stem that
990 was matched by the '%' in the target.  In order for the pattern rule to
991 apply, its target pattern must match the file name under consideration
992 and all of its prerequisites (after pattern substitution) must name
993 files that exist or can be made.  These files become prerequisites of
994 the target.
995
996    Thus, a rule of the form
997
998      %.o : %.c ; RECIPE...
999
1000 specifies how to make a file 'N.o', with another file 'N.c' as its
1001 prerequisite, provided that 'N.c' exists or can be made.
1002
1003    There may also be prerequisites that do not use '%'; such a
1004 prerequisite attaches to every file made by this pattern rule.  These
1005 unvarying prerequisites are useful occasionally.
1006
1007    A pattern rule need not have any prerequisites that contain '%', or
1008 in fact any prerequisites at all.  Such a rule is effectively a general
1009 wildcard.  It provides a way to make any file that matches the target
1010 pattern.  *Note Last Resort::.
1011
1012    More than one pattern rule may match a target.  In this case 'make'
1013 will choose the "best fit" rule.  *Note How Patterns Match: Pattern
1014 Match.
1015
1016    Pattern rules may have more than one target; however, every target
1017 must contain a '%' character.  Pattern rules are always treated as
1018 grouped targets (*note Multiple Targets in a Rule: Multiple Targets.)
1019 regardless of whether they use the ':' or '&:' separator.
1020
1021 \1f
1022 File: make.info,  Node: Pattern Examples,  Next: Automatic Variables,  Prev: Pattern Intro,  Up: Pattern Rules
1023
1024 10.5.2 Pattern Rule Examples
1025 ----------------------------
1026
1027 Here are some examples of pattern rules actually predefined in 'make'.
1028 First, the rule that compiles '.c' files into '.o' files:
1029
1030      %.o : %.c
1031              $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
1032
1033 defines a rule that can make any file 'X.o' from 'X.c'.  The recipe uses
1034 the automatic variables '$@' and '$<' to substitute the names of the
1035 target file and the source file in each case where the rule applies
1036 (*note Automatic Variables::).
1037
1038    Here is a second built-in rule:
1039
1040      % :: RCS/%,v
1041              $(CO) $(COFLAGS) $<
1042
1043 defines a rule that can make any file 'X' whatsoever from a
1044 corresponding file 'X,v' in the sub-directory 'RCS'.  Since the target
1045 is '%', this rule will apply to any file whatever, provided the
1046 appropriate prerequisite file exists.  The double colon makes the rule
1047 "terminal", which means that its prerequisite may not be an intermediate
1048 file (*note Match-Anything Pattern Rules: Match-Anything Rules.).
1049
1050    This pattern rule has two targets:
1051
1052      %.tab.c %.tab.h: %.y
1053              bison -d $<
1054
1055 This tells 'make' that the recipe 'bison -d X.y' will make both
1056 'X.tab.c' and 'X.tab.h'.  If the file 'foo' depends on the files
1057 'parse.tab.o' and 'scan.o' and the file 'scan.o' depends on the file
1058 'parse.tab.h', when 'parse.y' is changed, the recipe 'bison -d parse.y'
1059 will be executed only once, and the prerequisites of both 'parse.tab.o'
1060 and 'scan.o' will be satisfied.  (Presumably the file 'parse.tab.o' will
1061 be recompiled from 'parse.tab.c' and the file 'scan.o' from 'scan.c',
1062 while 'foo' is linked from 'parse.tab.o', 'scan.o', and its other
1063 prerequisites, and it will execute happily ever after.)
1064
1065 \1f
1066 File: make.info,  Node: Automatic Variables,  Next: Pattern Match,  Prev: Pattern Examples,  Up: Pattern Rules
1067
1068 10.5.3 Automatic Variables
1069 --------------------------
1070
1071 Suppose you are writing a pattern rule to compile a '.c' file into a
1072 '.o' file: how do you write the 'cc' command so that it operates on the
1073 right source file name?  You cannot write the name in the recipe,
1074 because the name is different each time the implicit rule is applied.
1075
1076    What you do is use a special feature of 'make', the "automatic
1077 variables".  These variables have values computed afresh for each rule
1078 that is executed, based on the target and prerequisites of the rule.  In
1079 this example, you would use '$@' for the object file name and '$<' for
1080 the source file name.
1081
1082    It's very important that you recognize the limited scope in which
1083 automatic variable values are available: they only have values within
1084 the recipe.  In particular, you cannot use them anywhere within the
1085 target list of a rule; they have no value there and will expand to the
1086 empty string.  Also, they cannot be accessed directly within the
1087 prerequisite list of a rule.  A common mistake is attempting to use '$@'
1088 within the prerequisites list; this will not work.  However, there is a
1089 special feature of GNU 'make', secondary expansion (*note Secondary
1090 Expansion::), which will allow automatic variable values to be used in
1091 prerequisite lists.
1092
1093    Here is a table of automatic variables:
1094
1095 '$@'
1096      The file name of the target of the rule.  If the target is an
1097      archive member, then '$@' is the name of the archive file.  In a
1098      pattern rule that has multiple targets (*note Introduction to
1099      Pattern Rules: Pattern Intro.), '$@' is the name of whichever
1100      target caused the rule's recipe to be run.
1101
1102 '$%'
1103      The target member name, when the target is an archive member.
1104      *Note Archives::.  For example, if the target is 'foo.a(bar.o)'
1105      then '$%' is 'bar.o' and '$@' is 'foo.a'.  '$%' is empty when the
1106      target is not an archive member.
1107
1108 '$<'
1109      The name of the first prerequisite.  If the target got its recipe
1110      from an implicit rule, this will be the first prerequisite added by
1111      the implicit rule (*note Implicit Rules::).
1112
1113 '$?'
1114      The names of all the prerequisites that are newer than the target,
1115      with spaces between them.  If the target does not exist, all
1116      prerequisites will be included.  For prerequisites which are
1117      archive members, only the named member is used (*note Archives::).
1118
1119 '$^'
1120      The names of all the prerequisites, with spaces between them.  For
1121      prerequisites which are archive members, only the named member is
1122      used (*note Archives::).  A target has only one prerequisite on
1123      each other file it depends on, no matter how many times each file
1124      is listed as a prerequisite.  So if you list a prerequisite more
1125      than once for a target, the value of '$^' contains just one copy of
1126      the name.  This list does *not* contain any of the order-only
1127      prerequisites; for those see the '$|' variable, below.
1128
1129 '$+'
1130      This is like '$^', but prerequisites listed more than once are
1131      duplicated in the order they were listed in the makefile.  This is
1132      primarily useful for use in linking commands where it is meaningful
1133      to repeat library file names in a particular order.
1134
1135 '$|'
1136      The names of all the order-only prerequisites, with spaces between
1137      them.
1138
1139 '$*'
1140      The stem with which an implicit rule matches (*note How Patterns
1141      Match: Pattern Match.).  If the target is 'dir/a.foo.b' and the
1142      target pattern is 'a.%.b' then the stem is 'dir/foo'.  The stem is
1143      useful for constructing names of related files.
1144
1145      In a static pattern rule, the stem is part of the file name that
1146      matched the '%' in the target pattern.
1147
1148      In an explicit rule, there is no stem; so '$*' cannot be determined
1149      in that way.  Instead, if the target name ends with a recognized
1150      suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), '$*' is
1151      set to the target name minus the suffix.  For example, if the
1152      target name is 'foo.c', then '$*' is set to 'foo', since '.c' is a
1153      suffix.  GNU 'make' does this bizarre thing only for compatibility
1154      with other implementations of 'make'.  You should generally avoid
1155      using '$*' except in implicit rules or static pattern rules.
1156
1157      If the target name in an explicit rule does not end with a
1158      recognized suffix, '$*' is set to the empty string for that rule.
1159
1160    '$?' is useful even in explicit rules when you wish to operate on
1161 only the prerequisites that have changed.  For example, suppose that an
1162 archive named 'lib' is supposed to contain copies of several object
1163 files.  This rule copies just the changed object files into the archive:
1164
1165      lib: foo.o bar.o lose.o win.o
1166              ar r lib $?
1167
1168    Of the variables listed above, four have values that are single file
1169 names, and three have values that are lists of file names.  These seven
1170 have variants that get just the file's directory name or just the file
1171 name within the directory.  The variant variables' names are formed by
1172 appending 'D' or 'F', respectively.  The functions 'dir' and 'notdir'
1173 can be used to obtain a similar effect (*note Functions for File Names:
1174 File Name Functions.).  Note, however, that the 'D' variants all omit
1175 the trailing slash which always appears in the output of the 'dir'
1176 function.  Here is a table of the variants:
1177
1178 '$(@D)'
1179      The directory part of the file name of the target, with the
1180      trailing slash removed.  If the value of '$@' is 'dir/foo.o' then
1181      '$(@D)' is 'dir'.  This value is '.' if '$@' does not contain a
1182      slash.
1183
1184 '$(@F)'
1185      The file-within-directory part of the file name of the target.  If
1186      the value of '$@' is 'dir/foo.o' then '$(@F)' is 'foo.o'.  '$(@F)'
1187      is equivalent to '$(notdir $@)'.
1188
1189 '$(*D)'
1190 '$(*F)'
1191      The directory part and the file-within-directory part of the stem;
1192      'dir' and 'foo' in this example.
1193
1194 '$(%D)'
1195 '$(%F)'
1196      The directory part and the file-within-directory part of the target
1197      archive member name.  This makes sense only for archive member
1198      targets of the form 'ARCHIVE(MEMBER)' and is useful only when
1199      MEMBER may contain a directory name.  (*Note Archive Members as
1200      Targets: Archive Members.)
1201
1202 '$(<D)'
1203 '$(<F)'
1204      The directory part and the file-within-directory part of the first
1205      prerequisite.
1206
1207 '$(^D)'
1208 '$(^F)'
1209      Lists of the directory parts and the file-within-directory parts of
1210      all prerequisites.
1211
1212 '$(+D)'
1213 '$(+F)'
1214      Lists of the directory parts and the file-within-directory parts of
1215      all prerequisites, including multiple instances of duplicated
1216      prerequisites.
1217
1218 '$(?D)'
1219 '$(?F)'
1220      Lists of the directory parts and the file-within-directory parts of
1221      all prerequisites that are newer than the target.
1222
1223    Note that we use a special stylistic convention when we talk about
1224 these automatic variables; we write "the value of '$<'", rather than
1225 "the variable '<'" as we would write for ordinary variables such as
1226 'objects' and 'CFLAGS'.  We think this convention looks more natural in
1227 this special case.  Please do not assume it has a deep significance;
1228 '$<' refers to the variable named '<' just as '$(CFLAGS)' refers to the
1229 variable named 'CFLAGS'.  You could just as well use '$(<)' in place of
1230 '$<'.
1231
1232 \1f
1233 File: make.info,  Node: Pattern Match,  Next: Match-Anything Rules,  Prev: Automatic Variables,  Up: Pattern Rules
1234
1235 10.5.4 How Patterns Match
1236 -------------------------
1237
1238 A target pattern is composed of a '%' between a prefix and a suffix,
1239 either or both of which may be empty.  The pattern matches a file name
1240 only if the file name starts with the prefix and ends with the suffix,
1241 without overlap.  The text between the prefix and the suffix is called
1242 the "stem".  Thus, when the pattern '%.o' matches the file name
1243 'test.o', the stem is 'test'.  The pattern rule prerequisites are turned
1244 into actual file names by substituting the stem for the character '%'.
1245 Thus, if in the same example one of the prerequisites is written as
1246 '%.c', it expands to 'test.c'.
1247
1248    When the target pattern does not contain a slash (and it usually does
1249 not), directory names in the file names are removed from the file name
1250 before it is compared with the target prefix and suffix.  After the
1251 comparison of the file name to the target pattern, the directory names,
1252 along with the slash that ends them, are added on to the prerequisite
1253 file names generated from the pattern rule's prerequisite patterns and
1254 the file name.  The directories are ignored only for the purpose of
1255 finding an implicit rule to use, not in the application of that rule.
1256 Thus, 'e%t' matches the file name 'src/eat', with 'src/a' as the stem.
1257 When prerequisites are turned into file names, the directories from the
1258 stem are added at the front, while the rest of the stem is substituted
1259 for the '%'.  The stem 'src/a' with a prerequisite pattern 'c%r' gives
1260 the file name 'src/car'.
1261
1262    A pattern rule can be used to build a given file only if there is a
1263 target pattern that matches the file name, _and_ all prerequisites in
1264 that rule either exist or can be built.  The rules you write take
1265 precedence over those that are built in.  Note however, that a rule
1266 whose prerequisites actually exist or are mentioned always takes
1267 priority over a rule with prerequisites that must be made by chaining
1268 other implicit rules.
1269
1270    It is possible that more than one pattern rule will meet these
1271 criteria.  In that case, 'make' will choose the rule with the shortest
1272 stem (that is, the pattern that matches most specifically).  If more
1273 than one pattern rule has the shortest stem, 'make' will choose the
1274 first one found in the makefile.
1275
1276    This algorithm results in more specific rules being preferred over
1277 more generic ones; for example:
1278
1279      %.o: %.c
1280              $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
1281
1282      %.o : %.f
1283              $(COMPILE.F) $(OUTPUT_OPTION) $<
1284
1285      lib/%.o: lib/%.c
1286              $(CC) -fPIC -c $(CFLAGS) $(CPPFLAGS) $< -o $@
1287
1288    Given these rules and asked to build 'bar.o' where both 'bar.c' and
1289 'bar.f' exist, 'make' will choose the first rule and compile 'bar.c'
1290 into 'bar.o'.  In the same situation where 'bar.c' does not exist, then
1291 'make' will choose the second rule and compile 'bar.f' into 'bar.o'.
1292
1293    If 'make' is asked to build 'lib/bar.o' and both 'lib/bar.c' and
1294 'lib/bar.f' exist, then the third rule will be chosen since the stem for
1295 this rule ('bar') is shorter than the stem for the first rule
1296 ('lib/bar').  If 'lib/bar.c' does not exist then the third rule is not
1297 eligible and the second rule will be used, even though the stem is
1298 longer.
1299
1300 \1f
1301 File: make.info,  Node: Match-Anything Rules,  Next: Canceling Rules,  Prev: Pattern Match,  Up: Pattern Rules
1302
1303 10.5.5 Match-Anything Pattern Rules
1304 -----------------------------------
1305
1306 When a pattern rule's target is just '%', it matches any file name
1307 whatever.  We call these rules "match-anything" rules.  They are very
1308 useful, but it can take a lot of time for 'make' to think about them,
1309 because it must consider every such rule for each file name listed
1310 either as a target or as a prerequisite.
1311
1312    Suppose the makefile mentions 'foo.c'.  For this target, 'make' would
1313 have to consider making it by linking an object file 'foo.c.o', or by C
1314 compilation-and-linking in one step from 'foo.c.c', or by Pascal
1315 compilation-and-linking from 'foo.c.p', and many other possibilities.
1316
1317    We know these possibilities are ridiculous since 'foo.c' is a C
1318 source file, not an executable.  If 'make' did consider these
1319 possibilities, it would ultimately reject them, because files such as
1320 'foo.c.o' and 'foo.c.p' would not exist.  But these possibilities are so
1321 numerous that 'make' would run very slowly if it had to consider them.
1322
1323    To gain speed, we have put various constraints on the way 'make'
1324 considers match-anything rules.  There are two different constraints
1325 that can be applied, and each time you define a match-anything rule you
1326 must choose one or the other for that rule.
1327
1328    One choice is to mark the match-anything rule as "terminal" by
1329 defining it with a double colon.  When a rule is terminal, it does not
1330 apply unless its prerequisites actually exist.  Prerequisites that could
1331 be made with other implicit rules are not good enough.  In other words,
1332 no further chaining is allowed beyond a terminal rule.
1333
1334    For example, the built-in implicit rules for extracting sources from
1335 RCS and SCCS files are terminal; as a result, if the file 'foo.c,v' does
1336 not exist, 'make' will not even consider trying to make it as an
1337 intermediate file from 'foo.c,v.o' or from 'RCS/SCCS/s.foo.c,v'.  RCS
1338 and SCCS files are generally ultimate source files, which should not be
1339 remade from any other files; therefore, 'make' can save time by not
1340 looking for ways to remake them.
1341
1342    If you do not mark the match-anything rule as terminal, then it is
1343 non-terminal.  A non-terminal match-anything rule cannot apply to a
1344 prerequisite of an implicit rule, or to a file name that indicates a
1345 specific type of data.  A file name indicates a specific type of data if
1346 some non-match-anything implicit rule target matches it.
1347
1348    For example, the file name 'foo.c' matches the target for the pattern
1349 rule '%.c : %.y' (the rule to run Yacc).  Regardless of whether this
1350 rule is actually applicable (which happens only if there is a file
1351 'foo.y'), the fact that its target matches is enough to prevent
1352 consideration of any non-terminal match-anything rules for the file
1353 'foo.c'.  Thus, 'make' will not even consider trying to make 'foo.c' as
1354 an executable file from 'foo.c.o', 'foo.c.c', 'foo.c.p', etc.
1355
1356    The motivation for this constraint is that non-terminal
1357 match-anything rules are used for making files containing specific types
1358 of data (such as executable files) and a file name with a recognized
1359 suffix indicates some other specific type of data (such as a C source
1360 file).
1361
1362    Special built-in dummy pattern rules are provided solely to recognize
1363 certain file names so that non-terminal match-anything rules will not be
1364 considered.  These dummy rules have no prerequisites and no recipes, and
1365 they are ignored for all other purposes.  For example, the built-in
1366 implicit rule
1367
1368      %.p :
1369
1370 exists to make sure that Pascal source files such as 'foo.p' match a
1371 specific target pattern and thereby prevent time from being wasted
1372 looking for 'foo.p.o' or 'foo.p.c'.
1373
1374    Dummy pattern rules such as the one for '%.p' are made for every
1375 suffix listed as valid for use in suffix rules (*note Old-Fashioned
1376 Suffix Rules: Suffix Rules.).
1377
1378 \1f
1379 File: make.info,  Node: Canceling Rules,  Prev: Match-Anything Rules,  Up: Pattern Rules
1380
1381 10.5.6 Canceling Implicit Rules
1382 -------------------------------
1383
1384 You can override a built-in implicit rule (or one you have defined
1385 yourself) by defining a new pattern rule with the same target and
1386 prerequisites, but a different recipe.  When the new rule is defined,
1387 the built-in one is replaced.  The new rule's position in the sequence
1388 of implicit rules is determined by where you write the new rule.
1389
1390    You can cancel a built-in implicit rule by defining a pattern rule
1391 with the same target and prerequisites, but no recipe.  For example, the
1392 following would cancel the rule that runs the assembler:
1393
1394      %.o : %.s
1395
1396 \1f
1397 File: make.info,  Node: Last Resort,  Next: Suffix Rules,  Prev: Pattern Rules,  Up: Implicit Rules
1398
1399 10.6 Defining Last-Resort Default Rules
1400 =======================================
1401
1402 You can define a last-resort implicit rule by writing a terminal
1403 match-anything pattern rule with no prerequisites (*note Match-Anything
1404 Rules::).  This is just like any other pattern rule; the only thing
1405 special about it is that it will match any target.  So such a rule's
1406 recipe is used for all targets and prerequisites that have no recipe of
1407 their own and for which no other implicit rule applies.
1408
1409    For example, when testing a makefile, you might not care if the
1410 source files contain real data, only that they exist.  Then you might do
1411 this:
1412
1413      %::
1414              touch $@
1415
1416 to cause all the source files needed (as prerequisites) to be created
1417 automatically.
1418
1419    You can instead define a recipe to be used for targets for which
1420 there are no rules at all, even ones which don't specify recipes.  You
1421 do this by writing a rule for the target '.DEFAULT'.  Such a rule's
1422 recipe is used for all prerequisites which do not appear as targets in
1423 any explicit rule, and for which no implicit rule applies.  Naturally,
1424 there is no '.DEFAULT' rule unless you write one.
1425
1426    If you use '.DEFAULT' with no recipe or prerequisites:
1427
1428      .DEFAULT:
1429
1430 the recipe previously stored for '.DEFAULT' is cleared.  Then 'make'
1431 acts as if you had never defined '.DEFAULT' at all.
1432
1433    If you do not want a target to get the recipe from a match-anything
1434 pattern rule or '.DEFAULT', but you also do not want any recipe to be
1435 run for the target, you can give it an empty recipe (*note Defining
1436 Empty Recipes: Empty Recipes.).
1437
1438    You can use a last-resort rule to override part of another makefile.
1439 *Note Overriding Part of Another Makefile: Overriding Makefiles.
1440
1441 \1f
1442 File: make.info,  Node: Suffix Rules,  Next: Implicit Rule Search,  Prev: Last Resort,  Up: Implicit Rules
1443
1444 10.7 Old-Fashioned Suffix Rules
1445 ===============================
1446
1447 "Suffix rules" are the old-fashioned way of defining implicit rules for
1448 'make'.  Suffix rules are obsolete because pattern rules are more
1449 general and clearer.  They are supported in GNU 'make' for compatibility
1450 with old makefiles.  They come in two kinds: "double-suffix" and
1451 "single-suffix".
1452
1453    A double-suffix rule is defined by a pair of suffixes: the target
1454 suffix and the source suffix.  It matches any file whose name ends with
1455 the target suffix.  The corresponding implicit prerequisite is made by
1456 replacing the target suffix with the source suffix in the file name.  A
1457 two-suffix rule '.c.o' (whose target and source suffixes are '.o' and
1458 '.c') is equivalent to the pattern rule '%.o : %.c'.
1459
1460    A single-suffix rule is defined by a single suffix, which is the
1461 source suffix.  It matches any file name, and the corresponding implicit
1462 prerequisite name is made by appending the source suffix.  A
1463 single-suffix rule whose source suffix is '.c' is equivalent to the
1464 pattern rule '% : %.c'.
1465
1466    Suffix rule definitions are recognized by comparing each rule's
1467 target against a defined list of known suffixes.  When 'make' sees a
1468 rule whose target is a known suffix, this rule is considered a
1469 single-suffix rule.  When 'make' sees a rule whose target is two known
1470 suffixes concatenated, this rule is taken as a double-suffix rule.
1471
1472    For example, '.c' and '.o' are both on the default list of known
1473 suffixes.  Therefore, if you define a rule whose target is '.c.o',
1474 'make' takes it to be a double-suffix rule with source suffix '.c' and
1475 target suffix '.o'.  Here is the old-fashioned way to define the rule
1476 for compiling a C source file:
1477
1478      .c.o:
1479              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
1480
1481    Suffix rules cannot have any prerequisites of their own.  If they
1482 have any, they are treated as normal files with funny names, not as
1483 suffix rules.  Thus, the rule:
1484
1485      .c.o: foo.h
1486              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
1487
1488 tells how to make the file '.c.o' from the prerequisite file 'foo.h',
1489 and is not at all like the pattern rule:
1490
1491      %.o: %.c foo.h
1492              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
1493
1494 which tells how to make '.o' files from '.c' files, and makes all '.o'
1495 files using this pattern rule also depend on 'foo.h'.
1496
1497    Suffix rules with no recipe are also meaningless.  They do not remove
1498 previous rules as do pattern rules with no recipe (*note Canceling
1499 Implicit Rules: Canceling Rules.).  They simply enter the suffix or pair
1500 of suffixes concatenated as a target in the data base.
1501
1502    The known suffixes are simply the names of the prerequisites of the
1503 special target '.SUFFIXES'.  You can add your own suffixes by writing a
1504 rule for '.SUFFIXES' that adds more prerequisites, as in:
1505
1506      .SUFFIXES: .hack .win
1507
1508 which adds '.hack' and '.win' to the end of the list of suffixes.
1509
1510    If you wish to eliminate the default known suffixes instead of just
1511 adding to them, write a rule for '.SUFFIXES' with no prerequisites.  By
1512 special dispensation, this eliminates all existing prerequisites of
1513 '.SUFFIXES'.  You can then write another rule to add the suffixes you
1514 want.  For example,
1515
1516      .SUFFIXES:            # Delete the default suffixes
1517      .SUFFIXES: .c .o .h   # Define our suffix list
1518
1519    The '-r' or '--no-builtin-rules' flag causes the default list of
1520 suffixes to be empty.
1521
1522    The variable 'SUFFIXES' is defined to the default list of suffixes
1523 before 'make' reads any makefiles.  You can change the list of suffixes
1524 with a rule for the special target '.SUFFIXES', but that does not alter
1525 this variable.
1526
1527 \1f
1528 File: make.info,  Node: Implicit Rule Search,  Prev: Suffix Rules,  Up: Implicit Rules
1529
1530 10.8 Implicit Rule Search Algorithm
1531 ===================================
1532
1533 Here is the procedure 'make' uses for searching for an implicit rule for
1534 a target T.  This procedure is followed for each double-colon rule with
1535 no recipe, for each target of ordinary rules none of which have a
1536 recipe, and for each prerequisite that is not the target of any rule.
1537 It is also followed recursively for prerequisites that come from
1538 implicit rules, in the search for a chain of rules.
1539
1540    Suffix rules are not mentioned in this algorithm because suffix rules
1541 are converted to equivalent pattern rules once the makefiles have been
1542 read in.
1543
1544    For an archive member target of the form 'ARCHIVE(MEMBER)', the
1545 following algorithm is run twice, first using the entire target name T,
1546 and second using '(MEMBER)' as the target T if the first run found no
1547 rule.
1548
1549   1. Split T into a directory part, called D, and the rest, called N.
1550      For example, if T is 'src/foo.o', then D is 'src/' and N is
1551      'foo.o'.
1552
1553   2. Make a list of all the pattern rules one of whose targets matches T
1554      or N.  If the target pattern contains a slash, it is matched
1555      against T; otherwise, against N.
1556
1557   3. If any rule in that list is _not_ a match-anything rule, or if T is
1558      a prerequisite of an implicit rule, then remove all non-terminal
1559      match-anything rules from the list.
1560
1561   4. Remove from the list all rules with no recipe.
1562
1563   5. For each pattern rule in the list:
1564
1565        a. Find the stem S, which is the nonempty part of T or N matched
1566           by the '%' in the target pattern.
1567
1568        b. Compute the prerequisite names by substituting S for '%'; if
1569           the target pattern does not contain a slash, append D to the
1570           front of each prerequisite name.
1571
1572        c. Test whether all the prerequisites exist or ought to exist.
1573           (If a file name is mentioned in the makefile as a target or as
1574           an explicit prerequisite, then we say it ought to exist.)
1575
1576           If all prerequisites exist or ought to exist, or there are no
1577           prerequisites, then this rule applies.
1578
1579   6. If no pattern rule has been found so far, try harder.  For each
1580      pattern rule in the list:
1581
1582        a. If the rule is terminal, ignore it and go on to the next rule.
1583
1584        b. Compute the prerequisite names as before.
1585
1586        c. Test whether all the prerequisites exist or ought to exist.
1587
1588        d. For each prerequisite that does not exist, follow this
1589           algorithm recursively to see if the prerequisite can be made
1590           by an implicit rule.
1591
1592        e. If all prerequisites exist, ought to exist, or can be made by
1593           implicit rules, then this rule applies.
1594
1595   7. If no implicit rule applies, the rule for '.DEFAULT', if any,
1596      applies.  In that case, give T the same recipe that '.DEFAULT' has.
1597      Otherwise, there is no recipe for T.
1598
1599    Once a rule that applies has been found, for each target pattern of
1600 the rule other than the one that matched T or N, the '%' in the pattern
1601 is replaced with S and the resultant file name is stored until the
1602 recipe to remake the target file T is executed.  After the recipe is
1603 executed, each of these stored file names are entered into the data base
1604 and marked as having been updated and having the same update status as
1605 the file T.
1606
1607    When the recipe of a pattern rule is executed for T, the automatic
1608 variables are set corresponding to the target and prerequisites.  *Note
1609 Automatic Variables::.
1610
1611 \1f
1612 File: make.info,  Node: Archives,  Next: Extending make,  Prev: Implicit Rules,  Up: Top
1613
1614 11 Using 'make' to Update Archive Files
1615 ***************************************
1616
1617 "Archive files" are files containing named sub-files called "members";
1618 they are maintained with the program 'ar' and their main use is as
1619 subroutine libraries for linking.
1620
1621 * Menu:
1622
1623 * Archive Members::             Archive members as targets.
1624 * Archive Update::              The implicit rule for archive member targets.
1625 * Archive Pitfalls::            Dangers to watch out for when using archives.
1626 * Archive Suffix Rules::        You can write a special kind of suffix rule
1627                                   for updating archives.
1628
1629 \1f
1630 File: make.info,  Node: Archive Members,  Next: Archive Update,  Prev: Archives,  Up: Archives
1631
1632 11.1 Archive Members as Targets
1633 ===============================
1634
1635 An individual member of an archive file can be used as a target or
1636 prerequisite in 'make'.  You specify the member named MEMBER in archive
1637 file ARCHIVE as follows:
1638
1639      ARCHIVE(MEMBER)
1640
1641 This construct is available only in targets and prerequisites, not in
1642 recipes!  Most programs that you might use in recipes do not support
1643 this syntax and cannot act directly on archive members.  Only 'ar' and
1644 other programs specifically designed to operate on archives can do so.
1645 Therefore, valid recipes to update an archive member target probably
1646 must use 'ar'.  For example, this rule says to create a member 'hack.o'
1647 in archive 'foolib' by copying the file 'hack.o':
1648
1649      foolib(hack.o) : hack.o
1650              ar cr foolib hack.o
1651
1652    In fact, nearly all archive member targets are updated in just this
1653 way and there is an implicit rule to do it for you.  *Please note:* The
1654 'c' flag to 'ar' is required if the archive file does not already exist.
1655
1656    To specify several members in the same archive, you can write all the
1657 member names together between the parentheses.  For example:
1658
1659      foolib(hack.o kludge.o)
1660
1661 is equivalent to:
1662
1663      foolib(hack.o) foolib(kludge.o)
1664
1665    You can also use shell-style wildcards in an archive member
1666 reference.  *Note Using Wildcard Characters in File Names: Wildcards.
1667 For example, 'foolib(*.o)' expands to all existing members of the
1668 'foolib' archive whose names end in '.o'; perhaps 'foolib(hack.o)
1669 foolib(kludge.o)'.
1670
1671 \1f
1672 File: make.info,  Node: Archive Update,  Next: Archive Pitfalls,  Prev: Archive Members,  Up: Archives
1673
1674 11.2 Implicit Rule for Archive Member Targets
1675 =============================================
1676
1677 Recall that a target that looks like 'A(M)' stands for the member named
1678 M in the archive file A.
1679
1680    When 'make' looks for an implicit rule for such a target, as a
1681 special feature it considers implicit rules that match '(M)', as well as
1682 those that match the actual target 'A(M)'.
1683
1684    This causes one special rule whose target is '(%)' to match.  This
1685 rule updates the target 'A(M)' by copying the file M into the archive.
1686 For example, it will update the archive member target 'foo.a(bar.o)' by
1687 copying the _file_ 'bar.o' into the archive 'foo.a' as a _member_ named
1688 'bar.o'.
1689
1690    When this rule is chained with others, the result is very powerful.
1691 Thus, 'make "foo.a(bar.o)"' (the quotes are needed to protect the '('
1692 and ')' from being interpreted specially by the shell) in the presence
1693 of a file 'bar.c' is enough to cause the following recipe to be run,
1694 even without a makefile:
1695
1696      cc -c bar.c -o bar.o
1697      ar r foo.a bar.o
1698      rm -f bar.o
1699
1700 Here 'make' has envisioned the file 'bar.o' as an intermediate file.
1701 *Note Chains of Implicit Rules: Chained Rules.
1702
1703    Implicit rules such as this one are written using the automatic
1704 variable '$%'.  *Note Automatic Variables::.
1705
1706    An archive member name in an archive cannot contain a directory name,
1707 but it may be useful in a makefile to pretend that it does.  If you
1708 write an archive member target 'foo.a(dir/file.o)', 'make' will perform
1709 automatic updating with this recipe:
1710
1711      ar r foo.a dir/file.o
1712
1713 which has the effect of copying the file 'dir/file.o' into a member
1714 named 'file.o'.  In connection with such usage, the automatic variables
1715 '%D' and '%F' may be useful.
1716
1717 * Menu:
1718
1719 * Archive Symbols::             How to update archive symbol directories.
1720
1721 \1f
1722 File: make.info,  Node: Archive Symbols,  Prev: Archive Update,  Up: Archive Update
1723
1724 11.2.1 Updating Archive Symbol Directories
1725 ------------------------------------------
1726
1727 An archive file that is used as a library usually contains a special
1728 member named '__.SYMDEF' that contains a directory of the external
1729 symbol names defined by all the other members.  After you update any
1730 other members, you need to update '__.SYMDEF' so that it will summarize
1731 the other members properly.  This is done by running the 'ranlib'
1732 program:
1733
1734      ranlib ARCHIVEFILE
1735
1736    Normally you would put this command in the rule for the archive file,
1737 and make all the members of the archive file prerequisites of that rule.
1738 For example,
1739
1740      libfoo.a: libfoo.a(x.o) libfoo.a(y.o) ...
1741              ranlib libfoo.a
1742
1743 The effect of this is to update archive members 'x.o', 'y.o', etc., and
1744 then update the symbol directory member '__.SYMDEF' by running 'ranlib'.
1745 The rules for updating the members are not shown here; most likely you
1746 can omit them and use the implicit rule which copies files into the
1747 archive, as described in the preceding section.
1748
1749    This is not necessary when using the GNU 'ar' program, which updates
1750 the '__.SYMDEF' member automatically.
1751
1752 \1f
1753 File: make.info,  Node: Archive Pitfalls,  Next: Archive Suffix Rules,  Prev: Archive Update,  Up: Archives
1754
1755 11.3 Dangers When Using Archives
1756 ================================
1757
1758 It is important to be careful when using parallel execution (the '-j'
1759 switch; *note Parallel Execution: Parallel.) and archives.  If multiple
1760 'ar' commands run at the same time on the same archive file, they will
1761 not know about each other and can corrupt the file.
1762
1763    Possibly a future version of 'make' will provide a mechanism to
1764 circumvent this problem by serializing all recipes that operate on the
1765 same archive file.  But for the time being, you must either write your
1766 makefiles to avoid this problem in some other way, or not use '-j'.
1767
1768 \1f
1769 File: make.info,  Node: Archive Suffix Rules,  Prev: Archive Pitfalls,  Up: Archives
1770
1771 11.4 Suffix Rules for Archive Files
1772 ===================================
1773
1774 You can write a special kind of suffix rule for dealing with archive
1775 files.  *Note Suffix Rules::, for a full explanation of suffix rules.
1776 Archive suffix rules are obsolete in GNU 'make', because pattern rules
1777 for archives are a more general mechanism (*note Archive Update::).  But
1778 they are retained for compatibility with other 'make's.
1779
1780    To write a suffix rule for archives, you simply write a suffix rule
1781 using the target suffix '.a' (the usual suffix for archive files).  For
1782 example, here is the old-fashioned suffix rule to update a library
1783 archive from C source files:
1784
1785      .c.a:
1786              $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $*.o
1787              $(AR) r $@ $*.o
1788              $(RM) $*.o
1789
1790 This works just as if you had written the pattern rule:
1791
1792      (%.o): %.c
1793              $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $*.o
1794              $(AR) r $@ $*.o
1795              $(RM) $*.o
1796
1797    In fact, this is just what 'make' does when it sees a suffix rule
1798 with '.a' as the target suffix.  Any double-suffix rule '.X.a' is
1799 converted to a pattern rule with the target pattern '(%.o)' and a
1800 prerequisite pattern of '%.X'.
1801
1802    Since you might want to use '.a' as the suffix for some other kind of
1803 file, 'make' also converts archive suffix rules to pattern rules in the
1804 normal way (*note Suffix Rules::).  Thus a double-suffix rule '.X.a'
1805 produces two pattern rules: '(%.o): %.X' and '%.a: %.X'.
1806
1807 \1f
1808 File: make.info,  Node: Extending make,  Next: Integrating make,  Prev: Archives,  Up: Top
1809
1810 12 Extending GNU 'make'
1811 ***********************
1812
1813 GNU 'make' provides many advanced capabilities, including many useful
1814 functions.  However, it does not contain a complete programming language
1815 and so it has limitations.  Sometimes these limitations can be overcome
1816 through use of the 'shell' function to invoke a separate program,
1817 although this can be inefficient.
1818
1819    In cases where the built-in capabilities of GNU 'make' are
1820 insufficient to your requirements there are two options for extending
1821 'make'.  On systems where it's provided, you can utilize GNU Guile as an
1822 embedded scripting language (*note GNU Guile Integration: Guile
1823 Integration.).  On systems which support dynamically loadable objects,
1824 you can write your own extension in any language (which can be compiled
1825 into such an object) and load it to provide extended capabilities (*note
1826 The 'load' Directive: load Directive.).
1827
1828 * Menu:
1829
1830 * Guile Integration::           Using Guile as an embedded scripting language.
1831 * Loading Objects::             Loading dynamic objects as extensions.
1832
1833 \1f
1834 File: make.info,  Node: Guile Integration,  Next: Loading Objects,  Prev: Extending make,  Up: Extending make
1835
1836 12.1 GNU Guile Integration
1837 ==========================
1838
1839 GNU 'make' may be built with support for GNU Guile as an embedded
1840 extension language.  Guile implements the Scheme language.  A review of
1841 GNU Guile and the Scheme language and its features is beyond the scope
1842 of this manual: see the documentation for GNU Guile and Scheme.
1843
1844    You can determine if 'make' contains support for Guile by examining
1845 the '.FEATURES' variable; it will contain the word GUILE if Guile
1846 support is available.
1847
1848    The Guile integration provides one new 'make' function: 'guile'.  The
1849 'guile' function takes one argument which is first expanded by 'make' in
1850 the normal fashion, then passed to the GNU Guile evaluator.  The result
1851 of the evaluator is converted into a string and used as the expansion of
1852 the 'guile' function in the makefile.
1853
1854    In addition, GNU 'make' exposes Guile procedures for use in Guile
1855 scripts.
1856
1857 * Menu:
1858
1859 * Guile Types::                 Converting Guile types to 'make' strings.
1860 * Guile Interface::             Invoking 'make' functions from Guile.
1861 * Guile Example::               Example using Guile in 'make'.
1862
1863 \1f
1864 File: make.info,  Node: Guile Types,  Next: Guile Interface,  Prev: Guile Integration,  Up: Guile Integration
1865
1866 12.1.1 Conversion of Guile Types
1867 --------------------------------
1868
1869 There is only one "data type" in 'make': a string.  GNU Guile, on the
1870 other hand, provides a rich variety of different data types.  An
1871 important aspect of the interface between 'make' and GNU Guile is the
1872 conversion of Guile data types into 'make' strings.
1873
1874    This conversion is relevant in two places: when a makefile invokes
1875 the 'guile' function to evaluate a Guile expression, the result of that
1876 evaluation must be converted into a make string so it can be further
1877 evaluated by 'make'.  And secondly, when a Guile script invokes one of
1878 the procedures exported by 'make' the argument provided to the procedure
1879 must be converted into a string.
1880
1881    The conversion of Guile types into 'make' strings is as below:
1882
1883 '#f'
1884      False is converted into the empty string: in 'make' conditionals
1885      the empty string is considered false.
1886
1887 '#t'
1888      True is converted to the string '#t': in 'make' conditionals any
1889      non-empty string is considered true.
1890
1891 'symbol'
1892 'number'
1893      A symbol or number is converted into the string representation of
1894      that symbol or number.
1895
1896 'character'
1897      A printable character is converted to the same character.
1898
1899 'string'
1900      A string containing only printable characters is converted to the
1901      same string.
1902
1903 'list'
1904      A list is converted recursively according to the above rules.  This
1905      implies that any structured list will be flattened (that is, a
1906      result of ''(a b (c d) e)' will be converted to the 'make' string
1907      'a b c d e').
1908
1909 'other'
1910      Any other Guile type results in an error.  In future versions of
1911      'make', other Guile types may be converted.
1912
1913    The translation of '#f' (to the empty string) and '#t' (to the
1914 non-empty string '#t') is designed to allow you to use Guile boolean
1915 results directly as 'make' boolean conditions.  For example:
1916
1917      $(if $(guile (access? "myfile" R_OK)),$(info myfile exists))
1918
1919    As a consequence of these conversion rules you must consider the
1920 result of your Guile script, as that result will be converted into a
1921 string and parsed by 'make'.  If there is no natural result for the
1922 script (that is, the script exists solely for its side-effects), you
1923 should add '#f' as the final expression in order to avoid syntax errors
1924 in your makefile.
1925
1926 \1f
1927 File: make.info,  Node: Guile Interface,  Next: Guile Example,  Prev: Guile Types,  Up: Guile Integration
1928
1929 12.1.2 Interfaces from Guile to 'make'
1930 --------------------------------------
1931
1932 In addition to the 'guile' function available in makefiles, 'make'
1933 exposes some procedures for use in your Guile scripts.  At startup
1934 'make' creates a new Guile module, 'gnu make', and exports these
1935 procedures as public interfaces from that module:
1936
1937 'gmk-expand'
1938      This procedure takes a single argument which is converted into a
1939      string.  The string is expanded by 'make' using normal 'make'
1940      expansion rules.  The result of the expansion is converted into a
1941      Guile string and provided as the result of the procedure.
1942
1943 'gmk-eval'
1944      This procedure takes a single argument which is converted into a
1945      string.  The string is evaluated by 'make' as if it were a
1946      makefile.  This is the same capability available via the 'eval'
1947      function (*note Eval Function::).  The result of the 'gmk-eval'
1948      procedure is always the empty string.
1949
1950      Note that 'gmk-eval' is not quite the same as using 'gmk-expand'
1951      with the 'eval' function: in the latter case the evaluated string
1952      will be expanded _twice_; first by 'gmk-expand', then again by the
1953      'eval' function.
1954
1955 \1f
1956 File: make.info,  Node: Guile Example,  Prev: Guile Interface,  Up: Guile Integration
1957
1958 12.1.3 Example Using Guile in 'make'
1959 ------------------------------------
1960
1961 Here is a very simple example using GNU Guile to manage writing to a
1962 file.  These Guile procedures simply open a file, allow writing to the
1963 file (one string per line), and close the file.  Note that because we
1964 cannot store complex values such as Guile ports in 'make' variables,
1965 we'll keep the port as a global variable in the Guile interpreter.
1966
1967    You can create Guile functions easily using 'define'/'endef' to
1968 create a Guile script, then use the 'guile' function to internalize it:
1969
1970      define GUILEIO
1971      ;; A simple Guile IO library for GNU make
1972
1973      (define MKPORT #f)
1974
1975      (define (mkopen name mode)
1976        (set! MKPORT (open-file name mode))
1977        #f)
1978
1979      (define (mkwrite s)
1980        (display s MKPORT)
1981        (newline MKPORT)
1982        #f)
1983
1984      (define (mkclose)
1985        (close-port MKPORT)
1986        #f)
1987
1988      #f
1989      endef
1990
1991      # Internalize the Guile IO functions
1992      $(guile $(GUILEIO))
1993
1994    If you have a significant amount of Guile support code, you might
1995 consider keeping it in a different file (e.g., 'guileio.scm') and then
1996 loading it in your makefile using the 'guile' function:
1997
1998      $(guile (load "guileio.scm"))
1999
2000    An advantage to this method is that when editing 'guileio.scm', your
2001 editor will understand that this file contains Scheme syntax rather than
2002 makefile syntax.
2003
2004    Now you can use these Guile functions to create files.  Suppose you
2005 need to operate on a very large list, which cannot fit on the command
2006 line, but the utility you're using accepts the list as input as well:
2007
2008      prog: $(PREREQS)
2009              @$(guile (mkopen "tmp.out" "w")) \
2010               $(foreach X,$^,$(guile (mkwrite "$(X)"))) \
2011               $(guile (mkclose))
2012              $(LINK) < tmp.out
2013
2014    A more comprehensive suite of file manipulation procedures is
2015 possible of course.  You could, for example, maintain multiple output
2016 files at the same time by choosing a symbol for each one and using it as
2017 the key to a hash table, where the value is a port, then returning the
2018 symbol to be stored in a 'make' variable.
2019
2020 \1f
2021 File: make.info,  Node: Loading Objects,  Prev: Guile Integration,  Up: Extending make
2022
2023 12.2 Loading Dynamic Objects
2024 ============================
2025
2026      Warning: The 'load' directive and extension capability is
2027      considered a "technology preview" in this release of GNU make.  We
2028      encourage you to experiment with this feature and we appreciate any
2029      feedback on it.  However we cannot guarantee to maintain
2030      backward-compatibility in the next release.  Consider using GNU
2031      Guile instead for extending GNU make (*note The 'guile' Function:
2032      Guile Function.).
2033
2034    Many operating systems provide a facility for dynamically loading
2035 compiled objects.  If your system provides this facility, GNU 'make' can
2036 make use of it to load dynamic objects at runtime, providing new
2037 capabilities which may then be invoked by your makefile.
2038
2039    The 'load' directive is used to load a dynamic object.  Once the
2040 object is loaded, a "setup" function will be invoked to allow the object
2041 to initialize itself and register new facilities with GNU 'make'.  A
2042 dynamic object might include new 'make' functions, for example, and the
2043 "setup" function would register them with GNU 'make''s function handling
2044 system.
2045
2046 * Menu:
2047
2048 * load Directive::              Loading dynamic objects as extensions.
2049 * Remaking Loaded Objects::     How loaded objects get remade.
2050 * Loaded Object API::           Programmatic interface for loaded objects.
2051 * Loaded Object Example::       Example of a loaded object
2052
2053 \1f
2054 File: make.info,  Node: load Directive,  Next: Remaking Loaded Objects,  Prev: Loading Objects,  Up: Loading Objects
2055
2056 12.2.1 The 'load' Directive
2057 ---------------------------
2058
2059 Objects are loaded into GNU 'make' by placing the 'load' directive into
2060 your makefile.  The syntax of the 'load' directive is as follows:
2061
2062      load OBJECT-FILE ...
2063
2064    or:
2065
2066      load OBJECT-FILE(SYMBOL-NAME) ...
2067
2068    The file OBJECT-FILE is dynamically loaded by GNU 'make'.  If
2069 OBJECT-FILE does not include a directory path then it is first looked
2070 for in the current directory.  If it is not found there, or a directory
2071 path is included, then system-specific paths will be searched.  If the
2072 load fails for any reason, 'make' will print a message and exit.
2073
2074    If the load succeeds 'make' will invoke an initializing function.
2075
2076    If SYMBOL-NAME is provided, it will be used as the name of the
2077 initializing function.
2078
2079    If no SYMBOL-NAME is provided, the initializing function name is
2080 created by taking the base file name of OBJECT-FILE, up to the first
2081 character which is not a valid symbol name character (alphanumerics and
2082 underscores are valid symbol name characters).  To this prefix will be
2083 appended the suffix '_gmk_setup'.
2084
2085    More than one object file may be loaded with a single 'load'
2086 directive, and both forms of 'load' arguments may be used in the same
2087 directive.
2088
2089    The initializing function will be provided the file name and line
2090 number of the invocation of the 'load' operation.  It should return a
2091 value of type 'int', which must be '0' on failure and non-'0' on
2092 success.  If the return value is '-1', then GNU make will _not_ attempt
2093 to rebuild the object file (*note How Loaded Objects Are Remade:
2094 Remaking Loaded Objects.).
2095
2096    For example:
2097
2098      load ../mk_funcs.so
2099
2100    will load the dynamic object '../mk_funcs.so'.  After the object is
2101 loaded, 'make' will invoke the function (assumed to be defined by the
2102 shared object) 'mk_funcs_gmk_setup'.
2103
2104    On the other hand:
2105
2106      load ../mk_funcs.so(init_mk_func)
2107
2108    will load the dynamic object '../mk_funcs.so'.  After the object is
2109 loaded, 'make' will invoke the function 'init_mk_func'.
2110
2111    Regardless of how many times an object file appears in a 'load'
2112 directive, it will only be loaded (and its setup function will only be
2113 invoked) once.
2114
2115    After an object has been successfully loaded, its file name is
2116 appended to the '.LOADED' variable.
2117
2118    If you would prefer that failure to load a dynamic object not be
2119 reported as an error, you can use the '-load' directive instead of
2120 'load'.  GNU 'make' will not fail and no message will be generated if an
2121 object fails to load.  The failed object is not added to the '.LOADED'
2122 variable, which can then be consulted to determine if the load was
2123 successful.
2124
2125 \1f
2126 File: make.info,  Node: Remaking Loaded Objects,  Next: Loaded Object API,  Prev: load Directive,  Up: Loading Objects
2127
2128 12.2.2 How Loaded Objects Are Remade
2129 ------------------------------------
2130
2131 Loaded objects undergo the same re-make procedure as makefiles (*note
2132 How Makefiles Are Remade: Remaking Makefiles.).  If any loaded object is
2133 recreated, then 'make' will start from scratch and re-read all the
2134 makefiles, and reload the object files again.  It is not necessary for
2135 the loaded object to do anything special to support this.
2136
2137    It's up to the makefile author to provide the rules needed for
2138 rebuilding the loaded object.
2139
2140 \1f
2141 File: make.info,  Node: Loaded Object API,  Next: Loaded Object Example,  Prev: Remaking Loaded Objects,  Up: Loading Objects
2142
2143 12.2.3 Loaded Object Interface
2144 ------------------------------
2145
2146      Warning: For this feature to be useful your extensions will need to
2147      invoke various functions internal to GNU 'make'.  The programming
2148      interfaces provided in this release should not be considered
2149      stable: functions may be added, removed, or change calling
2150      signatures or implementations in future versions of GNU 'make'.
2151
2152    To be useful, loaded objects must be able to interact with GNU
2153 'make'.  This interaction includes both interfaces the loaded object
2154 provides to makefiles and also interfaces 'make' provides to the loaded
2155 object to manipulate 'make''s operation.
2156
2157    The interface between loaded objects and 'make' is defined by the
2158 'gnumake.h' C header file.  All loaded objects written in C should
2159 include this header file.  Any loaded object not written in C will need
2160 to implement the interface defined in this header file.
2161
2162    Typically, a loaded object will register one or more new GNU 'make'
2163 functions using the 'gmk_add_function' routine from within its setup
2164 function.  The implementations of these 'make' functions may make use of
2165 the 'gmk_expand' and 'gmk_eval' routines to perform their tasks, then
2166 optionally return a string as the result of the function expansion.
2167
2168 Loaded Object Licensing
2169 .......................
2170
2171 Every dynamic extension should define the global symbol
2172 'plugin_is_GPL_compatible' to assert that it has been licensed under a
2173 GPL-compatible license.  If this symbol does not exist, 'make' emits a
2174 fatal error and exits when it tries to load your extension.
2175
2176    The declared type of the symbol should be 'int'.  It does not need to
2177 be in any allocated section, though.  The code merely asserts that the
2178 symbol exists in the global scope.  Something like this is enough:
2179
2180      int plugin_is_GPL_compatible;
2181
2182 Data Structures
2183 ...............
2184
2185 'gmk_floc'
2186      This structure represents a filename/location pair.  It is provided
2187      when defining items, so GNU 'make' can inform the user later where
2188      the definition occurred if necessary.
2189
2190 Registering Functions
2191 .....................
2192
2193 There is currently one way for makefiles to invoke operations provided
2194 by the loaded object: through the 'make' function call interface.  A
2195 loaded object can register one or more new functions which may then be
2196 invoked from within the makefile in the same way as any other function.
2197
2198    Use 'gmk_add_function' to create a new 'make' function.  Its
2199 arguments are as follows:
2200
2201 'name'
2202      The function name.  This is what the makefile should use to invoke
2203      the function.  The name must be between 1 and 255 characters long
2204      and it may only contain alphanumeric, period ('.'), dash ('-'), and
2205      underscore ('_') characters.  It may not begin with a period.
2206
2207 'func_ptr'
2208      A pointer to a function that 'make' will invoke when it expands the
2209      function in a makefile.  This function must be defined by the
2210      loaded object.
2211
2212 'min_args'
2213      The minimum number of arguments the function will accept.  Must be
2214      between 0 and 255.  GNU 'make' will check this and fail before
2215      invoking 'func_ptr' if the function was invoked with too few
2216      arguments.
2217
2218 'max_args'
2219      The maximum number of arguments the function will accept.  Must be
2220      between 0 and 255.  GNU 'make' will check this and fail before
2221      invoking 'func_ptr' if the function was invoked with too few
2222      arguments.  If the value is 0, then any number of arguments is
2223      accepted.  If the value is greater than 0, then it must be greater
2224      than or equal to 'min_args'.
2225
2226 'flags'
2227      Flags that specify how this function will operate; the desired
2228      flags should be OR'd together.  If the 'GMK_FUNC_NOEXPAND' flag is
2229      given then the function arguments will not be expanded before the
2230      function is called; otherwise they will be expanded first.
2231
2232 Registered Function Interface
2233 .............................
2234
2235 A function registered with 'make' must match the 'gmk_func_ptr' type.
2236 It will be invoked with three parameters: 'name' (the name of the
2237 function), 'argc' (the number of arguments to the function), and 'argv'
2238 (an array of pointers to arguments to the function).  The last pointer
2239 (that is, 'argv[argc]') will be null ('0').
2240
2241    The return value of the function is the result of expanding the
2242 function.  If the function expands to nothing the return value may be
2243 null.  Otherwise, it must be a pointer to a string created with
2244 'gmk_alloc'.  Once the function returns, 'make' owns this string and
2245 will free it when appropriate; it cannot be accessed by the loaded
2246 object.
2247
2248 GNU 'make' Facilities
2249 .....................
2250
2251 There are some facilities exported by GNU 'make' for use by loaded
2252 objects.  Typically these would be run from within the setup function
2253 and/or the functions registered via 'gmk_add_function', to retrieve or
2254 modify the data 'make' works with.
2255
2256 'gmk_expand'
2257      This function takes a string and expands it using 'make' expansion
2258      rules.  The result of the expansion is returned in a nil-terminated
2259      string buffer.  The caller is responsible for calling 'gmk_free'
2260      with a pointer to the returned buffer when done.
2261
2262 'gmk_eval'
2263      This function takes a buffer and evaluates it as a segment of
2264      makefile syntax.  This function can be used to define new
2265      variables, new rules, etc.  It is equivalent to using the 'eval'
2266      'make' function.
2267
2268    Note that there is a difference between 'gmk_eval' and calling
2269 'gmk_expand' with a string using the 'eval' function: in the latter case
2270 the string will be expanded _twice_; once by 'gmk_expand' and then again
2271 by the 'eval' function.  Using 'gmk_eval' the buffer is only expanded
2272 once, at most (as it's read by the 'make' parser).
2273
2274 Memory Management
2275 .................
2276
2277 Some systems allow for different memory management schemes.  Thus you
2278 should never pass memory that you've allocated directly to any 'make'
2279 function, nor should you attempt to directly free any memory returned to
2280 you by any 'make' function.  Instead, use the 'gmk_alloc' and 'gmk_free'
2281 functions.
2282
2283    In particular, the string returned to 'make' by a function registered
2284 using 'gmk_add_function' _must_ be allocated using 'gmk_alloc', and the
2285 string returned from the 'make' 'gmk_expand' function _must_ be freed
2286 (when no longer needed) using 'gmk_free'.
2287
2288 'gmk_alloc'
2289      Return a pointer to a newly-allocated buffer.  This function will
2290      always return a valid pointer; if not enough memory is available
2291      'make' will exit.
2292
2293 'gmk_free'
2294      Free a buffer returned to you by 'make'.  Once the 'gmk_free'
2295      function returns the string will no longer be valid.
2296
2297 \1f
2298 File: make.info,  Node: Loaded Object Example,  Prev: Loaded Object API,  Up: Loading Objects
2299
2300 12.2.4 Example Loaded Object
2301 ----------------------------
2302
2303 Let's suppose we wanted to write a new GNU 'make' function that would
2304 create a temporary file and return its name.  We would like our function
2305 to take a prefix as an argument.  First we can write the function in a
2306 file 'mk_temp.c':
2307
2308      #include <stdlib.h>
2309      #include <stdlib.h>
2310      #include <stdio.h>
2311      #include <string.h>
2312      #include <unistd.h>
2313      #include <errno.h>
2314
2315      #include <gnumake.h>
2316
2317      int plugin_is_GPL_compatible;
2318
2319      char *
2320      gen_tmpfile(const char *nm, int argc, char **argv)
2321      {
2322        int fd;
2323
2324        /* Compute the size of the filename and allocate space for it.  */
2325        int len = strlen (argv[0]) + 6 + 1;
2326        char *buf = gmk_alloc (len);
2327
2328        strcpy (buf, argv[0]);
2329        strcat (buf, "XXXXXX");
2330
2331        fd = mkstemp(buf);
2332        if (fd >= 0)
2333          {
2334            /* Don't leak the file descriptor.  */
2335            close (fd);
2336            return buf;
2337          }
2338
2339        /* Failure.  */
2340        fprintf (stderr, "mkstemp(%s) failed: %s\n", buf, strerror (errno));
2341        gmk_free (buf);
2342        return NULL;
2343      }
2344
2345      int
2346      mk_temp_gmk_setup ()
2347      {
2348        /* Register the function with make name "mk-temp".  */
2349        gmk_add_function ("mk-temp", gen_tmpfile, 1, 1, 1);
2350        return 1;
2351      }
2352
2353    Next, we will write a makefile that can build this shared object,
2354 load it, and use it:
2355
2356      all:
2357              @echo Temporary file: $(mk-temp tmpfile.)
2358
2359      load mk_temp.so
2360
2361      mk_temp.so: mk_temp.c
2362              $(CC) -shared -fPIC -o $ $<
2363
2364    On MS-Windows, due to peculiarities of how shared objects are
2365 produced, the compiler needs to scan the "import library" produced when
2366 building 'make', typically called 'libgnumake-VERSION.dll.a', where
2367 VERSION is the version of the load object API. So the recipe to produce
2368 a shared object will look on Windows like this (assuming the API version
2369 is 1):
2370
2371      mk_temp.dll: mk_temp.c
2372              $(CC) -shared -o $ $< -lgnumake-1
2373
2374    Now when you run 'make' you'll see something like:
2375
2376      $ make
2377      cc -shared -fPIC -o mk_temp.so mk_temp.c
2378      Temporary filename: tmpfile.A7JEwd
2379
2380 \1f
2381 File: make.info,  Node: Integrating make,  Next: Features,  Prev: Extending make,  Up: Top
2382
2383 13 Integrating GNU 'make'
2384 *************************
2385
2386 GNU 'make' is often one component in a larger system of tools, including
2387 integrated development environments, compiler toolchains, and others.
2388 The role of 'make' is to start commands and determine whether they
2389 succeeded or not: no special integration is needed to accomplish that.
2390 However, sometimes it is convenient to bind 'make' more tightly with
2391 other parts of the system, both higher-level (tools that invoke 'make')
2392 and lower-level (tools that 'make' invokes).
2393
2394 * Menu:
2395
2396 * Job Slots::                   Share job slots with GNU 'make'.
2397 * Terminal Output::             Control output to terminals.
2398
2399 \1f
2400 File: make.info,  Node: Job Slots,  Next: Terminal Output,  Prev: Integrating make,  Up: Integrating make
2401
2402 13.1 Sharing Job Slots with GNU 'make'
2403 ======================================
2404
2405 GNU 'make' has the ability to run multiple recipes in parallel (*note
2406 Parallel Execution: Parallel.) and to cap the total number of parallel
2407 jobs even across recursive invocations of 'make' (*note Communicating
2408 Options to a Sub-'make': Options/Recursion.).  Tools that 'make' invokes
2409 which are also able to run multiple operations in parallel, either using
2410 multiple threads or multiple processes, can be enhanced to participate
2411 in GNU 'make''s job management facility to ensure that the total number
2412 of active threads/processes running on the system does not exceed the
2413 maximum number of slots provided to GNU 'make'.
2414
2415    GNU 'make' uses a method called the "jobserver" to control the number
2416 of active jobs across recursive invocations.  The actual implementation
2417 of the jobserver varies across different operating systems, but some
2418 fundamental aspects are always true.
2419
2420    First, only command lines that 'make' understands to be recursive
2421 invocations of 'make' (*note How the 'MAKE' Variable Works: MAKE
2422 Variable.) will have access to the jobserver.  When writing makefiles
2423 you must be sure to mark the command as recursive (most commonly by
2424 prefixing the command line with the '+' indicator (*note Recursive Use
2425 of 'make': Recursion.).
2426
2427    Second, 'make' will provide information necessary for accessing the
2428 jobserver through the environment to its children, in the 'MAKEFLAGS'
2429 environment variable.  Tools which want to participate in the jobserver
2430 protocol will need to parse this environment variable, as described in
2431 subsequent sections.
2432
2433    Third, every command 'make' starts has one implicit job slot reserved
2434 for it before it starts.  Any tool which wants to participate in the
2435 jobserver protocol should assume it can always run one job without
2436 having to contact the jobserver at all.
2437
2438    Finally, it's critical that tools that participate in the jobserver
2439 protocol return the exact number of slots they obtained from the
2440 jobserver back to the jobserver before they exit, even under error
2441 conditions.  Remember that the implicit job slot should *not* be
2442 returned to the jobserver!  Returning too few slots means that those
2443 slots will be lost for the rest of the build process; returning too many
2444 slots means that extra slots will be available.  The top-level 'make'
2445 command will print an error message at the end of the build if it
2446 detects an incorrect number of slots available in the jobserver.
2447
2448    As an example, suppose you are implementing a linker which provides
2449 for multithreaded operation.  You would like to enhance the linker so
2450 that if it is invoked by GNU 'make' it can participate in the jobserver
2451 protocol to control how many threads are used during link.  First you
2452 will need to modify the linker to determine if the 'MAKEFLAGS'
2453 environment variable is set.  Next you will need to parse the value of
2454 that variable to determine if the jobserver is available, and how to
2455 access it.  If it is available then you can access it to obtain job
2456 slots controlling how much parallelism your tool can use.  Once done
2457 your tool must return those job slots back to the jobserver.
2458
2459 * Menu:
2460
2461 * POSIX Jobserver::             Using the jobserver on POSIX systems.
2462 * Windows Jobserver::           Using the jobserver on Windows systems.
2463
2464 \1f
2465 File: make.info,  Node: POSIX Jobserver,  Next: Windows Jobserver,  Prev: Job Slots,  Up: Job Slots
2466
2467 13.1.1 POSIX Jobserver Interaction
2468 ----------------------------------
2469
2470 On POSIX systems the jobserver is implemented as a simple UNIX pipe.
2471 The pipe will be pre-loaded with one single-character token for each
2472 available job.  To obtain an extra slot you must read a single character
2473 from the jobserver pipe; to release a slot you must write a single
2474 character back into the jobserver pipe.  Note that the read side of the
2475 jobserver pipe is set to "blocking" mode.
2476
2477    To access the pipe you must parse the 'MAKEFLAGS' variable and look
2478 for the argument string '--jobserver-auth=R,W' where 'R' and 'W' are
2479 non-negative integers representing file descriptors: 'R' is the read
2480 file descriptor and 'W' is the write file descriptor.
2481
2482    It's important that when you release the job slot, you write back the
2483 same character you read from the pipe for that slot.  Don't assume that
2484 all tokens are the same character; different characters may have
2485 different meanings to GNU 'make'.  The order is not important, since
2486 'make' has no idea in what order jobs will complete anyway.
2487
2488    There are various error conditions you must consider to ensure your
2489 implementation is robust:
2490
2491    * Usually you will have a command-line argument controlling the
2492      parallel operation of your tool.  Consider whether your tool should
2493      detect situations where both the jobserver and the command-line
2494      argument are specified, and how it should react.
2495
2496    * If your tool determines that the '--jobserver-auth' option is
2497      available in 'MAKEFLAGS' but that the file descriptors specified
2498      are closed, this means that the calling 'make' process did not
2499      think that your tool was a recursive 'make' invocation (e.g., the
2500      command line was not prefixed with a '+' character).  You should
2501      notify your users of this situation.
2502
2503    * Your tool should also examine the first word of the 'MAKEFLAGS'
2504      variable and look for the character 'n'.  If this character is
2505      present then 'make' was invoked with the '-n' option and your tool
2506      should stop without performing any operations.
2507
2508    * Your tool should be sure to write back the tokens it read, even
2509      under error conditions.  This includes not only errors in your tool
2510      but also outside influences such as interrupts ('SIGINT'), etc.
2511      You may want to install signal handlers to manage this write-back.
2512
2513 \1f
2514 File: make.info,  Node: Windows Jobserver,  Prev: POSIX Jobserver,  Up: Job Slots
2515
2516 13.1.2 Windows Jobserver Interaction
2517 ------------------------------------
2518
2519 On Windows systems the jobserver is implemented as a named semaphore.
2520 The semaphore will be set with an initial count equal to the number of
2521 available slots; to obtain a slot you must wait on the semaphore (with
2522 or without a timeout).  To release a slot, release the semaphore.
2523
2524    To access the semaphore you must parse the 'MAKEFLAGS' variable and
2525 look for the argument string '--jobserver-auth=NAME' where 'NAME' is the
2526 name of the named semaphore.  Use this name with 'OpenSemaphore' to
2527 create a handle to the semaphore.
2528
2529    There are various error conditions you must consider to ensure your
2530 implementation is robust:
2531
2532    * Usually you will have a command-line argument controlling the
2533      parallel operation of your tool.  Consider whether your tool should
2534      detect situations where both the jobserver and the command-line
2535      argument are specified, and how it should react.
2536
2537    * Your tool should be sure to release the semaphore for the tokens it
2538      read, even under error conditions.  This includes not only errors
2539      in your tool but also outside influences such as interrupts
2540      ('SIGINT'), etc.  You may want to install signal handlers to manage
2541      this write-back.
2542
2543 \1f
2544 File: make.info,  Node: Terminal Output,  Prev: Job Slots,  Up: Integrating make
2545
2546 13.2 Synchronized Terminal Output
2547 =================================
2548
2549 Normally GNU 'make' will invoke all commands with access to the same
2550 standard and error outputs that 'make' itself was started with.  A
2551 number of tools will detect whether the output is a terminal or
2552 not-a-terminal, and use this information to change the output style.
2553 For example if the output goes to a terminal the tool may add control
2554 characters that set color, or even change the location of the cursor.
2555 If the output is not going to a terminal then these special control
2556 characters are not emitted so that they don't corrupt log files, etc.
2557
2558    The '--output-sync' (*note Output During Parallel Output: Parallel
2559 Output.) option will defeat the terminal detection.  When output
2560 synchronization is enabled GNU 'make' arranges for all command output to
2561 be written to a file, so that its output can be written as a block
2562 without interference from other commands.  This means that all tools
2563 invoked by 'make' will believe that their output is not going to be
2564 displayed on a terminal, even when it will be (because 'make' will
2565 display it there after the command is completed).
2566
2567    In order to facilitate tools which would like to determine whether or
2568 not their output will be displayed on a terminal, GNU 'make' will set
2569 the 'MAKE_TERMOUT' and 'MAKE_TERMERR' environment variables before
2570 invoking any commands.  Tools which would like to determine whether
2571 standard or error output (respectively) will be displayed on a terminal
2572 can check these environment variables to determine if they exist and
2573 contain a non-empty value.  If so the tool can assume that the output
2574 will (eventually) be displayed on a terminal.  If the variables are not
2575 set or have an empty value, then the tool should fall back to its normal
2576 methods of detecting whether output is going to a terminal or not.
2577
2578    The content of the variables can be parsed to determine the type of
2579 terminal which will be used to display the output.
2580
2581    Similarly, environments which invoke 'make' and would like to capture
2582 the output and eventually display it on a terminal (or some display
2583 which can interpret terminal control characters) can set these variables
2584 before invoking 'make'.  GNU 'make' will not modify these environment
2585 variables if they already exist when it starts.
2586
2587 \1f
2588 File: make.info,  Node: Features,  Next: Missing,  Prev: Integrating make,  Up: Top
2589
2590 14 Features of GNU 'make'
2591 *************************
2592
2593 Here is a summary of the features of GNU 'make', for comparison with and
2594 credit to other versions of 'make'.  We consider the features of 'make'
2595 in 4.2 BSD systems as a baseline.  If you are concerned with writing
2596 portable makefiles, you should not use the features of 'make' listed
2597 here, nor the ones in *note Missing::.
2598
2599    Many features come from the version of 'make' in System V.
2600
2601    * The 'VPATH' variable and its special meaning.  *Note Searching
2602      Directories for Prerequisites: Directory Search.  This feature
2603      exists in System V 'make', but is undocumented.  It is documented
2604      in 4.3 BSD 'make' (which says it mimics System V's 'VPATH'
2605      feature).
2606
2607    * Included makefiles.  *Note Including Other Makefiles: Include.
2608      Allowing multiple files to be included with a single directive is a
2609      GNU extension.
2610
2611    * Variables are read from and communicated via the environment.
2612      *Note Variables from the Environment: Environment.
2613
2614    * Options passed through the variable 'MAKEFLAGS' to recursive
2615      invocations of 'make'.  *Note Communicating Options to a
2616      Sub-'make': Options/Recursion.
2617
2618    * The automatic variable '$%' is set to the member name in an archive
2619      reference.  *Note Automatic Variables::.
2620
2621    * The automatic variables '$@', '$*', '$<', '$%', and '$?' have
2622      corresponding forms like '$(@F)' and '$(@D)'.  We have generalized
2623      this to '$^' as an obvious extension.  *Note Automatic Variables::.
2624
2625    * Substitution variable references.  *Note Basics of Variable
2626      References: Reference.
2627
2628    * The command line options '-b' and '-m', accepted and ignored.  In
2629      System V 'make', these options actually do something.
2630
2631    * Execution of recursive commands to run 'make' via the variable
2632      'MAKE' even if '-n', '-q' or '-t' is specified.  *Note Recursive
2633      Use of 'make': Recursion.
2634
2635    * Support for suffix '.a' in suffix rules.  *Note Archive Suffix
2636      Rules::.  This feature is obsolete in GNU 'make', because the
2637      general feature of rule chaining (*note Chains of Implicit Rules:
2638      Chained Rules.) allows one pattern rule for installing members in
2639      an archive (*note Archive Update::) to be sufficient.
2640
2641    * The arrangement of lines and backslash/newline combinations in
2642      recipes is retained when the recipes are printed, so they appear as
2643      they do in the makefile, except for the stripping of initial
2644      whitespace.
2645
2646    The following features were inspired by various other versions of
2647 'make'.  In some cases it is unclear exactly which versions inspired
2648 which others.
2649
2650    * Pattern rules using '%'.  This has been implemented in several
2651      versions of 'make'.  We're not sure who invented it first, but it's
2652      been spread around a bit.  *Note Defining and Redefining Pattern
2653      Rules: Pattern Rules.
2654
2655    * Rule chaining and implicit intermediate files.  This was
2656      implemented by Stu Feldman in his version of 'make' for AT&T Eighth
2657      Edition Research Unix, and later by Andrew Hume of AT&T Bell Labs
2658      in his 'mk' program (where he terms it "transitive closure").  We
2659      do not really know if we got this from either of them or thought it
2660      up ourselves at the same time.  *Note Chains of Implicit Rules:
2661      Chained Rules.
2662
2663    * The automatic variable '$^' containing a list of all prerequisites
2664      of the current target.  We did not invent this, but we have no idea
2665      who did.  *Note Automatic Variables::.  The automatic variable '$+'
2666      is a simple extension of '$^'.
2667
2668    * The "what if" flag ('-W' in GNU 'make') was (as far as we know)
2669      invented by Andrew Hume in 'mk'.  *Note Instead of Executing
2670      Recipes: Instead of Execution.
2671
2672    * The concept of doing several things at once (parallelism) exists in
2673      many incarnations of 'make' and similar programs, though not in the
2674      System V or BSD implementations.  *Note Recipe Execution:
2675      Execution.
2676
2677    * A number of different build tools that support parallelism also
2678      support collecting output and displaying as a single block.  *Note
2679      Output During Parallel Execution: Parallel Output.
2680
2681    * Modified variable references using pattern substitution come from
2682      SunOS 4.  *Note Basics of Variable References: Reference.  This
2683      functionality was provided in GNU 'make' by the 'patsubst' function
2684      before the alternate syntax was implemented for compatibility with
2685      SunOS 4.  It is not altogether clear who inspired whom, since GNU
2686      'make' had 'patsubst' before SunOS 4 was released.
2687
2688    * The special significance of '+' characters preceding recipe lines
2689      (*note Instead of Executing Recipes: Instead of Execution.) is
2690      mandated by 'IEEE Standard 1003.2-1992' (POSIX.2).
2691
2692    * The '+=' syntax to append to the value of a variable comes from
2693      SunOS 4 'make'.  *Note Appending More Text to Variables: Appending.
2694
2695    * The syntax 'ARCHIVE(MEM1 MEM2...)' to list multiple members in a
2696      single archive file comes from SunOS 4 'make'.  *Note Archive
2697      Members::.
2698
2699    * The '-include' directive to include makefiles with no error for a
2700      nonexistent file comes from SunOS 4 'make'.  (But note that SunOS 4
2701      'make' does not allow multiple makefiles to be specified in one
2702      '-include' directive.)  The same feature appears with the name
2703      'sinclude' in SGI 'make' and perhaps others.
2704
2705    * The '!=' shell assignment operator exists in many BSD of 'make' and
2706      is purposefully implemented here to behave identically to those
2707      implementations.
2708
2709    * Various build management tools are implemented using scripting
2710      languages such as Perl or Python and thus provide a natural
2711      embedded scripting language, similar to GNU 'make''s integration of
2712      GNU Guile.
2713
2714    The remaining features are inventions new in GNU 'make':
2715
2716    * Use the '-v' or '--version' option to print version and copyright
2717      information.
2718
2719    * Use the '-h' or '--help' option to summarize the options to 'make'.
2720
2721    * Simply-expanded variables.  *Note The Two Flavors of Variables:
2722      Flavors.
2723
2724    * Pass command line variable assignments automatically through the
2725      variable 'MAKE' to recursive 'make' invocations.  *Note Recursive
2726      Use of 'make': Recursion.
2727
2728    * Use the '-C' or '--directory' command option to change directory.
2729      *Note Summary of Options: Options Summary.
2730
2731    * Make verbatim variable definitions with 'define'.  *Note Defining
2732      Multi-Line Variables: Multi-Line.
2733
2734    * Declare phony targets with the special target '.PHONY'.
2735
2736      Andrew Hume of AT&T Bell Labs implemented a similar feature with a
2737      different syntax in his 'mk' program.  This seems to be a case of
2738      parallel discovery.  *Note Phony Targets: Phony Targets.
2739
2740    * Manipulate text by calling functions.  *Note Functions for
2741      Transforming Text: Functions.
2742
2743    * Use the '-o' or '--old-file' option to pretend a file's
2744      modification-time is old.  *Note Avoiding Recompilation of Some
2745      Files: Avoiding Compilation.
2746
2747    * Conditional execution.
2748
2749      This feature has been implemented numerous times in various
2750      versions of 'make'; it seems a natural extension derived from the
2751      features of the C preprocessor and similar macro languages and is
2752      not a revolutionary concept.  *Note Conditional Parts of Makefiles:
2753      Conditionals.
2754
2755    * Specify a search path for included makefiles.  *Note Including
2756      Other Makefiles: Include.
2757
2758    * Specify extra makefiles to read with an environment variable.
2759      *Note The Variable 'MAKEFILES': MAKEFILES Variable.
2760
2761    * Strip leading sequences of './' from file names, so that './FILE'
2762      and 'FILE' are considered to be the same file.
2763
2764    * Use a special search method for library prerequisites written in
2765      the form '-lNAME'.  *Note Directory Search for Link Libraries:
2766      Libraries/Search.
2767
2768    * Allow suffixes for suffix rules (*note Old-Fashioned Suffix Rules:
2769      Suffix Rules.) to contain any characters.  In other versions of
2770      'make', they must begin with '.' and not contain any '/'
2771      characters.
2772
2773    * Keep track of the current level of 'make' recursion using the
2774      variable 'MAKELEVEL'.  *Note Recursive Use of 'make': Recursion.
2775
2776    * Provide any goals given on the command line in the variable
2777      'MAKECMDGOALS'.  *Note Arguments to Specify the Goals: Goals.
2778
2779    * Specify static pattern rules.  *Note Static Pattern Rules: Static
2780      Pattern.
2781
2782    * Provide selective 'vpath' search.  *Note Searching Directories for
2783      Prerequisites: Directory Search.
2784
2785    * Provide computed variable references.  *Note Basics of Variable
2786      References: Reference.
2787
2788    * Update makefiles.  *Note How Makefiles Are Remade: Remaking
2789      Makefiles.  System V 'make' has a very, very limited form of this
2790      functionality in that it will check out SCCS files for makefiles.
2791
2792    * Various new built-in implicit rules.  *Note Catalogue of Built-In
2793      Rules: Catalogue of Rules.
2794
2795    * Load dynamic objects which can modify the behavior of 'make'.
2796      *Note Loading Dynamic Objects: Loading Objects.
2797
2798 \1f
2799 File: make.info,  Node: Missing,  Next: Makefile Conventions,  Prev: Features,  Up: Top
2800
2801 15 Incompatibilities and Missing Features
2802 *****************************************
2803
2804 The 'make' programs in various other systems support a few features that
2805 are not implemented in GNU 'make'.  The POSIX.2 standard ('IEEE Standard
2806 1003.2-1992') which specifies 'make' does not require any of these
2807 features.
2808
2809    * A target of the form 'FILE((ENTRY))' stands for a member of archive
2810      file FILE.  The member is chosen, not by name, but by being an
2811      object file which defines the linker symbol ENTRY.
2812
2813      This feature was not put into GNU 'make' because of the
2814      non-modularity of putting knowledge into 'make' of the internal
2815      format of archive file symbol tables.  *Note Updating Archive
2816      Symbol Directories: Archive Symbols.
2817
2818    * Suffixes (used in suffix rules) that end with the character '~'
2819      have a special meaning to System V 'make'; they refer to the SCCS
2820      file that corresponds to the file one would get without the '~'.
2821      For example, the suffix rule '.c~.o' would make the file 'N.o' from
2822      the SCCS file 's.N.c'.  For complete coverage, a whole series of
2823      such suffix rules is required.  *Note Old-Fashioned Suffix Rules:
2824      Suffix Rules.
2825
2826      In GNU 'make', this entire series of cases is handled by two
2827      pattern rules for extraction from SCCS, in combination with the
2828      general feature of rule chaining.  *Note Chains of Implicit Rules:
2829      Chained Rules.
2830
2831    * In System V and 4.3 BSD 'make', files found by 'VPATH' search
2832      (*note Searching Directories for Prerequisites: Directory Search.)
2833      have their names changed inside recipes.  We feel it is much
2834      cleaner to always use automatic variables and thus make this
2835      feature unnecessary.
2836
2837    * In some Unix 'make's, the automatic variable '$*' appearing in the
2838      prerequisites of a rule has the amazingly strange "feature" of
2839      expanding to the full name of the _target of that rule_.  We cannot
2840      imagine what went on in the minds of Unix 'make' developers to do
2841      this; it is utterly inconsistent with the normal definition of
2842      '$*'.
2843
2844    * In some Unix 'make's, implicit rule search (*note Using Implicit
2845      Rules: Implicit Rules.) is apparently done for _all_ targets, not
2846      just those without recipes.  This means you can do:
2847
2848           foo.o:
2849                   cc -c foo.c
2850
2851      and Unix 'make' will intuit that 'foo.o' depends on 'foo.c'.
2852
2853      We feel that such usage is broken.  The prerequisite properties of
2854      'make' are well-defined (for GNU 'make', at least), and doing such
2855      a thing simply does not fit the model.
2856
2857    * GNU 'make' does not include any built-in implicit rules for
2858      compiling or preprocessing EFL programs.  If we hear of anyone who
2859      is using EFL, we will gladly add them.
2860
2861    * It appears that in SVR4 'make', a suffix rule can be specified with
2862      no recipe, and it is treated as if it had an empty recipe (*note
2863      Empty Recipes::).  For example:
2864
2865           .c.a:
2866
2867      will override the built-in '.c.a' suffix rule.
2868
2869      We feel that it is cleaner for a rule without a recipe to always
2870      simply add to the prerequisite list for the target.  The above
2871      example can be easily rewritten to get the desired behavior in GNU
2872      'make':
2873
2874           .c.a: ;
2875
2876    * Some versions of 'make' invoke the shell with the '-e' flag, except
2877      under '-k' (*note Testing the Compilation of a Program: Testing.).
2878      The '-e' flag tells the shell to exit as soon as any program it
2879      runs returns a nonzero status.  We feel it is cleaner to write each
2880      line of the recipe to stand on its own and not require this special
2881      treatment.
2882
2883 \1f
2884 File: make.info,  Node: Makefile Conventions,  Next: Quick Reference,  Prev: Missing,  Up: Top
2885
2886 16 Makefile Conventions
2887 ***********************
2888
2889 This node describes conventions for writing the Makefiles for GNU
2890 programs.  Using Automake will help you write a Makefile that follows
2891 these conventions.  For more information on portable Makefiles, see
2892 POSIX and *note Portable Make Programming: (autoconf)Portable Make.
2893
2894 * Menu:
2895
2896 * Makefile Basics::             General conventions for Makefiles.
2897 * Utilities in Makefiles::      Utilities to be used in Makefiles.
2898 * Command Variables::           Variables for specifying commands.
2899 * DESTDIR::                     Supporting staged installs.
2900 * Directory Variables::         Variables for installation directories.
2901 * Standard Targets::            Standard targets for users.
2902 * Install Command Categories::  Three categories of commands in the 'install'
2903                                   rule: normal, pre-install and post-install.
2904
2905 \1f
2906 File: make.info,  Node: Makefile Basics,  Next: Utilities in Makefiles,  Up: Makefile Conventions
2907
2908 16.1 General Conventions for Makefiles
2909 ======================================
2910
2911 Every Makefile should contain this line:
2912
2913      SHELL = /bin/sh
2914
2915 to avoid trouble on systems where the 'SHELL' variable might be
2916 inherited from the environment.  (This is never a problem with GNU
2917 'make'.)
2918
2919    Different 'make' programs have incompatible suffix lists and implicit
2920 rules, and this sometimes creates confusion or misbehavior.  So it is a
2921 good idea to set the suffix list explicitly using only the suffixes you
2922 need in the particular Makefile, like this:
2923
2924      .SUFFIXES:
2925      .SUFFIXES: .c .o
2926
2927 The first line clears out the suffix list, the second introduces all
2928 suffixes which may be subject to implicit rules in this Makefile.
2929
2930    Don't assume that '.' is in the path for command execution.  When you
2931 need to run programs that are a part of your package during the make,
2932 please make sure that it uses './' if the program is built as part of
2933 the make or '$(srcdir)/' if the file is an unchanging part of the source
2934 code.  Without one of these prefixes, the current search path is used.
2935
2936    The distinction between './' (the "build directory") and '$(srcdir)/'
2937 (the "source directory") is important because users can build in a
2938 separate directory using the '--srcdir' option to 'configure'.  A rule
2939 of the form:
2940
2941      foo.1 : foo.man sedscript
2942              sed -f sedscript foo.man > foo.1
2943
2944 will fail when the build directory is not the source directory, because
2945 'foo.man' and 'sedscript' are in the source directory.
2946
2947    When using GNU 'make', relying on 'VPATH' to find the source file
2948 will work in the case where there is a single dependency file, since the
2949 'make' automatic variable '$<' will represent the source file wherever
2950 it is.  (Many versions of 'make' set '$<' only in implicit rules.)  A
2951 Makefile target like
2952
2953      foo.o : bar.c
2954              $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
2955
2956 should instead be written as
2957
2958      foo.o : bar.c
2959              $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@
2960
2961 in order to allow 'VPATH' to work correctly.  When the target has
2962 multiple dependencies, using an explicit '$(srcdir)' is the easiest way
2963 to make the rule work well.  For example, the target above for 'foo.1'
2964 is best written as:
2965
2966      foo.1 : foo.man sedscript
2967              sed -f $(srcdir)/sedscript $(srcdir)/foo.man > $@
2968
2969    GNU distributions usually contain some files which are not source
2970 files--for example, Info files, and the output from Autoconf, Automake,
2971 Bison or Flex.  Since these files normally appear in the source
2972 directory, they should always appear in the source directory, not in the
2973 build directory.  So Makefile rules to update them should put the
2974 updated files in the source directory.
2975
2976    However, if a file does not appear in the distribution, then the
2977 Makefile should not put it in the source directory, because building a
2978 program in ordinary circumstances should not modify the source directory
2979 in any way.
2980
2981    Try to make the build and installation targets, at least (and all
2982 their subtargets) work correctly with a parallel 'make'.
2983
2984 \1f
2985 File: make.info,  Node: Utilities in Makefiles,  Next: Command Variables,  Prev: Makefile Basics,  Up: Makefile Conventions
2986
2987 16.2 Utilities in Makefiles
2988 ===========================
2989
2990 Write the Makefile commands (and any shell scripts, such as 'configure')
2991 to run under 'sh' (both the traditional Bourne shell and the POSIX
2992 shell), not 'csh'.  Don't use any special features of 'ksh' or 'bash',
2993 or POSIX features not widely supported in traditional Bourne 'sh'.
2994
2995    The 'configure' script and the Makefile rules for building and
2996 installation should not use any utilities directly except these:
2997
2998      awk cat cmp cp diff echo egrep expr false grep install-info ln ls
2999      mkdir mv printf pwd rm rmdir sed sleep sort tar test touch tr true
3000
3001    Compression programs such as 'gzip' can be used in the 'dist' rule.
3002
3003    Generally, stick to the widely-supported (usually POSIX-specified)
3004 options and features of these programs.  For example, don't use 'mkdir
3005 -p', convenient as it may be, because a few systems don't support it at
3006 all and with others, it is not safe for parallel execution.  For a list
3007 of known incompatibilities, see *note Portable Shell Programming:
3008 (autoconf)Portable Shell.
3009
3010    It is a good idea to avoid creating symbolic links in makefiles,
3011 since a few file systems don't support them.
3012
3013    The Makefile rules for building and installation can also use
3014 compilers and related programs, but should do so via 'make' variables so
3015 that the user can substitute alternatives.  Here are some of the
3016 programs we mean:
3017
3018      ar bison cc flex install ld ldconfig lex
3019      make makeinfo ranlib texi2dvi yacc
3020
3021    Use the following 'make' variables to run those programs:
3022
3023      $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX)
3024      $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
3025
3026    When you use 'ranlib' or 'ldconfig', you should make sure nothing bad
3027 happens if the system does not have the program in question.  Arrange to
3028 ignore an error from that command, and print a message before the
3029 command to tell the user that failure of this command does not mean a
3030 problem.  (The Autoconf 'AC_PROG_RANLIB' macro can help with this.)
3031
3032    If you use symbolic links, you should implement a fallback for
3033 systems that don't have symbolic links.
3034
3035    Additional utilities that can be used via Make variables are:
3036
3037      chgrp chmod chown mknod
3038
3039    It is ok to use other utilities in Makefile portions (or scripts)
3040 intended only for particular systems where you know those utilities
3041 exist.
3042
3043 \1f
3044 File: make.info,  Node: Command Variables,  Next: DESTDIR,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
3045
3046 16.3 Variables for Specifying Commands
3047 ======================================
3048
3049 Makefiles should provide variables for overriding certain commands,
3050 options, and so on.
3051
3052    In particular, you should run most utility programs via variables.
3053 Thus, if you use Bison, have a variable named 'BISON' whose default
3054 value is set with 'BISON = bison', and refer to it with '$(BISON)'
3055 whenever you need to use Bison.
3056
3057    File management utilities such as 'ln', 'rm', 'mv', and so on, need
3058 not be referred to through variables in this way, since users don't need
3059 to replace them with other programs.
3060
3061    Each program-name variable should come with an options variable that
3062 is used to supply options to the program.  Append 'FLAGS' to the
3063 program-name variable name to get the options variable name--for
3064 example, 'BISONFLAGS'.  (The names 'CFLAGS' for the C compiler, 'YFLAGS'
3065 for yacc, and 'LFLAGS' for lex, are exceptions to this rule, but we keep
3066 them because they are standard.)  Use 'CPPFLAGS' in any compilation
3067 command that runs the preprocessor, and use 'LDFLAGS' in any compilation
3068 command that does linking as well as in any direct use of 'ld'.
3069
3070    If there are C compiler options that _must_ be used for proper
3071 compilation of certain files, do not include them in 'CFLAGS'.  Users
3072 expect to be able to specify 'CFLAGS' freely themselves.  Instead,
3073 arrange to pass the necessary options to the C compiler independently of
3074 'CFLAGS', by writing them explicitly in the compilation commands or by
3075 defining an implicit rule, like this:
3076
3077      CFLAGS = -g
3078      ALL_CFLAGS = -I. $(CFLAGS)
3079      .c.o:
3080              $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
3081
3082    Do include the '-g' option in 'CFLAGS', because that is not
3083 _required_ for proper compilation.  You can consider it a default that
3084 is only recommended.  If the package is set up so that it is compiled
3085 with GCC by default, then you might as well include '-O' in the default
3086 value of 'CFLAGS' as well.
3087
3088    Put 'CFLAGS' last in the compilation command, after other variables
3089 containing compiler options, so the user can use 'CFLAGS' to override
3090 the others.
3091
3092    'CFLAGS' should be used in every invocation of the C compiler, both
3093 those which do compilation and those which do linking.
3094
3095    Every Makefile should define the variable 'INSTALL', which is the
3096 basic command for installing a file into the system.
3097
3098    Every Makefile should also define the variables 'INSTALL_PROGRAM' and
3099 'INSTALL_DATA'.  (The default for 'INSTALL_PROGRAM' should be
3100 '$(INSTALL)'; the default for 'INSTALL_DATA' should be '${INSTALL} -m
3101 644'.)  Then it should use those variables as the commands for actual
3102 installation, for executables and non-executables respectively.  Minimal
3103 use of these variables is as follows:
3104
3105      $(INSTALL_PROGRAM) foo $(bindir)/foo
3106      $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
3107
3108    However, it is preferable to support a 'DESTDIR' prefix on the target
3109 files, as explained in the next section.
3110
3111    It is acceptable, but not required, to install multiple files in one
3112 command, with the final argument being a directory, as in:
3113
3114      $(INSTALL_PROGRAM) foo bar baz $(bindir)
3115
3116 \1f
3117 File: make.info,  Node: DESTDIR,  Next: Directory Variables,  Prev: Command Variables,  Up: Makefile Conventions
3118
3119 16.4 'DESTDIR': Support for Staged Installs
3120 ===========================================
3121
3122 'DESTDIR' is a variable prepended to each installed target file, like
3123 this:
3124
3125      $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo
3126      $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a
3127
3128    The 'DESTDIR' variable is specified by the user on the 'make' command
3129 line as an absolute file name.  For example:
3130
3131      make DESTDIR=/tmp/stage install
3132
3133 'DESTDIR' should be supported only in the 'install*' and 'uninstall*'
3134 targets, as those are the only targets where it is useful.
3135
3136    If your installation step would normally install '/usr/local/bin/foo'
3137 and '/usr/local/lib/libfoo.a', then an installation invoked as in the
3138 example above would install '/tmp/stage/usr/local/bin/foo' and
3139 '/tmp/stage/usr/local/lib/libfoo.a' instead.
3140
3141    Prepending the variable 'DESTDIR' to each target in this way provides
3142 for "staged installs", where the installed files are not placed directly
3143 into their expected location but are instead copied into a temporary
3144 location ('DESTDIR').  However, installed files maintain their relative
3145 directory structure and any embedded file names will not be modified.
3146
3147    You should not set the value of 'DESTDIR' in your 'Makefile' at all;
3148 then the files are installed into their expected locations by default.
3149 Also, specifying 'DESTDIR' should not change the operation of the
3150 software in any way, so its value should not be included in any file
3151 contents.
3152
3153    'DESTDIR' support is commonly used in package creation.  It is also
3154 helpful to users who want to understand what a given package will
3155 install where, and to allow users who don't normally have permissions to
3156 install into protected areas to build and install before gaining those
3157 permissions.  Finally, it can be useful with tools such as 'stow', where
3158 code is installed in one place but made to appear to be installed
3159 somewhere else using symbolic links or special mount operations.  So, we
3160 strongly recommend GNU packages support 'DESTDIR', though it is not an
3161 absolute requirement.
3162
3163 \1f
3164 File: make.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: DESTDIR,  Up: Makefile Conventions
3165
3166 16.5 Variables for Installation Directories
3167 ===========================================
3168
3169 Installation directories should always be named by variables, so it is
3170 easy to install in a nonstandard place.  The standard names for these
3171 variables and the values they should have in GNU packages are described
3172 below.  They are based on a standard file system layout; variants of it
3173 are used in GNU/Linux and other modern operating systems.
3174
3175    Installers are expected to override these values when calling 'make'
3176 (e.g., 'make prefix=/usr install') or 'configure' (e.g., 'configure
3177 --prefix=/usr').  GNU packages should not try to guess which value
3178 should be appropriate for these variables on the system they are being
3179 installed onto: use the default settings specified here so that all GNU
3180 packages behave identically, allowing the installer to achieve any
3181 desired layout.
3182
3183    All installation directories, and their parent directories, should be
3184 created (if necessary) before they are installed into.
3185
3186    These first two variables set the root for the installation.  All the
3187 other installation directories should be subdirectories of one of these
3188 two, and nothing should be directly installed into these two
3189 directories.
3190
3191 'prefix'
3192      A prefix used in constructing the default values of the variables
3193      listed below.  The default value of 'prefix' should be
3194      '/usr/local'.  When building the complete GNU system, the prefix
3195      will be empty and '/usr' will be a symbolic link to '/'.  (If you
3196      are using Autoconf, write it as '@prefix@'.)
3197
3198      Running 'make install' with a different value of 'prefix' from the
3199      one used to build the program should _not_ recompile the program.
3200
3201 'exec_prefix'
3202      A prefix used in constructing the default values of some of the
3203      variables listed below.  The default value of 'exec_prefix' should
3204      be '$(prefix)'.  (If you are using Autoconf, write it as
3205      '@exec_prefix@'.)
3206
3207      Generally, '$(exec_prefix)' is used for directories that contain
3208      machine-specific files (such as executables and subroutine
3209      libraries), while '$(prefix)' is used directly for other
3210      directories.
3211
3212      Running 'make install' with a different value of 'exec_prefix' from
3213      the one used to build the program should _not_ recompile the
3214      program.
3215
3216    Executable programs are installed in one of the following
3217 directories.
3218
3219 'bindir'
3220      The directory for installing executable programs that users can
3221      run.  This should normally be '/usr/local/bin', but write it as
3222      '$(exec_prefix)/bin'.  (If you are using Autoconf, write it as
3223      '@bindir@'.)
3224
3225 'sbindir'
3226      The directory for installing executable programs that can be run
3227      from the shell, but are only generally useful to system
3228      administrators.  This should normally be '/usr/local/sbin', but
3229      write it as '$(exec_prefix)/sbin'.  (If you are using Autoconf,
3230      write it as '@sbindir@'.)
3231
3232 'libexecdir'
3233      The directory for installing executable programs to be run by other
3234      programs rather than by users.  This directory should normally be
3235      '/usr/local/libexec', but write it as '$(exec_prefix)/libexec'.
3236      (If you are using Autoconf, write it as '@libexecdir@'.)
3237
3238      The definition of 'libexecdir' is the same for all packages, so you
3239      should install your data in a subdirectory thereof.  Most packages
3240      install their data under '$(libexecdir)/PACKAGE-NAME/', possibly
3241      within additional subdirectories thereof, such as
3242      '$(libexecdir)/PACKAGE-NAME/MACHINE/VERSION'.
3243
3244    Data files used by the program during its execution are divided into
3245 categories in two ways.
3246
3247    * Some files are normally modified by programs; others are never
3248      normally modified (though users may edit some of these).
3249
3250    * Some files are architecture-independent and can be shared by all
3251      machines at a site; some are architecture-dependent and can be
3252      shared only by machines of the same kind and operating system;
3253      others may never be shared between two machines.
3254
3255    This makes for six different possibilities.  However, we want to
3256 discourage the use of architecture-dependent files, aside from object
3257 files and libraries.  It is much cleaner to make other data files
3258 architecture-independent, and it is generally not hard.
3259
3260    Here are the variables Makefiles should use to specify directories to
3261 put these various kinds of files in:
3262
3263 'datarootdir'
3264      The root of the directory tree for read-only
3265      architecture-independent data files.  This should normally be
3266      '/usr/local/share', but write it as '$(prefix)/share'.  (If you are
3267      using Autoconf, write it as '@datarootdir@'.)  'datadir''s default
3268      value is based on this variable; so are 'infodir', 'mandir', and
3269      others.
3270
3271 'datadir'
3272      The directory for installing idiosyncratic read-only
3273      architecture-independent data files for this program.  This is
3274      usually the same place as 'datarootdir', but we use the two
3275      separate variables so that you can move these program-specific
3276      files without altering the location for Info files, man pages, etc.
3277
3278      This should normally be '/usr/local/share', but write it as
3279      '$(datarootdir)'.  (If you are using Autoconf, write it as
3280      '@datadir@'.)
3281
3282      The definition of 'datadir' is the same for all packages, so you
3283      should install your data in a subdirectory thereof.  Most packages
3284      install their data under '$(datadir)/PACKAGE-NAME/'.
3285
3286 'sysconfdir'
3287      The directory for installing read-only data files that pertain to a
3288      single machine-that is to say, files for configuring a host.
3289      Mailer and network configuration files, '/etc/passwd', and so forth
3290      belong here.  All the files in this directory should be ordinary
3291      ASCII text files.  This directory should normally be
3292      '/usr/local/etc', but write it as '$(prefix)/etc'.  (If you are
3293      using Autoconf, write it as '@sysconfdir@'.)
3294
3295      Do not install executables here in this directory (they probably
3296      belong in '$(libexecdir)' or '$(sbindir)').  Also do not install
3297      files that are modified in the normal course of their use (programs
3298      whose purpose is to change the configuration of the system
3299      excluded).  Those probably belong in '$(localstatedir)'.
3300
3301 'sharedstatedir'
3302      The directory for installing architecture-independent data files
3303      which the programs modify while they run.  This should normally be
3304      '/usr/local/com', but write it as '$(prefix)/com'.  (If you are
3305      using Autoconf, write it as '@sharedstatedir@'.)
3306
3307 'localstatedir'
3308      The directory for installing data files which the programs modify
3309      while they run, and that pertain to one specific machine.  Users
3310      should never need to modify files in this directory to configure
3311      the package's operation; put such configuration information in
3312      separate files that go in '$(datadir)' or '$(sysconfdir)'.
3313      '$(localstatedir)' should normally be '/usr/local/var', but write
3314      it as '$(prefix)/var'.  (If you are using Autoconf, write it as
3315      '@localstatedir@'.)
3316
3317 'runstatedir'
3318      The directory for installing data files which the programs modify
3319      while they run, that pertain to one specific machine, and which
3320      need not persist longer than the execution of the program--which is
3321      generally long-lived, for example, until the next reboot.  PID
3322      files for system daemons are a typical use.  In addition, this
3323      directory should not be cleaned except perhaps at reboot, while the
3324      general '/tmp' ('TMPDIR') may be cleaned arbitrarily.  This should
3325      normally be '/var/run', but write it as '$(localstatedir)/run'.
3326      Having it as a separate variable allows the use of '/run' if
3327      desired, for example.  (If you are using Autoconf 2.70 or later,
3328      write it as '@runstatedir@'.)
3329
3330    These variables specify the directory for installing certain specific
3331 types of files, if your program has them.  Every GNU package should have
3332 Info files, so every program needs 'infodir', but not all need 'libdir'
3333 or 'lispdir'.
3334
3335 'includedir'
3336      The directory for installing header files to be included by user
3337      programs with the C '#include' preprocessor directive.  This should
3338      normally be '/usr/local/include', but write it as
3339      '$(prefix)/include'.  (If you are using Autoconf, write it as
3340      '@includedir@'.)
3341
3342      Most compilers other than GCC do not look for header files in
3343      directory '/usr/local/include'.  So installing the header files
3344      this way is only useful with GCC. Sometimes this is not a problem
3345      because some libraries are only really intended to work with GCC.
3346      But some libraries are intended to work with other compilers.  They
3347      should install their header files in two places, one specified by
3348      'includedir' and one specified by 'oldincludedir'.
3349
3350 'oldincludedir'
3351      The directory for installing '#include' header files for use with
3352      compilers other than GCC. This should normally be '/usr/include'.
3353      (If you are using Autoconf, you can write it as '@oldincludedir@'.)
3354
3355      The Makefile commands should check whether the value of
3356      'oldincludedir' is empty.  If it is, they should not try to use it;
3357      they should cancel the second installation of the header files.
3358
3359      A package should not replace an existing header in this directory
3360      unless the header came from the same package.  Thus, if your Foo
3361      package provides a header file 'foo.h', then it should install the
3362      header file in the 'oldincludedir' directory if either (1) there is
3363      no 'foo.h' there or (2) the 'foo.h' that exists came from the Foo
3364      package.
3365
3366      To tell whether 'foo.h' came from the Foo package, put a magic
3367      string in the file--part of a comment--and 'grep' for that string.
3368
3369 'docdir'
3370      The directory for installing documentation files (other than Info)
3371      for this package.  By default, it should be
3372      '/usr/local/share/doc/YOURPKG', but it should be written as
3373      '$(datarootdir)/doc/YOURPKG'.  (If you are using Autoconf, write it
3374      as '@docdir@'.)  The YOURPKG subdirectory, which may include a
3375      version number, prevents collisions among files with common names,
3376      such as 'README'.
3377
3378 'infodir'
3379      The directory for installing the Info files for this package.  By
3380      default, it should be '/usr/local/share/info', but it should be
3381      written as '$(datarootdir)/info'.  (If you are using Autoconf,
3382      write it as '@infodir@'.)  'infodir' is separate from 'docdir' for
3383      compatibility with existing practice.
3384
3385 'htmldir'
3386 'dvidir'
3387 'pdfdir'
3388 'psdir'
3389      Directories for installing documentation files in the particular
3390      format.  They should all be set to '$(docdir)' by default.  (If you
3391      are using Autoconf, write them as '@htmldir@', '@dvidir@', etc.)
3392      Packages which supply several translations of their documentation
3393      should install them in '$(htmldir)/'LL, '$(pdfdir)/'LL, etc.  where
3394      LL is a locale abbreviation such as 'en' or 'pt_BR'.
3395
3396 'libdir'
3397      The directory for object files and libraries of object code.  Do
3398      not install executables here, they probably ought to go in
3399      '$(libexecdir)' instead.  The value of 'libdir' should normally be
3400      '/usr/local/lib', but write it as '$(exec_prefix)/lib'.  (If you
3401      are using Autoconf, write it as '@libdir@'.)
3402
3403 'lispdir'
3404      The directory for installing any Emacs Lisp files in this package.
3405      By default, it should be '/usr/local/share/emacs/site-lisp', but it
3406      should be written as '$(datarootdir)/emacs/site-lisp'.
3407
3408      If you are using Autoconf, write the default as '@lispdir@'.  In
3409      order to make '@lispdir@' work, you need the following lines in
3410      your 'configure.ac' file:
3411
3412           lispdir='${datarootdir}/emacs/site-lisp'
3413           AC_SUBST(lispdir)
3414
3415 'localedir'
3416      The directory for installing locale-specific message catalogs for
3417      this package.  By default, it should be '/usr/local/share/locale',
3418      but it should be written as '$(datarootdir)/locale'.  (If you are
3419      using Autoconf, write it as '@localedir@'.)  This directory usually
3420      has a subdirectory per locale.
3421
3422    Unix-style man pages are installed in one of the following:
3423
3424 'mandir'
3425      The top-level directory for installing the man pages (if any) for
3426      this package.  It will normally be '/usr/local/share/man', but you
3427      should write it as '$(datarootdir)/man'.  (If you are using
3428      Autoconf, write it as '@mandir@'.)
3429
3430 'man1dir'
3431      The directory for installing section 1 man pages.  Write it as
3432      '$(mandir)/man1'.
3433 'man2dir'
3434      The directory for installing section 2 man pages.  Write it as
3435      '$(mandir)/man2'
3436 '...'
3437
3438      *Don't make the primary documentation for any GNU software be a man
3439      page.  Write a manual in Texinfo instead.  Man pages are just for
3440      the sake of people running GNU software on Unix, which is a
3441      secondary application only.*
3442
3443 'manext'
3444      The file name extension for the installed man page.  This should
3445      contain a period followed by the appropriate digit; it should
3446      normally be '.1'.
3447
3448 'man1ext'
3449      The file name extension for installed section 1 man pages.
3450 'man2ext'
3451      The file name extension for installed section 2 man pages.
3452 '...'
3453      Use these names instead of 'manext' if the package needs to install
3454      man pages in more than one section of the manual.
3455
3456    And finally, you should set the following variable:
3457
3458 'srcdir'
3459      The directory for the sources being compiled.  The value of this
3460      variable is normally inserted by the 'configure' shell script.  (If
3461      you are using Autoconf, use 'srcdir = @srcdir@'.)
3462
3463    For example:
3464
3465      # Common prefix for installation directories.
3466      # NOTE: This directory must exist when you start the install.
3467      prefix = /usr/local
3468      datarootdir = $(prefix)/share
3469      datadir = $(datarootdir)
3470      exec_prefix = $(prefix)
3471      # Where to put the executable for the command 'gcc'.
3472      bindir = $(exec_prefix)/bin
3473      # Where to put the directories used by the compiler.
3474      libexecdir = $(exec_prefix)/libexec
3475      # Where to put the Info files.
3476      infodir = $(datarootdir)/info
3477
3478    If your program installs a large number of files into one of the
3479 standard user-specified directories, it might be useful to group them
3480 into a subdirectory particular to that program.  If you do this, you
3481 should write the 'install' rule to create these subdirectories.
3482
3483    Do not expect the user to include the subdirectory name in the value
3484 of any of the variables listed above.  The idea of having a uniform set
3485 of variable names for installation directories is to enable the user to
3486 specify the exact same values for several different GNU packages.  In
3487 order for this to be useful, all the packages must be designed so that
3488 they will work sensibly when the user does so.
3489
3490    At times, not all of these variables may be implemented in the
3491 current release of Autoconf and/or Automake; but as of Autoconf 2.60, we
3492 believe all of them are.  When any are missing, the descriptions here
3493 serve as specifications for what Autoconf will implement.  As a
3494 programmer, you can either use a development version of Autoconf or
3495 avoid using these variables until a stable release is made which
3496 supports them.
3497
3498 \1f
3499 File: make.info,  Node: Standard Targets,  Next: Install Command Categories,  Prev: Directory Variables,  Up: Makefile Conventions
3500
3501 16.6 Standard Targets for Users
3502 ===============================
3503
3504 All GNU programs should have the following targets in their Makefiles:
3505
3506 'all'
3507      Compile the entire program.  This should be the default target.
3508      This target need not rebuild any documentation files; Info files
3509      should normally be included in the distribution, and DVI (and other
3510      documentation format) files should be made only when explicitly
3511      asked for.
3512
3513      By default, the Make rules should compile and link with '-g', so
3514      that executable programs have debugging symbols.  Otherwise, you
3515      are essentially helpless in the face of a crash, and it is often
3516      far from easy to reproduce with a fresh build.
3517
3518 'install'
3519      Compile the program and copy the executables, libraries, and so on
3520      to the file names where they should reside for actual use.  If
3521      there is a simple test to verify that a program is properly
3522      installed, this target should run that test.
3523
3524      Do not strip executables when installing them.  This helps eventual
3525      debugging that may be needed later, and nowadays disk space is
3526      cheap and dynamic loaders typically ensure debug sections are not
3527      loaded during normal execution.  Users that need stripped binaries
3528      may invoke the 'install-strip' target to do that.
3529
3530      If possible, write the 'install' target rule so that it does not
3531      modify anything in the directory where the program was built,
3532      provided 'make all' has just been done.  This is convenient for
3533      building the program under one user name and installing it under
3534      another.
3535
3536      The commands should create all the directories in which files are
3537      to be installed, if they don't already exist.  This includes the
3538      directories specified as the values of the variables 'prefix' and
3539      'exec_prefix', as well as all subdirectories that are needed.  One
3540      way to do this is by means of an 'installdirs' target as described
3541      below.
3542
3543      Use '-' before any command for installing a man page, so that
3544      'make' will ignore any errors.  This is in case there are systems
3545      that don't have the Unix man page documentation system installed.
3546
3547      The way to install Info files is to copy them into '$(infodir)'
3548      with '$(INSTALL_DATA)' (*note Command Variables::), and then run
3549      the 'install-info' program if it is present.  'install-info' is a
3550      program that edits the Info 'dir' file to add or update the menu
3551      entry for the given Info file; it is part of the Texinfo package.
3552
3553      Here is a sample rule to install an Info file that also tries to
3554      handle some additional situations, such as 'install-info' not being
3555      present.
3556
3557           do-install-info: foo.info installdirs
3558                   $(NORMAL_INSTALL)
3559           # Prefer an info file in . to one in srcdir.
3560                   if test -f foo.info; then d=.; \
3561                    else d="$(srcdir)"; fi; \
3562                   $(INSTALL_DATA) $$d/foo.info \
3563                     "$(DESTDIR)$(infodir)/foo.info"
3564           # Run install-info only if it exists.
3565           # Use 'if' instead of just prepending '-' to the
3566           # line so we notice real errors from install-info.
3567           # Use '$(SHELL) -c' because some shells do not
3568           # fail gracefully when there is an unknown command.
3569                   $(POST_INSTALL)
3570                   if $(SHELL) -c 'install-info --version' \
3571                      >/dev/null 2>&1; then \
3572                     install-info --dir-file="$(DESTDIR)$(infodir)/dir" \
3573                                  "$(DESTDIR)$(infodir)/foo.info"; \
3574                   else true; fi
3575
3576      When writing the 'install' target, you must classify all the
3577      commands into three categories: normal ones, "pre-installation"
3578      commands and "post-installation" commands.  *Note Install Command
3579      Categories::.
3580
3581 'install-html'
3582 'install-dvi'
3583 'install-pdf'
3584 'install-ps'
3585      These targets install documentation in formats other than Info;
3586      they're intended to be called explicitly by the person installing
3587      the package, if that format is desired.  GNU prefers Info files, so
3588      these must be installed by the 'install' target.
3589
3590      When you have many documentation files to install, we recommend
3591      that you avoid collisions and clutter by arranging for these
3592      targets to install in subdirectories of the appropriate
3593      installation directory, such as 'htmldir'.  As one example, if your
3594      package has multiple manuals, and you wish to install HTML
3595      documentation with many files (such as the "split" mode output by
3596      'makeinfo --html'), you'll certainly want to use subdirectories, or
3597      two nodes with the same name in different manuals will overwrite
3598      each other.
3599
3600      Please make these 'install-FORMAT' targets invoke the commands for
3601      the FORMAT target, for example, by making FORMAT a dependency.
3602
3603 'uninstall'
3604      Delete all the installed files--the copies that the 'install' and
3605      'install-*' targets create.
3606
3607      This rule should not modify the directories where compilation is
3608      done, only the directories where files are installed.
3609
3610      The uninstallation commands are divided into three categories, just
3611      like the installation commands.  *Note Install Command
3612      Categories::.
3613
3614 'install-strip'
3615      Like 'install', but strip the executable files while installing
3616      them.  In simple cases, this target can use the 'install' target in
3617      a simple way:
3618
3619           install-strip:
3620                   $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
3621                           install
3622
3623      But if the package installs scripts as well as real executables,
3624      the 'install-strip' target can't just refer to the 'install'
3625      target; it has to strip the executables but not the scripts.
3626
3627      'install-strip' should not strip the executables in the build
3628      directory which are being copied for installation.  It should only
3629      strip the copies that are installed.
3630
3631      Normally we do not recommend stripping an executable unless you are
3632      sure the program has no bugs.  However, it can be reasonable to
3633      install a stripped executable for actual execution while saving the
3634      unstripped executable elsewhere in case there is a bug.
3635
3636 'clean'
3637      Delete all files in the current directory that are normally created
3638      by building the program.  Also delete files in other directories if
3639      they are created by this makefile.  However, don't delete the files
3640      that record the configuration.  Also preserve files that could be
3641      made by building, but normally aren't because the distribution
3642      comes with them.  There is no need to delete parent directories
3643      that were created with 'mkdir -p', since they could have existed
3644      anyway.
3645
3646      Delete '.dvi' files here if they are not part of the distribution.
3647
3648 'distclean'
3649      Delete all files in the current directory (or created by this
3650      makefile) that are created by configuring or building the program.
3651      If you have unpacked the source and built the program without
3652      creating any other files, 'make distclean' should leave only the
3653      files that were in the distribution.  However, there is no need to
3654      delete parent directories that were created with 'mkdir -p', since
3655      they could have existed anyway.
3656
3657 'mostlyclean'
3658      Like 'clean', but may refrain from deleting a few files that people
3659      normally don't want to recompile.  For example, the 'mostlyclean'
3660      target for GCC does not delete 'libgcc.a', because recompiling it
3661      is rarely necessary and takes a lot of time.
3662
3663 'maintainer-clean'
3664      Delete almost everything that can be reconstructed with this
3665      Makefile.  This typically includes everything deleted by
3666      'distclean', plus more: C source files produced by Bison, tags
3667      tables, Info files, and so on.
3668
3669      The reason we say "almost everything" is that running the command
3670      'make maintainer-clean' should not delete 'configure' even if
3671      'configure' can be remade using a rule in the Makefile.  More
3672      generally, 'make maintainer-clean' should not delete anything that
3673      needs to exist in order to run 'configure' and then begin to build
3674      the program.  Also, there is no need to delete parent directories
3675      that were created with 'mkdir -p', since they could have existed
3676      anyway.  These are the only exceptions; 'maintainer-clean' should
3677      delete everything else that can be rebuilt.
3678
3679      The 'maintainer-clean' target is intended to be used by a
3680      maintainer of the package, not by ordinary users.  You may need
3681      special tools to reconstruct some of the files that 'make
3682      maintainer-clean' deletes.  Since these files are normally included
3683      in the distribution, we don't take care to make them easy to
3684      reconstruct.  If you find you need to unpack the full distribution
3685      again, don't blame us.
3686
3687      To help make users aware of this, the commands for the special
3688      'maintainer-clean' target should start with these two:
3689
3690           @echo 'This command is intended for maintainers to use; it'
3691           @echo 'deletes files that may need special tools to rebuild.'
3692
3693 'TAGS'
3694      Update a tags table for this program.
3695
3696 'info'
3697      Generate any Info files needed.  The best way to write the rules is
3698      as follows:
3699
3700           info: foo.info
3701
3702           foo.info: foo.texi chap1.texi chap2.texi
3703                   $(MAKEINFO) $(srcdir)/foo.texi
3704
3705      You must define the variable 'MAKEINFO' in the Makefile.  It should
3706      run the 'makeinfo' program, which is part of the Texinfo
3707      distribution.
3708
3709      Normally a GNU distribution comes with Info files, and that means
3710      the Info files are present in the source directory.  Therefore, the
3711      Make rule for an info file should update it in the source
3712      directory.  When users build the package, ordinarily Make will not
3713      update the Info files because they will already be up to date.
3714
3715 'dvi'
3716 'html'
3717 'pdf'
3718 'ps'
3719      Generate documentation files in the given format.  These targets
3720      should always exist, but any or all can be a no-op if the given
3721      output format cannot be generated.  These targets should not be
3722      dependencies of the 'all' target; the user must manually invoke
3723      them.
3724
3725      Here's an example rule for generating DVI files from Texinfo:
3726
3727           dvi: foo.dvi
3728
3729           foo.dvi: foo.texi chap1.texi chap2.texi
3730                   $(TEXI2DVI) $(srcdir)/foo.texi
3731
3732      You must define the variable 'TEXI2DVI' in the Makefile.  It should
3733      run the program 'texi2dvi', which is part of the Texinfo
3734      distribution.  ('texi2dvi' uses TeX to do the real work of
3735      formatting.  TeX is not distributed with Texinfo.)  Alternatively,
3736      write only the dependencies, and allow GNU 'make' to provide the
3737      command.
3738
3739      Here's another example, this one for generating HTML from Texinfo:
3740
3741           html: foo.html
3742
3743           foo.html: foo.texi chap1.texi chap2.texi
3744                   $(TEXI2HTML) $(srcdir)/foo.texi
3745
3746      Again, you would define the variable 'TEXI2HTML' in the Makefile;
3747      for example, it might run 'makeinfo --no-split --html' ('makeinfo'
3748      is part of the Texinfo distribution).
3749
3750 'dist'
3751      Create a distribution tar file for this program.  The tar file
3752      should be set up so that the file names in the tar file start with
3753      a subdirectory name which is the name of the package it is a
3754      distribution for.  This name can include the version number.
3755
3756      For example, the distribution tar file of GCC version 1.40 unpacks
3757      into a subdirectory named 'gcc-1.40'.
3758
3759      The easiest way to do this is to create a subdirectory
3760      appropriately named, use 'ln' or 'cp' to install the proper files
3761      in it, and then 'tar' that subdirectory.
3762
3763      Compress the tar file with 'gzip'.  For example, the actual
3764      distribution file for GCC version 1.40 is called 'gcc-1.40.tar.gz'.
3765      It is ok to support other free compression formats as well.
3766
3767      The 'dist' target should explicitly depend on all non-source files
3768      that are in the distribution, to make sure they are up to date in
3769      the distribution.  *Note Making Releases: (standards)Releases.
3770
3771 'check'
3772      Perform self-tests (if any).  The user must build the program
3773      before running the tests, but need not install the program; you
3774      should write the self-tests so that they work when the program is
3775      built but not installed.
3776
3777    The following targets are suggested as conventional names, for
3778 programs in which they are useful.
3779
3780 'installcheck'
3781      Perform installation tests (if any).  The user must build and
3782      install the program before running the tests.  You should not
3783      assume that '$(bindir)' is in the search path.
3784
3785 'installdirs'
3786      It's useful to add a target named 'installdirs' to create the
3787      directories where files are installed, and their parent
3788      directories.  There is a script called 'mkinstalldirs' which is
3789      convenient for this; you can find it in the Gnulib package.  You
3790      can use a rule like this:
3791
3792           # Make sure all installation directories (e.g. $(bindir))
3793           # actually exist by making them if necessary.
3794           installdirs: mkinstalldirs
3795                   $(srcdir)/mkinstalldirs $(bindir) $(datadir) \
3796                                           $(libdir) $(infodir) \
3797                                           $(mandir)
3798
3799      or, if you wish to support 'DESTDIR' (strongly encouraged),
3800
3801           # Make sure all installation directories (e.g. $(bindir))
3802           # actually exist by making them if necessary.
3803           installdirs: mkinstalldirs
3804                   $(srcdir)/mkinstalldirs \
3805                       $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \
3806                       $(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \
3807                       $(DESTDIR)$(mandir)
3808
3809      This rule should not modify the directories where compilation is
3810      done.  It should do nothing but create installation directories.
3811
3812 \1f
3813 File: make.info,  Node: Install Command Categories,  Prev: Standard Targets,  Up: Makefile Conventions
3814
3815 16.7 Install Command Categories
3816 ===============================
3817
3818 When writing the 'install' target, you must classify all the commands
3819 into three categories: normal ones, "pre-installation" commands and
3820 "post-installation" commands.
3821
3822    Normal commands move files into their proper places, and set their
3823 modes.  They may not alter any files except the ones that come entirely
3824 from the package they belong to.
3825
3826    Pre-installation and post-installation commands may alter other
3827 files; in particular, they can edit global configuration files or data
3828 bases.
3829
3830    Pre-installation commands are typically executed before the normal
3831 commands, and post-installation commands are typically run after the
3832 normal commands.
3833
3834    The most common use for a post-installation command is to run
3835 'install-info'.  This cannot be done with a normal command, since it
3836 alters a file (the Info directory) which does not come entirely and
3837 solely from the package being installed.  It is a post-installation
3838 command because it needs to be done after the normal command which
3839 installs the package's Info files.
3840
3841    Most programs don't need any pre-installation commands, but we have
3842 the feature just in case it is needed.
3843
3844    To classify the commands in the 'install' rule into these three
3845 categories, insert "category lines" among them.  A category line
3846 specifies the category for the commands that follow.
3847
3848    A category line consists of a tab and a reference to a special Make
3849 variable, plus an optional comment at the end.  There are three
3850 variables you can use, one for each category; the variable name
3851 specifies the category.  Category lines are no-ops in ordinary execution
3852 because these three Make variables are normally undefined (and you
3853 _should not_ define them in the makefile).
3854
3855    Here are the three possible category lines, each with a comment that
3856 explains what it means:
3857
3858              $(PRE_INSTALL)     # Pre-install commands follow.
3859              $(POST_INSTALL)    # Post-install commands follow.
3860              $(NORMAL_INSTALL)  # Normal commands follow.
3861
3862    If you don't use a category line at the beginning of the 'install'
3863 rule, all the commands are classified as normal until the first category
3864 line.  If you don't use any category lines, all the commands are
3865 classified as normal.
3866
3867    These are the category lines for 'uninstall':
3868
3869              $(PRE_UNINSTALL)     # Pre-uninstall commands follow.
3870              $(POST_UNINSTALL)    # Post-uninstall commands follow.
3871              $(NORMAL_UNINSTALL)  # Normal commands follow.
3872
3873    Typically, a pre-uninstall command would be used for deleting entries
3874 from the Info directory.
3875
3876    If the 'install' or 'uninstall' target has any dependencies which act
3877 as subroutines of installation, then you should start _each_
3878 dependency's commands with a category line, and start the main target's
3879 commands with a category line also.  This way, you can ensure that each
3880 command is placed in the right category regardless of which of the
3881 dependencies actually run.
3882
3883    Pre-installation and post-installation commands should not run any
3884 programs except for these:
3885
3886      [ basename bash cat chgrp chmod chown cmp cp dd diff echo
3887      egrep expand expr false fgrep find getopt grep gunzip gzip
3888      hostname install install-info kill ldconfig ln ls md5sum
3889      mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee
3890      test touch true uname xargs yes
3891
3892    The reason for distinguishing the commands in this way is for the
3893 sake of making binary packages.  Typically a binary package contains all
3894 the executables and other files that need to be installed, and has its
3895 own method of installing them--so it does not need to run the normal
3896 installation commands.  But installing the binary package does need to
3897 execute the pre-installation and post-installation commands.
3898
3899    Programs to build binary packages work by extracting the
3900 pre-installation and post-installation commands.  Here is one way of
3901 extracting the pre-installation commands (the '-s' option to 'make' is
3902 needed to silence messages about entering subdirectories):
3903
3904      make -s -n install -o all \
3905            PRE_INSTALL=pre-install \
3906            POST_INSTALL=post-install \
3907            NORMAL_INSTALL=normal-install \
3908        | gawk -f pre-install.awk
3909
3910 where the file 'pre-install.awk' could contain this:
3911
3912      $0 ~ /^(normal-install|post-install)[ \t]*$/ {on = 0}
3913      on {print $0}
3914      $0 ~ /^pre-install[ \t]*$/ {on = 1}
3915
3916 \1f
3917 File: make.info,  Node: Quick Reference,  Next: Error Messages,  Prev: Makefile Conventions,  Up: Top
3918
3919 Appendix A Quick Reference
3920 **************************
3921
3922 This appendix summarizes the directives, text manipulation functions,
3923 and special variables which GNU 'make' understands.  *Note Special
3924 Targets::, *note Catalogue of Built-In Rules: Catalogue of Rules, and
3925 *note Summary of Options: Options Summary, for other summaries.
3926
3927    Here is a summary of the directives GNU 'make' recognizes:
3928
3929 'define VARIABLE'
3930 'define VARIABLE ='
3931 'define VARIABLE :='
3932 'define VARIABLE ::='
3933 'define VARIABLE +='
3934 'define VARIABLE ?='
3935 'endef'
3936      Define multi-line variables.
3937      *Note Multi-Line::.
3938
3939 'undefine VARIABLE'
3940      Undefining variables.
3941      *Note Undefine Directive::.
3942
3943 'ifdef VARIABLE'
3944 'ifndef VARIABLE'
3945 'ifeq (A,B)'
3946 'ifeq "A" "B"'
3947 'ifeq 'A' 'B''
3948 'ifneq (A,B)'
3949 'ifneq "A" "B"'
3950 'ifneq 'A' 'B''
3951 'else'
3952 'endif'
3953      Conditionally evaluate part of the makefile.
3954      *Note Conditionals::.
3955
3956 'include FILE'
3957 '-include FILE'
3958 'sinclude FILE'
3959      Include another makefile.
3960      *Note Including Other Makefiles: Include.
3961
3962 'override VARIABLE-ASSIGNMENT'
3963      Define a variable, overriding any previous definition, even one
3964      from the command line.
3965      *Note The 'override' Directive: Override Directive.
3966
3967 'export'
3968      Tell 'make' to export all variables to child processes by default.
3969      *Note Communicating Variables to a Sub-'make': Variables/Recursion.
3970
3971 'export VARIABLE'
3972 'export VARIABLE-ASSIGNMENT'
3973 'unexport VARIABLE'
3974      Tell 'make' whether or not to export a particular variable to child
3975      processes.
3976      *Note Communicating Variables to a Sub-'make': Variables/Recursion.
3977
3978 'private VARIABLE-ASSIGNMENT'
3979      Do not allow this variable assignment to be inherited by
3980      prerequisites.
3981      *Note Suppressing Inheritance::.
3982
3983 'vpath PATTERN PATH'
3984      Specify a search path for files matching a '%' pattern.
3985      *Note The 'vpath' Directive: Selective Search.
3986
3987 'vpath PATTERN'
3988      Remove all search paths previously specified for PATTERN.
3989
3990 'vpath'
3991      Remove all search paths previously specified in any 'vpath'
3992      directive.
3993
3994    Here is a summary of the built-in functions (*note Functions::):
3995
3996 '$(subst FROM,TO,TEXT)'
3997      Replace FROM with TO in TEXT.
3998      *Note Functions for String Substitution and Analysis: Text
3999      Functions.
4000
4001 '$(patsubst PATTERN,REPLACEMENT,TEXT)'
4002      Replace words matching PATTERN with REPLACEMENT in TEXT.
4003      *Note Functions for String Substitution and Analysis: Text
4004      Functions.
4005
4006 '$(strip STRING)'
4007      Remove excess whitespace characters from STRING.
4008      *Note Functions for String Substitution and Analysis: Text
4009      Functions.
4010
4011 '$(findstring FIND,TEXT)'
4012      Locate FIND in TEXT.
4013      *Note Functions for String Substitution and Analysis: Text
4014      Functions.
4015
4016 '$(filter PATTERN...,TEXT)'
4017      Select words in TEXT that match one of the PATTERN words.
4018      *Note Functions for String Substitution and Analysis: Text
4019      Functions.
4020
4021 '$(filter-out PATTERN...,TEXT)'
4022      Select words in TEXT that _do not_ match any of the PATTERN words.
4023      *Note Functions for String Substitution and Analysis: Text
4024      Functions.
4025
4026 '$(sort LIST)'
4027      Sort the words in LIST lexicographically, removing duplicates.
4028      *Note Functions for String Substitution and Analysis: Text
4029      Functions.
4030
4031 '$(word N,TEXT)'
4032      Extract the Nth word (one-origin) of TEXT.
4033      *Note Functions for String Substitution and Analysis: Text
4034      Functions.
4035
4036 '$(words TEXT)'
4037      Count the number of words in TEXT.
4038      *Note Functions for String Substitution and Analysis: Text
4039      Functions.
4040
4041 '$(wordlist S,E,TEXT)'
4042      Returns the list of words in TEXT from S to E.
4043      *Note Functions for String Substitution and Analysis: Text
4044      Functions.
4045
4046 '$(firstword NAMES...)'
4047      Extract the first word of NAMES.
4048      *Note Functions for String Substitution and Analysis: Text
4049      Functions.
4050
4051 '$(lastword NAMES...)'
4052      Extract the last word of NAMES.
4053      *Note Functions for String Substitution and Analysis: Text
4054      Functions.
4055
4056 '$(dir NAMES...)'
4057      Extract the directory part of each file name.
4058      *Note Functions for File Names: File Name Functions.
4059
4060 '$(notdir NAMES...)'
4061      Extract the non-directory part of each file name.
4062      *Note Functions for File Names: File Name Functions.
4063
4064 '$(suffix NAMES...)'
4065      Extract the suffix (the last '.' and following characters) of each
4066      file name.
4067      *Note Functions for File Names: File Name Functions.
4068
4069 '$(basename NAMES...)'
4070      Extract the base name (name without suffix) of each file name.
4071      *Note Functions for File Names: File Name Functions.
4072
4073 '$(addsuffix SUFFIX,NAMES...)'
4074      Append SUFFIX to each word in NAMES.
4075      *Note Functions for File Names: File Name Functions.
4076
4077 '$(addprefix PREFIX,NAMES...)'
4078      Prepend PREFIX to each word in NAMES.
4079      *Note Functions for File Names: File Name Functions.
4080
4081 '$(join LIST1,LIST2)'
4082      Join two parallel lists of words.
4083      *Note Functions for File Names: File Name Functions.
4084
4085 '$(wildcard PATTERN...)'
4086      Find file names matching a shell file name pattern (_not_ a '%'
4087      pattern).
4088      *Note The Function 'wildcard': Wildcard Function.
4089
4090 '$(realpath NAMES...)'
4091      For each file name in NAMES, expand to an absolute name that does
4092      not contain any '.', '..', nor symlinks.
4093      *Note Functions for File Names: File Name Functions.
4094
4095 '$(abspath NAMES...)'
4096      For each file name in NAMES, expand to an absolute name that does
4097      not contain any '.' or '..' components, but preserves symlinks.
4098      *Note Functions for File Names: File Name Functions.
4099
4100 '$(error TEXT...)'
4101      When this function is evaluated, 'make' generates a fatal error
4102      with the message TEXT.
4103      *Note Functions That Control Make: Make Control Functions.
4104
4105 '$(warning TEXT...)'
4106      When this function is evaluated, 'make' generates a warning with
4107      the message TEXT.
4108      *Note Functions That Control Make: Make Control Functions.
4109
4110 '$(shell COMMAND)'
4111      Execute a shell command and return its output.
4112      *Note The 'shell' Function: Shell Function.
4113
4114 '$(origin VARIABLE)'
4115      Return a string describing how the 'make' variable VARIABLE was
4116      defined.
4117      *Note The 'origin' Function: Origin Function.
4118
4119 '$(flavor VARIABLE)'
4120      Return a string describing the flavor of the 'make' variable
4121      VARIABLE.
4122      *Note The 'flavor' Function: Flavor Function.
4123
4124 '$(foreach VAR,WORDS,TEXT)'
4125      Evaluate TEXT with VAR bound to each word in WORDS, and concatenate
4126      the results.
4127      *Note The 'foreach' Function: Foreach Function.
4128
4129 '$(if CONDITION,THEN-PART[,ELSE-PART])'
4130      Evaluate the condition CONDITION; if it's non-empty substitute the
4131      expansion of the THEN-PART otherwise substitute the expansion of
4132      the ELSE-PART.
4133      *Note Functions for Conditionals: Conditional Functions.
4134
4135 '$(or CONDITION1[,CONDITION2[,CONDITION3...]])'
4136      Evaluate each condition CONDITIONN one at a time; substitute the
4137      first non-empty expansion.  If all expansions are empty, substitute
4138      the empty string.
4139      *Note Functions for Conditionals: Conditional Functions.
4140
4141 '$(and CONDITION1[,CONDITION2[,CONDITION3...]])'
4142      Evaluate each condition CONDITIONN one at a time; if any expansion
4143      results in the empty string substitute the empty string.  If all
4144      expansions result in a non-empty string, substitute the expansion
4145      of the last CONDITION.
4146      *Note Functions for Conditionals: Conditional Functions.
4147
4148 '$(call VAR,PARAM,...)'
4149      Evaluate the variable VAR replacing any references to '$(1)',
4150      '$(2)' with the first, second, etc. PARAM values.
4151      *Note The 'call' Function: Call Function.
4152
4153 '$(eval TEXT)'
4154      Evaluate TEXT then read the results as makefile commands.  Expands
4155      to the empty string.
4156      *Note The 'eval' Function: Eval Function.
4157
4158 '$(file OP FILENAME,TEXT)'
4159      Expand the arguments, then open the file FILENAME using mode OP and
4160      write TEXT to that file.
4161      *Note The 'file' Function: File Function.
4162
4163 '$(value VAR)'
4164      Evaluates to the contents of the variable VAR, with no expansion
4165      performed on it.
4166      *Note The 'value' Function: Value Function.
4167
4168    Here is a summary of the automatic variables.  *Note Automatic
4169 Variables::, for full information.
4170
4171 '$@'
4172      The file name of the target.
4173
4174 '$%'
4175      The target member name, when the target is an archive member.
4176
4177 '$<'
4178      The name of the first prerequisite.
4179
4180 '$?'
4181      The names of all the prerequisites that are newer than the target,
4182      with spaces between them.  For prerequisites which are archive
4183      members, only the named member is used (*note Archives::).
4184
4185 '$^'
4186 '$+'
4187      The names of all the prerequisites, with spaces between them.  For
4188      prerequisites which are archive members, only the named member is
4189      used (*note Archives::).  The value of '$^' omits duplicate
4190      prerequisites, while '$+' retains them and preserves their order.
4191
4192 '$*'
4193      The stem with which an implicit rule matches (*note How Patterns
4194      Match: Pattern Match.).
4195
4196 '$(@D)'
4197 '$(@F)'
4198      The directory part and the file-within-directory part of '$@'.
4199
4200 '$(*D)'
4201 '$(*F)'
4202      The directory part and the file-within-directory part of '$*'.
4203
4204 '$(%D)'
4205 '$(%F)'
4206      The directory part and the file-within-directory part of '$%'.
4207
4208 '$(<D)'
4209 '$(<F)'
4210      The directory part and the file-within-directory part of '$<'.
4211
4212 '$(^D)'
4213 '$(^F)'
4214      The directory part and the file-within-directory part of '$^'.
4215
4216 '$(+D)'
4217 '$(+F)'
4218      The directory part and the file-within-directory part of '$+'.
4219
4220 '$(?D)'
4221 '$(?F)'
4222      The directory part and the file-within-directory part of '$?'.
4223
4224    These variables are used specially by GNU 'make':
4225
4226 'MAKEFILES'
4227
4228      Makefiles to be read on every invocation of 'make'.
4229      *Note The Variable 'MAKEFILES': MAKEFILES Variable.
4230
4231 'VPATH'
4232
4233      Directory search path for files not found in the current directory.
4234      *Note 'VPATH' Search Path for All Prerequisites: General Search.
4235
4236 'SHELL'
4237
4238      The name of the system default command interpreter, usually
4239      '/bin/sh'.  You can set 'SHELL' in the makefile to change the shell
4240      used to run recipes.  *Note Recipe Execution: Execution.  The
4241      'SHELL' variable is handled specially when importing from and
4242      exporting to the environment.  *Note Choosing the Shell::.
4243
4244 'MAKESHELL'
4245
4246      On MS-DOS only, the name of the command interpreter that is to be
4247      used by 'make'.  This value takes precedence over the value of
4248      'SHELL'.  *Note MAKESHELL variable: Execution.
4249
4250 'MAKE'
4251
4252      The name with which 'make' was invoked.  Using this variable in
4253      recipes has special meaning.  *Note How the 'MAKE' Variable Works:
4254      MAKE Variable.
4255
4256 'MAKE_VERSION'
4257
4258      The built-in variable 'MAKE_VERSION' expands to the version number
4259      of the GNU 'make' program.
4260
4261 'MAKE_HOST'
4262
4263      The built-in variable 'MAKE_HOST' expands to a string representing
4264      the host that GNU 'make' was built to run on.
4265
4266 'MAKELEVEL'
4267
4268      The number of levels of recursion (sub-'make's).
4269      *Note Variables/Recursion::.
4270
4271 'MAKEFLAGS'
4272
4273      The flags given to 'make'.  You can set this in the environment or
4274      a makefile to set flags.
4275      *Note Communicating Options to a Sub-'make': Options/Recursion.
4276
4277      It is _never_ appropriate to use 'MAKEFLAGS' directly in a recipe
4278      line: its contents may not be quoted correctly for use in the
4279      shell.  Always allow recursive 'make''s to obtain these values
4280      through the environment from its parent.
4281
4282 'GNUMAKEFLAGS'
4283
4284      Other flags parsed by 'make'.  You can set this in the environment
4285      or a makefile to set 'make' command-line flags.  GNU 'make' never
4286      sets this variable itself.  This variable is only needed if you'd
4287      like to set GNU 'make'-specific flags in a POSIX-compliant
4288      makefile.  This variable will be seen by GNU 'make' and ignored by
4289      other 'make' implementations.  It's not needed if you only use GNU
4290      'make'; just use 'MAKEFLAGS' directly.  *Note Communicating Options
4291      to a Sub-'make': Options/Recursion.
4292
4293 'MAKECMDGOALS'
4294
4295      The targets given to 'make' on the command line.  Setting this
4296      variable has no effect on the operation of 'make'.
4297      *Note Arguments to Specify the Goals: Goals.
4298
4299 'CURDIR'
4300
4301      Set to the absolute pathname of the current working directory
4302      (after all '-C' options are processed, if any).  Setting this
4303      variable has no effect on the operation of 'make'.
4304      *Note Recursive Use of 'make': Recursion.
4305
4306 'SUFFIXES'
4307
4308      The default list of suffixes before 'make' reads any makefiles.
4309
4310 '.LIBPATTERNS'
4311      Defines the naming of the libraries 'make' searches for, and their
4312      order.
4313      *Note Directory Search for Link Libraries: Libraries/Search.
4314
4315 \1f
4316 File: make.info,  Node: Error Messages,  Next: Complex Makefile,  Prev: Quick Reference,  Up: Top
4317
4318 Appendix B Errors Generated by Make
4319 ***********************************
4320
4321 Here is a list of the more common errors you might see generated by
4322 'make', and some information about what they mean and how to fix them.
4323
4324    Sometimes 'make' errors are not fatal, especially in the presence of
4325 a '-' prefix on a recipe line, or the '-k' command line option.  Errors
4326 that are fatal are prefixed with the string '***'.
4327
4328    Error messages are all either prefixed with the name of the program
4329 (usually 'make'), or, if the error is found in a makefile, the name of
4330 the file and line number containing the problem.
4331
4332    In the table below, these common prefixes are left off.
4333
4334 '[FOO] Error NN'
4335 '[FOO] SIGNAL DESCRIPTION'
4336      These errors are not really 'make' errors at all.  They mean that a
4337      program that 'make' invoked as part of a recipe returned a non-0
4338      error code ('Error NN'), which 'make' interprets as failure, or it
4339      exited in some other abnormal fashion (with a signal of some type).
4340      *Note Errors in Recipes: Errors.
4341
4342      If no '***' is attached to the message, then the sub-process failed
4343      but the rule in the makefile was prefixed with the '-' special
4344      character, so 'make' ignored the error.
4345
4346 'missing separator. Stop.'
4347 'missing separator (did you mean TAB instead of 8 spaces?). Stop.'
4348      This means that 'make' could not understand much of anything about
4349      the makefile line it just read.  GNU 'make' looks for various
4350      separators (':', '=', recipe prefix characters, etc.)  to indicate
4351      what kind of line it's parsing.  This message means it couldn't
4352      find a valid one.
4353
4354      One of the most common reasons for this message is that you (or
4355      perhaps your oh-so-helpful editor, as is the case with many
4356      MS-Windows editors) have attempted to indent your recipe lines with
4357      spaces instead of a tab character.  In this case, 'make' will use
4358      the second form of the error above.  Remember that every line in
4359      the recipe must begin with a tab character (unless you set
4360      '.RECIPEPREFIX'; *note Special Variables::).  Eight spaces do not
4361      count.  *Note Rule Syntax::.
4362
4363 'recipe commences before first target. Stop.'
4364 'missing rule before recipe. Stop.'
4365      This means the first thing in the makefile seems to be part of a
4366      recipe: it begins with a recipe prefix character and doesn't appear
4367      to be a legal 'make' directive (such as a variable assignment).
4368      Recipes must always be associated with a target.
4369
4370      The second form is generated if the line has a semicolon as the
4371      first non-whitespace character; 'make' interprets this to mean you
4372      left out the "target: prerequisite" section of a rule.  *Note Rule
4373      Syntax::.
4374
4375 'No rule to make target `XXX'.'
4376 'No rule to make target `XXX', needed by `YYY'.'
4377      This means that 'make' decided it needed to build a target, but
4378      then couldn't find any instructions in the makefile on how to do
4379      that, either explicit or implicit (including in the default rules
4380      database).
4381
4382      If you want that file to be built, you will need to add a rule to
4383      your makefile describing how that target can be built.  Other
4384      possible sources of this problem are typos in the makefile (if that
4385      file name is wrong) or a corrupted source tree (if that file is not
4386      supposed to be built, but rather only a prerequisite).
4387
4388 'No targets specified and no makefile found. Stop.'
4389 'No targets. Stop.'
4390      The former means that you didn't provide any targets to be built on
4391      the command line, and 'make' couldn't find any makefiles to read
4392      in.  The latter means that some makefile was found, but it didn't
4393      contain any default goal and none was given on the command line.
4394      GNU 'make' has nothing to do in these situations.  *Note Arguments
4395      to Specify the Makefile: Makefile Arguments.
4396
4397 'Makefile `XXX' was not found.'
4398 'Included makefile `XXX' was not found.'
4399      A makefile specified on the command line (first form) or included
4400      (second form) was not found.
4401
4402 'warning: overriding recipe for target `XXX''
4403 'warning: ignoring old recipe for target `XXX''
4404      GNU 'make' allows only one recipe to be specified per target
4405      (except for double-colon rules).  If you give a recipe for a target
4406      which already has been defined to have one, this warning is issued
4407      and the second recipe will overwrite the first.  *Note Multiple
4408      Rules for One Target: Multiple Rules.
4409
4410 'Circular XXX <- YYY dependency dropped.'
4411      This means that 'make' detected a loop in the dependency graph:
4412      after tracing the prerequisite YYY of target XXX, and its
4413      prerequisites, etc., one of them depended on XXX again.
4414
4415 'Recursive variable `XXX' references itself (eventually). Stop.'
4416      This means you've defined a normal (recursive) 'make' variable XXX
4417      that, when it's expanded, will refer to itself (XXX).  This is not
4418      allowed; either use simply-expanded variables (':=' or '::=') or
4419      use the append operator ('+=').  *Note How to Use Variables: Using
4420      Variables.
4421
4422 'Unterminated variable reference. Stop.'
4423      This means you forgot to provide the proper closing parenthesis or
4424      brace in your variable or function reference.
4425
4426 'insufficient arguments to function `XXX'. Stop.'
4427      This means you haven't provided the requisite number of arguments
4428      for this function.  See the documentation of the function for a
4429      description of its arguments.  *Note Functions for Transforming
4430      Text: Functions.
4431
4432 'missing target pattern. Stop.'
4433 'multiple target patterns. Stop.'
4434 'target pattern contains no `%'. Stop.'
4435 'mixed implicit and static pattern rules. Stop.'
4436      These errors are generated for malformed static pattern rules
4437      (*note Syntax of Static Pattern Rules: Static Usage.).  The first
4438      means the target-pattern part of the rule is empty; the second
4439      means there are multiple pattern characters ('%') in the
4440      target-pattern part; the third means there are no pattern
4441      characters in the target-pattern part; and the fourth means that
4442      all three parts of the static pattern rule contain pattern
4443      characters ('%')-the first part should not contain pattern
4444      characters.
4445
4446      If you see these errors and you aren't trying to create a static
4447      pattern rule, check the value of any variables in your target and
4448      prerequisite lists to be sure they do not contain colons.
4449
4450 'warning: -jN forced in submake: disabling jobserver mode.'
4451      This warning and the next are generated if 'make' detects error
4452      conditions related to parallel processing on systems where
4453      sub-'make's can communicate (*note Communicating Options to a
4454      Sub-'make': Options/Recursion.).  This warning is generated if a
4455      recursive invocation of a 'make' process is forced to have '-jN' in
4456      its argument list (where N is greater than one).  This could
4457      happen, for example, if you set the 'MAKE' environment variable to
4458      'make -j2'.  In this case, the sub-'make' doesn't communicate with
4459      other 'make' processes and will simply pretend it has two jobs of
4460      its own.
4461
4462 'warning: jobserver unavailable: using -j1. Add `+' to parent make rule.'
4463      In order for 'make' processes to communicate, the parent will pass
4464      information to the child.  Since this could result in problems if
4465      the child process isn't actually a 'make', the parent will only do
4466      this if it thinks the child is a 'make'.  The parent uses the
4467      normal algorithms to determine this (*note How the 'MAKE' Variable
4468      Works: MAKE Variable.).  If the makefile is constructed such that
4469      the parent doesn't know the child is a 'make' process, then the
4470      child will receive only part of the information necessary.  In this
4471      case, the child will generate this warning message and proceed with
4472      its build in a sequential manner.
4473
4474 'warning: ignoring prerequisites on suffix rule definition'
4475      According to POSIX, a suffix rule cannot contain prerequisites.  If
4476      a rule that could be a suffix rule has prerequisites it is
4477      interpreted as a simple explicit rule, with an odd target name.
4478      This requirement is obeyed when POSIX-conforming mode is enabled
4479      (the '.POSIX' target is defined).  In versions of GNU 'make' prior
4480      to 4.3, no warning was emitted and a suffix rule was created,
4481      however all prerequisites were ignored and were not part of the
4482      suffix rule.  Starting with GNU 'make' 4.3 the behavior is the
4483      same, and in addition this warning is generated.  In a future
4484      version the POSIX-conforming behavior will be the only behavior: no
4485      rule with a prerequisite can be suffix rule and this warning will
4486      be removed.
4487
4488 \1f
4489 File: make.info,  Node: Complex Makefile,  Next: GNU Free Documentation License,  Prev: Error Messages,  Up: Top
4490
4491 Appendix C Complex Makefile Example
4492 ***********************************
4493
4494 Here is the makefile for the GNU 'tar' program.  This is a moderately
4495 complex makefile.  The first line uses a '#!' setting to allow the
4496 makefile to be executed directly.
4497
4498    Because it is the first target, the default goal is 'all'.  An
4499 interesting feature of this makefile is that 'testpad.h' is a source
4500 file automatically created by the 'testpad' program, itself compiled
4501 from 'testpad.c'.
4502
4503    If you type 'make' or 'make all', then 'make' creates the 'tar'
4504 executable, the 'rmt' daemon that provides remote tape access, and the
4505 'tar.info' Info file.
4506
4507    If you type 'make install', then 'make' not only creates 'tar',
4508 'rmt', and 'tar.info', but also installs them.
4509
4510    If you type 'make clean', then 'make' removes the '.o' files, and the
4511 'tar', 'rmt', 'testpad', 'testpad.h', and 'core' files.
4512
4513    If you type 'make distclean', then 'make' not only removes the same
4514 files as does 'make clean' but also the 'TAGS', 'Makefile', and
4515 'config.status' files.  (Although it is not evident, this makefile (and
4516 'config.status') is generated by the user with the 'configure' program,
4517 which is provided in the 'tar' distribution, but is not shown here.)
4518
4519    If you type 'make realclean', then 'make' removes the same files as
4520 does 'make distclean' and also removes the Info files generated from
4521 'tar.texinfo'.
4522
4523    In addition, there are targets 'shar' and 'dist' that create
4524 distribution kits.
4525
4526      #!/usr/bin/make -f
4527      # Generated automatically from Makefile.in by configure.
4528      # Un*x Makefile for GNU tar program.
4529      # Copyright (C) 1991 Free Software Foundation, Inc.
4530
4531      # This program is free software; you can redistribute
4532      # it and/or modify it under the terms of the GNU
4533      # General Public License ...
4534      ...
4535      ...
4536
4537      SHELL = /bin/sh
4538
4539      #### Start of system configuration section. ####
4540
4541      srcdir = .
4542
4543      # If you use gcc, you should either run the
4544      # fixincludes script that comes with it or else use
4545      # gcc with the -traditional option.  Otherwise ioctl
4546      # calls will be compiled incorrectly on some systems.
4547      CC = gcc -O
4548      YACC = bison -y
4549      INSTALL = /usr/local/bin/install -c
4550      INSTALLDATA = /usr/local/bin/install -c -m 644
4551
4552      # Things you might add to DEFS:
4553      # -DSTDC_HEADERS        If you have ANSI C headers and
4554      #                       libraries.
4555      # -DPOSIX               If you have POSIX.1 headers and
4556      #                       libraries.
4557      # -DBSD42               If you have sys/dir.h (unless
4558      #                       you use -DPOSIX), sys/file.h,
4559      #                       and st_blocks in `struct stat'.
4560      # -DUSG                 If you have System V/ANSI C
4561      #                       string and memory functions
4562      #                       and headers, sys/sysmacros.h,
4563      #                       fcntl.h, getcwd, no valloc,
4564      #                       and ndir.h (unless
4565      #                       you use -DDIRENT).
4566      # -DNO_MEMORY_H         If USG or STDC_HEADERS but do not
4567      #                       include memory.h.
4568      # -DDIRENT              If USG and you have dirent.h
4569      #                       instead of ndir.h.
4570      # -DSIGTYPE=int         If your signal handlers
4571      #                       return int, not void.
4572      # -DNO_MTIO             If you lack sys/mtio.h
4573      #                       (magtape ioctls).
4574      # -DNO_REMOTE           If you do not have a remote shell
4575      #                       or rexec.
4576      # -DUSE_REXEC           To use rexec for remote tape
4577      #                       operations instead of
4578      #                       forking rsh or remsh.
4579      # -DVPRINTF_MISSING     If you lack vprintf function
4580      #                       (but have _doprnt).
4581      # -DDOPRNT_MISSING      If you lack _doprnt function.
4582      #                       Also need to define
4583      #                       -DVPRINTF_MISSING.
4584      # -DFTIME_MISSING       If you lack ftime system call.
4585      # -DSTRSTR_MISSING      If you lack strstr function.
4586      # -DVALLOC_MISSING      If you lack valloc function.
4587      # -DMKDIR_MISSING       If you lack mkdir and
4588      #                       rmdir system calls.
4589      # -DRENAME_MISSING      If you lack rename system call.
4590      # -DFTRUNCATE_MISSING   If you lack ftruncate
4591      #                       system call.
4592      # -DV7                  On Version 7 Unix (not
4593      #                       tested in a long time).
4594      # -DEMUL_OPEN3          If you lack a 3-argument version
4595      #                       of open, and want to emulate it
4596      #                       with system calls you do have.
4597      # -DNO_OPEN3            If you lack the 3-argument open
4598      #                       and want to disable the tar -k
4599      #                       option instead of emulating open.
4600      # -DXENIX               If you have sys/inode.h
4601      #                       and need it 94 to be included.
4602
4603      DEFS =  -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
4604              -DVPRINTF_MISSING -DBSD42
4605      # Set this to rtapelib.o unless you defined NO_REMOTE,
4606      # in which case make it empty.
4607      RTAPELIB = rtapelib.o
4608      LIBS =
4609      DEF_AR_FILE = /dev/rmt8
4610      DEFBLOCKING = 20
4611
4612      CDEBUG = -g
4613      CFLAGS = $(CDEBUG) -I. -I$(srcdir) $(DEFS) \
4614              -DDEF_AR_FILE=\"$(DEF_AR_FILE)\" \
4615              -DDEFBLOCKING=$(DEFBLOCKING)
4616      LDFLAGS = -g
4617
4618      prefix = /usr/local
4619      # Prefix for each installed program,
4620      # normally empty or `g'.
4621      binprefix =
4622
4623      # The directory to install tar in.
4624      bindir = $(prefix)/bin
4625
4626      # The directory to install the info files in.
4627      infodir = $(prefix)/info
4628
4629      #### End of system configuration section. ####
4630
4631      SRCS_C  = tar.c create.c extract.c buffer.c   \
4632                getoldopt.c update.c gnu.c mangle.c \
4633                version.c list.c names.c diffarch.c \
4634                port.c wildmat.c getopt.c getopt1.c \
4635                regex.c
4636      SRCS_Y  = getdate.y
4637      SRCS    = $(SRCS_C) $(SRCS_Y)
4638      OBJS    = $(SRCS_C:.c=.o) $(SRCS_Y:.y=.o) $(RTAPELIB)
4639      AUX =   README COPYING ChangeLog Makefile.in  \
4640              makefile.pc configure configure.in \
4641              tar.texinfo tar.info* texinfo.tex \
4642              tar.h port.h open3.h getopt.h regex.h \
4643              rmt.h rmt.c rtapelib.c alloca.c \
4644              msd_dir.h msd_dir.c tcexparg.c \
4645              level-0 level-1 backup-specs testpad.c
4646
4647      .PHONY: all
4648      all:    tar rmt tar.info
4649
4650      tar:    $(OBJS)
4651              $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
4652
4653      rmt:    rmt.c
4654              $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rmt.c
4655
4656      tar.info: tar.texinfo
4657              makeinfo tar.texinfo
4658
4659      .PHONY: install
4660      install: all
4661              $(INSTALL) tar $(bindir)/$(binprefix)tar
4662              -test ! -f rmt || $(INSTALL) rmt /etc/rmt
4663              $(INSTALLDATA) $(srcdir)/tar.info* $(infodir)
4664
4665      $(OBJS): tar.h port.h testpad.h
4666      regex.o buffer.o tar.o: regex.h
4667      # getdate.y has 8 shift/reduce conflicts.
4668
4669      testpad.h: testpad
4670              ./testpad
4671
4672      testpad: testpad.o
4673              $(CC) -o $@ testpad.o
4674
4675      TAGS:   $(SRCS)
4676              etags $(SRCS)
4677
4678      .PHONY: clean
4679      clean:
4680              rm -f *.o tar rmt testpad testpad.h core
4681
4682      .PHONY: distclean
4683      distclean: clean
4684              rm -f TAGS Makefile config.status
4685
4686      .PHONY: realclean
4687      realclean: distclean
4688              rm -f tar.info*
4689
4690      .PHONY: shar
4691      shar: $(SRCS) $(AUX)
4692              shar $(SRCS) $(AUX) | compress \
4693                > tar-`sed -e '/version_string/!d' \
4694                           -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
4695                           -e q
4696                           version.c`.shar.Z
4697
4698      .PHONY: dist
4699      dist: $(SRCS) $(AUX)
4700              echo tar-`sed \
4701                   -e '/version_string/!d' \
4702                   -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
4703                   -e q
4704                   version.c` > .fname
4705              -rm -rf `cat .fname`
4706              mkdir `cat .fname`
4707              ln $(SRCS) $(AUX) `cat .fname`
4708              tar chZf `cat .fname`.tar.Z `cat .fname`
4709              -rm -rf `cat .fname` .fname
4710
4711      tar.zoo: $(SRCS) $(AUX)
4712              -rm -rf tmp.dir
4713              -mkdir tmp.dir
4714              -rm tar.zoo
4715              for X in $(SRCS) $(AUX) ; do \
4716                  echo $$X ; \
4717                  sed 's/$$/^M/' $$X \
4718                  > tmp.dir/$$X ; done
4719              cd tmp.dir ; zoo aM ../tar.zoo *
4720              -rm -rf tmp.dir
4721
4722 \1f
4723 File: make.info,  Node: GNU Free Documentation License,  Next: Concept Index,  Prev: Complex Makefile,  Up: Top
4724
4725 Appendix D GNU Free Documentation License
4726 *****************************************
4727
4728                      Version 1.3, 3 November 2008
4729
4730      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
4731      <https://fsf.org/>
4732
4733      Everyone is permitted to copy and distribute verbatim copies
4734      of this license document, but changing it is not allowed.
4735
4736   0. PREAMBLE
4737
4738      The purpose of this License is to make a manual, textbook, or other
4739      functional and useful document "free" in the sense of freedom: to
4740      assure everyone the effective freedom to copy and redistribute it,
4741      with or without modifying it, either commercially or
4742      noncommercially.  Secondarily, this License preserves for the
4743      author and publisher a way to get credit for their work, while not
4744      being considered responsible for modifications made by others.
4745
4746      This License is a kind of "copyleft", which means that derivative
4747      works of the document must themselves be free in the same sense.
4748      It complements the GNU General Public License, which is a copyleft
4749      license designed for free software.
4750
4751      We have designed this License in order to use it for manuals for
4752      free software, because free software needs free documentation: a
4753      free program should come with manuals providing the same freedoms
4754      that the software does.  But this License is not limited to
4755      software manuals; it can be used for any textual work, regardless
4756      of subject matter or whether it is published as a printed book.  We
4757      recommend this License principally for works whose purpose is
4758      instruction or reference.
4759
4760   1. APPLICABILITY AND DEFINITIONS
4761
4762      This License applies to any manual or other work, in any medium,
4763      that contains a notice placed by the copyright holder saying it can
4764      be distributed under the terms of this License.  Such a notice
4765      grants a world-wide, royalty-free license, unlimited in duration,
4766      to use that work under the conditions stated herein.  The
4767      "Document", below, refers to any such manual or work.  Any member
4768      of the public is a licensee, and is addressed as "you".  You accept
4769      the license if you copy, modify or distribute the work in a way
4770      requiring permission under copyright law.
4771
4772      A "Modified Version" of the Document means any work containing the
4773      Document or a portion of it, either copied verbatim, or with
4774      modifications and/or translated into another language.
4775
4776      A "Secondary Section" is a named appendix or a front-matter section
4777      of the Document that deals exclusively with the relationship of the
4778      publishers or authors of the Document to the Document's overall
4779      subject (or to related matters) and contains nothing that could
4780      fall directly within that overall subject.  (Thus, if the Document
4781      is in part a textbook of mathematics, a Secondary Section may not
4782      explain any mathematics.)  The relationship could be a matter of
4783      historical connection with the subject or with related matters, or
4784      of legal, commercial, philosophical, ethical or political position
4785      regarding them.
4786
4787      The "Invariant Sections" are certain Secondary Sections whose
4788      titles are designated, as being those of Invariant Sections, in the
4789      notice that says that the Document is released under this License.
4790      If a section does not fit the above definition of Secondary then it
4791      is not allowed to be designated as Invariant.  The Document may
4792      contain zero Invariant Sections.  If the Document does not identify
4793      any Invariant Sections then there are none.
4794
4795      The "Cover Texts" are certain short passages of text that are
4796      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
4797      that says that the Document is released under this License.  A
4798      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
4799      be at most 25 words.
4800
4801      A "Transparent" copy of the Document means a machine-readable copy,
4802      represented in a format whose specification is available to the
4803      general public, that is suitable for revising the document
4804      straightforwardly with generic text editors or (for images composed
4805      of pixels) generic paint programs or (for drawings) some widely
4806      available drawing editor, and that is suitable for input to text
4807      formatters or for automatic translation to a variety of formats
4808      suitable for input to text formatters.  A copy made in an otherwise
4809      Transparent file format whose markup, or absence of markup, has
4810      been arranged to thwart or discourage subsequent modification by
4811      readers is not Transparent.  An image format is not Transparent if
4812      used for any substantial amount of text.  A copy that is not
4813      "Transparent" is called "Opaque".
4814
4815      Examples of suitable formats for Transparent copies include plain
4816      ASCII without markup, Texinfo input format, LaTeX input format,
4817      SGML or XML using a publicly available DTD, and standard-conforming
4818      simple HTML, PostScript or PDF designed for human modification.
4819      Examples of transparent image formats include PNG, XCF and JPG.
4820      Opaque formats include proprietary formats that can be read and
4821      edited only by proprietary word processors, SGML or XML for which
4822      the DTD and/or processing tools are not generally available, and
4823      the machine-generated HTML, PostScript or PDF produced by some word
4824      processors for output purposes only.
4825
4826      The "Title Page" means, for a printed book, the title page itself,
4827      plus such following pages as are needed to hold, legibly, the
4828      material this License requires to appear in the title page.  For
4829      works in formats which do not have any title page as such, "Title
4830      Page" means the text near the most prominent appearance of the
4831      work's title, preceding the beginning of the body of the text.
4832
4833      The "publisher" means any person or entity that distributes copies
4834      of the Document to the public.
4835
4836      A section "Entitled XYZ" means a named subunit of the Document
4837      whose title either is precisely XYZ or contains XYZ in parentheses
4838      following text that translates XYZ in another language.  (Here XYZ
4839      stands for a specific section name mentioned below, such as
4840      "Acknowledgements", "Dedications", "Endorsements", or "History".)
4841      To "Preserve the Title" of such a section when you modify the
4842      Document means that it remains a section "Entitled XYZ" according
4843      to this definition.
4844
4845      The Document may include Warranty Disclaimers next to the notice
4846      which states that this License applies to the Document.  These
4847      Warranty Disclaimers are considered to be included by reference in
4848      this License, but only as regards disclaiming warranties: any other
4849      implication that these Warranty Disclaimers may have is void and
4850      has no effect on the meaning of this License.
4851
4852   2. VERBATIM COPYING
4853
4854      You may copy and distribute the Document in any medium, either
4855      commercially or noncommercially, provided that this License, the
4856      copyright notices, and the license notice saying this License
4857      applies to the Document are reproduced in all copies, and that you
4858      add no other conditions whatsoever to those of this License.  You
4859      may not use technical measures to obstruct or control the reading
4860      or further copying of the copies you make or distribute.  However,
4861      you may accept compensation in exchange for copies.  If you
4862      distribute a large enough number of copies you must also follow the
4863      conditions in section 3.
4864
4865      You may also lend copies, under the same conditions stated above,
4866      and you may publicly display copies.
4867
4868   3. COPYING IN QUANTITY
4869
4870      If you publish printed copies (or copies in media that commonly
4871      have printed covers) of the Document, numbering more than 100, and
4872      the Document's license notice requires Cover Texts, you must
4873      enclose the copies in covers that carry, clearly and legibly, all
4874      these Cover Texts: Front-Cover Texts on the front cover, and
4875      Back-Cover Texts on the back cover.  Both covers must also clearly
4876      and legibly identify you as the publisher of these copies.  The
4877      front cover must present the full title with all words of the title
4878      equally prominent and visible.  You may add other material on the
4879      covers in addition.  Copying with changes limited to the covers, as
4880      long as they preserve the title of the Document and satisfy these
4881      conditions, can be treated as verbatim copying in other respects.
4882
4883      If the required texts for either cover are too voluminous to fit
4884      legibly, you should put the first ones listed (as many as fit
4885      reasonably) on the actual cover, and continue the rest onto
4886      adjacent pages.
4887
4888      If you publish or distribute Opaque copies of the Document
4889      numbering more than 100, you must either include a machine-readable
4890      Transparent copy along with each Opaque copy, or state in or with
4891      each Opaque copy a computer-network location from which the general
4892      network-using public has access to download using public-standard
4893      network protocols a complete Transparent copy of the Document, free
4894      of added material.  If you use the latter option, you must take
4895      reasonably prudent steps, when you begin distribution of Opaque
4896      copies in quantity, to ensure that this Transparent copy will
4897      remain thus accessible at the stated location until at least one
4898      year after the last time you distribute an Opaque copy (directly or
4899      through your agents or retailers) of that edition to the public.
4900
4901      It is requested, but not required, that you contact the authors of
4902      the Document well before redistributing any large number of copies,
4903      to give them a chance to provide you with an updated version of the
4904      Document.
4905
4906   4. MODIFICATIONS
4907
4908      You may copy and distribute a Modified Version of the Document
4909      under the conditions of sections 2 and 3 above, provided that you
4910      release the Modified Version under precisely this License, with the
4911      Modified Version filling the role of the Document, thus licensing
4912      distribution and modification of the Modified Version to whoever
4913      possesses a copy of it.  In addition, you must do these things in
4914      the Modified Version:
4915
4916        A. Use in the Title Page (and on the covers, if any) a title
4917           distinct from that of the Document, and from those of previous
4918           versions (which should, if there were any, be listed in the
4919           History section of the Document).  You may use the same title
4920           as a previous version if the original publisher of that
4921           version gives permission.
4922
4923        B. List on the Title Page, as authors, one or more persons or
4924           entities responsible for authorship of the modifications in
4925           the Modified Version, together with at least five of the
4926           principal authors of the Document (all of its principal
4927           authors, if it has fewer than five), unless they release you
4928           from this requirement.
4929
4930        C. State on the Title page the name of the publisher of the
4931           Modified Version, as the publisher.
4932
4933        D. Preserve all the copyright notices of the Document.
4934
4935        E. Add an appropriate copyright notice for your modifications
4936           adjacent to the other copyright notices.
4937
4938        F. Include, immediately after the copyright notices, a license
4939           notice giving the public permission to use the Modified
4940           Version under the terms of this License, in the form shown in
4941           the Addendum below.
4942
4943        G. Preserve in that license notice the full lists of Invariant
4944           Sections and required Cover Texts given in the Document's
4945           license notice.
4946
4947        H. Include an unaltered copy of this License.
4948
4949        I. Preserve the section Entitled "History", Preserve its Title,
4950           and add to it an item stating at least the title, year, new
4951           authors, and publisher of the Modified Version as given on the
4952           Title Page.  If there is no section Entitled "History" in the
4953           Document, create one stating the title, year, authors, and
4954           publisher of the Document as given on its Title Page, then add
4955           an item describing the Modified Version as stated in the
4956           previous sentence.
4957
4958        J. Preserve the network location, if any, given in the Document
4959           for public access to a Transparent copy of the Document, and
4960           likewise the network locations given in the Document for
4961           previous versions it was based on.  These may be placed in the
4962           "History" section.  You may omit a network location for a work
4963           that was published at least four years before the Document
4964           itself, or if the original publisher of the version it refers
4965           to gives permission.
4966
4967        K. For any section Entitled "Acknowledgements" or "Dedications",
4968           Preserve the Title of the section, and preserve in the section
4969           all the substance and tone of each of the contributor
4970           acknowledgements and/or dedications given therein.
4971
4972        L. Preserve all the Invariant Sections of the Document, unaltered
4973           in their text and in their titles.  Section numbers or the
4974           equivalent are not considered part of the section titles.
4975
4976        M. Delete any section Entitled "Endorsements".  Such a section
4977           may not be included in the Modified Version.
4978
4979        N. Do not retitle any existing section to be Entitled
4980           "Endorsements" or to conflict in title with any Invariant
4981           Section.
4982
4983        O. Preserve any Warranty Disclaimers.
4984
4985      If the Modified Version includes new front-matter sections or
4986      appendices that qualify as Secondary Sections and contain no
4987      material copied from the Document, you may at your option designate
4988      some or all of these sections as invariant.  To do this, add their
4989      titles to the list of Invariant Sections in the Modified Version's
4990      license notice.  These titles must be distinct from any other
4991      section titles.
4992
4993      You may add a section Entitled "Endorsements", provided it contains
4994      nothing but endorsements of your Modified Version by various
4995      parties--for example, statements of peer review or that the text
4996      has been approved by an organization as the authoritative
4997      definition of a standard.
4998
4999      You may add a passage of up to five words as a Front-Cover Text,
5000      and a passage of up to 25 words as a Back-Cover Text, to the end of
5001      the list of Cover Texts in the Modified Version.  Only one passage
5002      of Front-Cover Text and one of Back-Cover Text may be added by (or
5003      through arrangements made by) any one entity.  If the Document
5004      already includes a cover text for the same cover, previously added
5005      by you or by arrangement made by the same entity you are acting on
5006      behalf of, you may not add another; but you may replace the old
5007      one, on explicit permission from the previous publisher that added
5008      the old one.
5009
5010      The author(s) and publisher(s) of the Document do not by this
5011      License give permission to use their names for publicity for or to
5012      assert or imply endorsement of any Modified Version.
5013
5014   5. COMBINING DOCUMENTS
5015
5016      You may combine the Document with other documents released under
5017      this License, under the terms defined in section 4 above for
5018      modified versions, provided that you include in the combination all
5019      of the Invariant Sections of all of the original documents,
5020      unmodified, and list them all as Invariant Sections of your
5021      combined work in its license notice, and that you preserve all
5022      their Warranty Disclaimers.
5023
5024      The combined work need only contain one copy of this License, and
5025      multiple identical Invariant Sections may be replaced with a single
5026      copy.  If there are multiple Invariant Sections with the same name
5027      but different contents, make the title of each such section unique
5028      by adding at the end of it, in parentheses, the name of the
5029      original author or publisher of that section if known, or else a
5030      unique number.  Make the same adjustment to the section titles in
5031      the list of Invariant Sections in the license notice of the
5032      combined work.
5033
5034      In the combination, you must combine any sections Entitled
5035      "History" in the various original documents, forming one section
5036      Entitled "History"; likewise combine any sections Entitled
5037      "Acknowledgements", and any sections Entitled "Dedications".  You
5038      must delete all sections Entitled "Endorsements."
5039
5040   6. COLLECTIONS OF DOCUMENTS
5041
5042      You may make a collection consisting of the Document and other
5043      documents released under this License, and replace the individual
5044      copies of this License in the various documents with a single copy
5045      that is included in the collection, provided that you follow the
5046      rules of this License for verbatim copying of each of the documents
5047      in all other respects.
5048
5049      You may extract a single document from such a collection, and
5050      distribute it individually under this License, provided you insert
5051      a copy of this License into the extracted document, and follow this
5052      License in all other respects regarding verbatim copying of that
5053      document.
5054
5055   7. AGGREGATION WITH INDEPENDENT WORKS
5056
5057      A compilation of the Document or its derivatives with other
5058      separate and independent documents or works, in or on a volume of a
5059      storage or distribution medium, is called an "aggregate" if the
5060      copyright resulting from the compilation is not used to limit the
5061      legal rights of the compilation's users beyond what the individual
5062      works permit.  When the Document is included in an aggregate, this
5063      License does not apply to the other works in the aggregate which
5064      are not themselves derivative works of the Document.
5065
5066      If the Cover Text requirement of section 3 is applicable to these
5067      copies of the Document, then if the Document is less than one half
5068      of the entire aggregate, the Document's Cover Texts may be placed
5069      on covers that bracket the Document within the aggregate, or the
5070      electronic equivalent of covers if the Document is in electronic
5071      form.  Otherwise they must appear on printed covers that bracket
5072      the whole aggregate.
5073
5074   8. TRANSLATION
5075
5076      Translation is considered a kind of modification, so you may
5077      distribute translations of the Document under the terms of section
5078      4.  Replacing Invariant Sections with translations requires special
5079      permission from their copyright holders, but you may include
5080      translations of some or all Invariant Sections in addition to the
5081      original versions of these Invariant Sections.  You may include a
5082      translation of this License, and all the license notices in the
5083      Document, and any Warranty Disclaimers, provided that you also
5084      include the original English version of this License and the
5085      original versions of those notices and disclaimers.  In case of a
5086      disagreement between the translation and the original version of
5087      this License or a notice or disclaimer, the original version will
5088      prevail.
5089
5090      If a section in the Document is Entitled "Acknowledgements",
5091      "Dedications", or "History", the requirement (section 4) to
5092      Preserve its Title (section 1) will typically require changing the
5093      actual title.
5094
5095   9. TERMINATION
5096
5097      You may not copy, modify, sublicense, or distribute the Document
5098      except as expressly provided under this License.  Any attempt
5099      otherwise to copy, modify, sublicense, or distribute it is void,
5100      and will automatically terminate your rights under this License.
5101
5102      However, if you cease all violation of this License, then your
5103      license from a particular copyright holder is reinstated (a)
5104      provisionally, unless and until the copyright holder explicitly and
5105      finally terminates your license, and (b) permanently, if the
5106      copyright holder fails to notify you of the violation by some
5107      reasonable means prior to 60 days after the cessation.
5108
5109      Moreover, your license from a particular copyright holder is
5110      reinstated permanently if the copyright holder notifies you of the
5111      violation by some reasonable means, this is the first time you have
5112      received notice of violation of this License (for any work) from
5113      that copyright holder, and you cure the violation prior to 30 days
5114      after your receipt of the notice.
5115
5116      Termination of your rights under this section does not terminate
5117      the licenses of parties who have received copies or rights from you
5118      under this License.  If your rights have been terminated and not
5119      permanently reinstated, receipt of a copy of some or all of the
5120      same material does not give you any rights to use it.
5121
5122   10. FUTURE REVISIONS OF THIS LICENSE
5123
5124      The Free Software Foundation may publish new, revised versions of
5125      the GNU Free Documentation License from time to time.  Such new
5126      versions will be similar in spirit to the present version, but may
5127      differ in detail to address new problems or concerns.  See
5128      <https://www.gnu.org/copyleft/>.
5129
5130      Each version of the License is given a distinguishing version
5131      number.  If the Document specifies that a particular numbered
5132      version of this License "or any later version" applies to it, you
5133      have the option of following the terms and conditions either of
5134      that specified version or of any later version that has been
5135      published (not as a draft) by the Free Software Foundation.  If the
5136      Document does not specify a version number of this License, you may
5137      choose any version ever published (not as a draft) by the Free
5138      Software Foundation.  If the Document specifies that a proxy can
5139      decide which future versions of this License can be used, that
5140      proxy's public statement of acceptance of a version permanently
5141      authorizes you to choose that version for the Document.
5142
5143   11. RELICENSING
5144
5145      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
5146      World Wide Web server that publishes copyrightable works and also
5147      provides prominent facilities for anybody to edit those works.  A
5148      public wiki that anybody can edit is an example of such a server.
5149      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
5150      site means any set of copyrightable works thus published on the MMC
5151      site.
5152
5153      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
5154      license published by Creative Commons Corporation, a not-for-profit
5155      corporation with a principal place of business in San Francisco,
5156      California, as well as future copyleft versions of that license
5157      published by that same organization.
5158
5159      "Incorporate" means to publish or republish a Document, in whole or
5160      in part, as part of another Document.
5161
5162      An MMC is "eligible for relicensing" if it is licensed under this
5163      License, and if all works that were first published under this
5164      License somewhere other than this MMC, and subsequently
5165      incorporated in whole or in part into the MMC, (1) had no cover
5166      texts or invariant sections, and (2) were thus incorporated prior
5167      to November 1, 2008.
5168
5169      The operator of an MMC Site may republish an MMC contained in the
5170      site under CC-BY-SA on the same site at any time before August 1,
5171      2009, provided the MMC is eligible for relicensing.
5172
5173 ADDENDUM: How to use this License for your documents
5174 ====================================================
5175
5176 To use this License in a document you have written, include a copy of
5177 the License in the document and put the following copyright and license
5178 notices just after the title page:
5179
5180        Copyright (C)  YEAR  YOUR NAME.
5181        Permission is granted to copy, distribute and/or modify this document
5182        under the terms of the GNU Free Documentation License, Version 1.3
5183        or any later version published by the Free Software Foundation;
5184        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
5185        Texts.  A copy of the license is included in the section entitled ``GNU
5186        Free Documentation License''.
5187
5188    If you have Invariant Sections, Front-Cover Texts and Back-Cover
5189 Texts, replace the "with...Texts." line with this:
5190
5191          with the Invariant Sections being LIST THEIR TITLES, with
5192          the Front-Cover Texts being LIST, and with the Back-Cover Texts
5193          being LIST.
5194
5195    If you have Invariant Sections without Cover Texts, or some other
5196 combination of the three, merge those two alternatives to suit the
5197 situation.
5198
5199    If your document contains nontrivial examples of program code, we
5200 recommend releasing these examples in parallel under your choice of free
5201 software license, such as the GNU General Public License, to permit
5202 their use in free software.
5203
5204 \1f
5205 File: make.info,  Node: Concept Index,  Next: Name Index,  Prev: GNU Free Documentation License,  Up: Top
5206
5207 Index of Concepts
5208 *****************
5209
5210 \0\b[index\0\b]
5211 * Menu:
5212
5213 * !=:                                    Setting.             (line   6)
5214 * !=, expansion:                         Reading Makefiles.   (line  34)
5215 * # (comments), in makefile:             Makefile Contents.   (line  41)
5216 * # (comments), in recipes:              Recipe Syntax.       (line  29)
5217 * #include:                              Automatic Prerequisites.
5218                                                               (line  16)
5219 * $, in function call:                   Syntax of Functions. (line   6)
5220 * $, in rules:                           Rule Syntax.         (line  33)
5221 * $, in variable name:                   Computed Names.      (line   6)
5222 * $, in variable reference:              Reference.           (line   6)
5223 * %, in pattern rules:                   Pattern Intro.       (line   9)
5224 * %, quoting in patsubst:                Text Functions.      (line  26)
5225 * %, quoting in static pattern:          Static Usage.        (line  37)
5226 * %, quoting in vpath:                   Selective Search.    (line  39)
5227 * %, quoting with \ (backslash):         Selective Search.    (line  39)
5228 * %, quoting with \ (backslash) <1>:     Static Usage.        (line  37)
5229 * %, quoting with \ (backslash) <2>:     Text Functions.      (line  26)
5230 * * (wildcard character):                Wildcards.           (line   6)
5231 * +, and define:                         Canned Recipes.      (line  49)
5232 * +, and recipe execution:               Instead of Execution.
5233                                                               (line  67)
5234 * +, and recipes:                        MAKE Variable.       (line  18)
5235 * +=:                                    Appending.           (line   6)
5236 * +=, expansion:                         Reading Makefiles.   (line  34)
5237 * +=, expansion <1>:                     Reading Makefiles.   (line  34)
5238 * ,v (RCS file extension):               Catalogue of Rules.  (line 163)
5239 * - (in recipes):                        Errors.              (line  19)
5240 * -, and define:                         Canned Recipes.      (line  49)
5241 * --always-make:                         Options Summary.     (line  15)
5242 * --assume-new:                          Instead of Execution.
5243                                                               (line  41)
5244 * --assume-new <1>:                      Options Summary.     (line 285)
5245 * --assume-new, and recursion:           Options/Recursion.   (line  22)
5246 * --assume-old:                          Avoiding Compilation.
5247                                                               (line   6)
5248 * --assume-old <1>:                      Options Summary.     (line 164)
5249 * --assume-old, and recursion:           Options/Recursion.   (line  22)
5250 * --check-symlink-times:                 Options Summary.     (line 145)
5251 * --debug:                               Options Summary.     (line  43)
5252 * --directory:                           Recursion.           (line  20)
5253 * --directory <1>:                       Options Summary.     (line  26)
5254 * --directory, and --print-directory:    -w Option.           (line  20)
5255 * --directory, and recursion:            Options/Recursion.   (line  22)
5256 * --dry-run:                             Echoing.             (line  18)
5257 * --dry-run <1>:                         Instead of Execution.
5258                                                               (line  14)
5259 * --dry-run <2>:                         Options Summary.     (line 155)
5260 * --environment-overrides:               Options Summary.     (line  85)
5261 * --eval:                                Options Summary.     (line  90)
5262 * --file:                                Makefile Names.      (line  23)
5263 * --file <1>:                            Makefile Arguments.  (line   6)
5264 * --file <2>:                            Options Summary.     (line  98)
5265 * --file, and recursion:                 Options/Recursion.   (line  22)
5266 * --help:                                Options Summary.     (line 104)
5267 * --ignore-errors:                       Errors.              (line  30)
5268 * --ignore-errors <1>:                   Options Summary.     (line 109)
5269 * --include-dir:                         Include.             (line  53)
5270 * --include-dir <1>:                     Options Summary.     (line 114)
5271 * --jobs:                                Parallel.            (line   6)
5272 * --jobs <1>:                            Options Summary.     (line 121)
5273 * --jobs, and recursion:                 Options/Recursion.   (line  25)
5274 * --just-print:                          Echoing.             (line  18)
5275 * --just-print <1>:                      Instead of Execution.
5276                                                               (line  14)
5277 * --just-print <2>:                      Options Summary.     (line 154)
5278 * --keep-going:                          Errors.              (line  46)
5279 * --keep-going <1>:                      Testing.             (line  16)
5280 * --keep-going <2>:                      Options Summary.     (line 130)
5281 * --load-average:                        Parallel.            (line  35)
5282 * --load-average <1>:                    Options Summary.     (line 137)
5283 * --makefile:                            Makefile Names.      (line  23)
5284 * --makefile <1>:                        Makefile Arguments.  (line   6)
5285 * --makefile <2>:                        Options Summary.     (line  99)
5286 * --max-load:                            Parallel.            (line  35)
5287 * --max-load <1>:                        Options Summary.     (line 138)
5288 * --new-file:                            Instead of Execution.
5289                                                               (line  41)
5290 * --new-file <1>:                        Options Summary.     (line 284)
5291 * --new-file, and recursion:             Options/Recursion.   (line  22)
5292 * --no-builtin-rules:                    Options Summary.     (line 210)
5293 * --no-builtin-variables:                Options Summary.     (line 223)
5294 * --no-keep-going:                       Options Summary.     (line 239)
5295 * --no-print-directory:                  -w Option.           (line  20)
5296 * --no-print-directory <1>:              Options Summary.     (line 276)
5297 * --old-file:                            Avoiding Compilation.
5298                                                               (line   6)
5299 * --old-file <1>:                        Options Summary.     (line 163)
5300 * --old-file, and recursion:             Options/Recursion.   (line  22)
5301 * --output-sync:                         Parallel Output.     (line  11)
5302 * --output-sync <1>:                     Options Summary.     (line 172)
5303 * --print-data-base:                     Options Summary.     (line 188)
5304 * --print-directory:                     Options Summary.     (line 268)
5305 * --print-directory, and --directory:    -w Option.           (line  20)
5306 * --print-directory, and recursion:      -w Option.           (line  20)
5307 * --print-directory, disabling:          -w Option.           (line  20)
5308 * --question:                            Instead of Execution.
5309                                                               (line  32)
5310 * --question <1>:                        Options Summary.     (line 202)
5311 * --quiet:                               Echoing.             (line  24)
5312 * --quiet <1>:                           Options Summary.     (line 233)
5313 * --recon:                               Echoing.             (line  18)
5314 * --recon <1>:                           Instead of Execution.
5315                                                               (line  14)
5316 * --recon <2>:                           Options Summary.     (line 156)
5317 * --silent:                              Echoing.             (line  24)
5318 * --silent <1>:                          Options Summary.     (line 232)
5319 * --stop:                                Options Summary.     (line 240)
5320 * --touch:                               Instead of Execution.
5321                                                               (line  24)
5322 * --touch <1>:                           Options Summary.     (line 248)
5323 * --touch, and recursion:                MAKE Variable.       (line  35)
5324 * --trace:                               Options Summary.     (line 255)
5325 * --version:                             Options Summary.     (line 263)
5326 * --warn-undefined-variables:            Options Summary.     (line 293)
5327 * --what-if:                             Instead of Execution.
5328                                                               (line  41)
5329 * --what-if <1>:                         Options Summary.     (line 283)
5330 * -b:                                    Options Summary.     (line   9)
5331 * -B:                                    Options Summary.     (line  14)
5332 * -C:                                    Recursion.           (line  20)
5333 * -C <1>:                                Options Summary.     (line  25)
5334 * -C, and -w:                            -w Option.           (line  20)
5335 * -C, and recursion:                     Options/Recursion.   (line  22)
5336 * -d:                                    Options Summary.     (line  33)
5337 * -e:                                    Options Summary.     (line  84)
5338 * -E:                                    Options Summary.     (line  89)
5339 * -e (shell flag):                       Automatic Prerequisites.
5340                                                               (line  65)
5341 * -f:                                    Makefile Names.      (line  23)
5342 * -f <1>:                                Makefile Arguments.  (line   6)
5343 * -f <2>:                                Options Summary.     (line  97)
5344 * -f, and recursion:                     Options/Recursion.   (line  22)
5345 * -h:                                    Options Summary.     (line 103)
5346 * -I:                                    Include.             (line  53)
5347 * -i:                                    Errors.              (line  30)
5348 * -i <1>:                                Options Summary.     (line 108)
5349 * -I <1>:                                Options Summary.     (line 113)
5350 * -j:                                    Parallel.            (line   6)
5351 * -j <1>:                                Options Summary.     (line 120)
5352 * -j, and archive update:                Archive Pitfalls.    (line   6)
5353 * -j, and recursion:                     Options/Recursion.   (line  25)
5354 * -k:                                    Errors.              (line  46)
5355 * -k <1>:                                Testing.             (line  16)
5356 * -k <2>:                                Options Summary.     (line 129)
5357 * -l:                                    Options Summary.     (line 136)
5358 * -L:                                    Options Summary.     (line 144)
5359 * -l (library search):                   Libraries/Search.    (line   6)
5360 * -l (load average):                     Parallel.            (line  35)
5361 * -m:                                    Options Summary.     (line  10)
5362 * -M (to compiler):                      Automatic Prerequisites.
5363                                                               (line  18)
5364 * -MM (to GNU compiler):                 Automatic Prerequisites.
5365                                                               (line  67)
5366 * -n:                                    Echoing.             (line  18)
5367 * -n <1>:                                Instead of Execution.
5368                                                               (line  14)
5369 * -n <2>:                                Options Summary.     (line 153)
5370 * -O:                                    Parallel Output.     (line  11)
5371 * -o:                                    Avoiding Compilation.
5372                                                               (line   6)
5373 * -o <1>:                                Options Summary.     (line 162)
5374 * -O <1>:                                Options Summary.     (line 171)
5375 * -o, and recursion:                     Options/Recursion.   (line  22)
5376 * -p:                                    Options Summary.     (line 187)
5377 * -q:                                    Instead of Execution.
5378                                                               (line  32)
5379 * -q <1>:                                Options Summary.     (line 201)
5380 * -r:                                    Options Summary.     (line 209)
5381 * -R:                                    Options Summary.     (line 222)
5382 * -s:                                    Echoing.             (line  24)
5383 * -s <1>:                                Options Summary.     (line 231)
5384 * -S:                                    Options Summary.     (line 238)
5385 * -t:                                    Instead of Execution.
5386                                                               (line  24)
5387 * -t <1>:                                Options Summary.     (line 247)
5388 * -t, and recursion:                     MAKE Variable.       (line  35)
5389 * -v:                                    Options Summary.     (line 262)
5390 * -W:                                    Instead of Execution.
5391                                                               (line  41)
5392 * -w:                                    Options Summary.     (line 267)
5393 * -W <1>:                                Options Summary.     (line 282)
5394 * -w, and -C:                            -w Option.           (line  20)
5395 * -W, and recursion:                     Options/Recursion.   (line  22)
5396 * -w, and recursion:                     -w Option.           (line  20)
5397 * -w, disabling:                         -w Option.           (line  20)
5398 * .a (archives):                         Archive Suffix Rules.
5399                                                               (line   6)
5400 * .c:                                    Catalogue of Rules.  (line  35)
5401 * .C:                                    Catalogue of Rules.  (line  39)
5402 * .cc:                                   Catalogue of Rules.  (line  39)
5403 * .ch:                                   Catalogue of Rules.  (line 149)
5404 * .cpp:                                  Catalogue of Rules.  (line  39)
5405 * .d:                                    Automatic Prerequisites.
5406                                                               (line  80)
5407 * .def:                                  Catalogue of Rules.  (line  71)
5408 * .dvi:                                  Catalogue of Rules.  (line 149)
5409 * .f:                                    Catalogue of Rules.  (line  49)
5410 * .F:                                    Catalogue of Rules.  (line  49)
5411 * .info:                                 Catalogue of Rules.  (line 156)
5412 * .l:                                    Catalogue of Rules.  (line 121)
5413 * .LIBPATTERNS, and link libraries:      Libraries/Search.    (line   6)
5414 * .ln:                                   Catalogue of Rules.  (line 143)
5415 * .mod:                                  Catalogue of Rules.  (line  71)
5416 * .o:                                    Catalogue of Rules.  (line  35)
5417 * .o <1>:                                Catalogue of Rules.  (line  83)
5418 * .ONESHELL, use of:                     One Shell.           (line   6)
5419 * .p:                                    Catalogue of Rules.  (line  45)
5420 * .PRECIOUS intermediate files:          Chained Rules.       (line  56)
5421 * .r:                                    Catalogue of Rules.  (line  49)
5422 * .s:                                    Catalogue of Rules.  (line  76)
5423 * .S:                                    Catalogue of Rules.  (line  79)
5424 * .sh:                                   Catalogue of Rules.  (line 178)
5425 * .SHELLFLAGS, value of:                 Choosing the Shell.  (line   6)
5426 * .sym:                                  Catalogue of Rules.  (line  71)
5427 * .tex:                                  Catalogue of Rules.  (line 149)
5428 * .texi:                                 Catalogue of Rules.  (line 156)
5429 * .texinfo:                              Catalogue of Rules.  (line 156)
5430 * .txinfo:                               Catalogue of Rules.  (line 156)
5431 * .w:                                    Catalogue of Rules.  (line 149)
5432 * .web:                                  Catalogue of Rules.  (line 149)
5433 * .y:                                    Catalogue of Rules.  (line 117)
5434 * :: rules (double-colon):               Double-Colon.        (line   6)
5435 * ::=:                                   Flavors.             (line  56)
5436 * ::= <1>:                               Setting.             (line   6)
5437 * :=:                                    Flavors.             (line  56)
5438 * := <1>:                                Setting.             (line   6)
5439 * =:                                     Flavors.             (line  10)
5440 * = <1>:                                 Setting.             (line   6)
5441 * =, expansion:                          Reading Makefiles.   (line  34)
5442 * ? (wildcard character):                Wildcards.           (line   6)
5443 * ?=:                                    Flavors.             (line 135)
5444 * ?= <1>:                                Setting.             (line   6)
5445 * ?=, expansion:                         Reading Makefiles.   (line  34)
5446 * @ (in recipes):                        Echoing.             (line   6)
5447 * @, and define:                         Canned Recipes.      (line  49)
5448 * [...] (wildcard characters):           Wildcards.           (line   6)
5449 * \ (backslash), for continuation lines: Simple Makefile.     (line  41)
5450 * \ (backslash), in recipes:             Splitting Recipe Lines.
5451                                                               (line   6)
5452 * \ (backslash), to quote %:             Selective Search.    (line  39)
5453 * \ (backslash), to quote % <1>:         Static Usage.        (line  37)
5454 * \ (backslash), to quote % <2>:         Text Functions.      (line  26)
5455 * __.SYMDEF:                             Archive Symbols.     (line   6)
5456 * ~ (tilde):                             Wildcards.           (line  11)
5457 * abspath:                               File Name Functions. (line 120)
5458 * algorithm for directory search:        Search Algorithm.    (line   6)
5459 * all (standard target):                 Goals.               (line  73)
5460 * appending to variables:                Appending.           (line   6)
5461 * ar:                                    Implicit Variables.  (line  40)
5462 * archive:                               Archives.            (line   6)
5463 * archive member targets:                Archive Members.     (line   6)
5464 * archive symbol directory updating:     Archive Symbols.     (line   6)
5465 * archive, and -j:                       Archive Pitfalls.    (line   6)
5466 * archive, and parallel execution:       Archive Pitfalls.    (line   6)
5467 * archive, suffix rule for:              Archive Suffix Rules.
5468                                                               (line   6)
5469 * Arg list too long:                     Options/Recursion.   (line  58)
5470 * arguments of functions:                Syntax of Functions. (line   6)
5471 * as:                                    Catalogue of Rules.  (line  76)
5472 * as <1>:                                Implicit Variables.  (line  43)
5473 * assembly, rule to compile:             Catalogue of Rules.  (line  76)
5474 * automatic generation of prerequisites: Include.             (line  51)
5475 * automatic generation of prerequisites <1>: Automatic Prerequisites.
5476                                                               (line   6)
5477 * automatic variables:                   Automatic Variables. (line   6)
5478 * automatic variables in prerequisites:  Automatic Variables. (line  17)
5479 * backquotes:                            Shell Function.      (line   6)
5480 * backslash (\), for continuation lines: Simple Makefile.     (line  41)
5481 * backslash (\), in recipes:             Splitting Recipe Lines.
5482                                                               (line   6)
5483 * backslash (\), to quote %:             Selective Search.    (line  39)
5484 * backslash (\), to quote % <1>:         Static Usage.        (line  37)
5485 * backslash (\), to quote % <2>:         Text Functions.      (line  26)
5486 * backslash (\), to quote newlines:      Splitting Lines.     (line   6)
5487 * backslashes in pathnames and wildcard expansion: Wildcard Pitfall.
5488                                                               (line  31)
5489 * basename:                              File Name Functions. (line  56)
5490 * binary packages:                       Install Command Categories.
5491                                                               (line  80)
5492 * broken pipe:                           Parallel Input.      (line  11)
5493 * bugs, reporting:                       Bugs.                (line   6)
5494 * built-in special targets:              Special Targets.     (line   6)
5495 * C++, rule to compile:                  Catalogue of Rules.  (line  39)
5496 * C, rule to compile:                    Catalogue of Rules.  (line  35)
5497 * canned recipes:                        Canned Recipes.      (line   6)
5498 * cc:                                    Catalogue of Rules.  (line  35)
5499 * cc <1>:                                Implicit Variables.  (line  46)
5500 * cd (shell command):                    Execution.           (line  12)
5501 * cd (shell command) <1>:                MAKE Variable.       (line  16)
5502 * chains of rules:                       Chained Rules.       (line   6)
5503 * check (standard target):               Goals.               (line 115)
5504 * clean (standard target):               Goals.               (line  76)
5505 * clean target:                          Simple Makefile.     (line  85)
5506 * clean target <1>:                      Cleanup.             (line  11)
5507 * cleaning up:                           Cleanup.             (line   6)
5508 * clobber (standard target):             Goals.               (line  87)
5509 * co:                                    Catalogue of Rules.  (line 163)
5510 * co <1>:                                Implicit Variables.  (line  66)
5511 * combining rules by prerequisite:       Combine By Prerequisite.
5512                                                               (line   6)
5513 * command expansion:                     Shell Function.      (line   6)
5514 * command line variable definitions, and recursion: Options/Recursion.
5515                                                               (line  17)
5516 * command line variables:                Overriding.          (line   6)
5517 * commands, sequences of:                Canned Recipes.      (line   6)
5518 * comments, in makefile:                 Makefile Contents.   (line  41)
5519 * comments, in recipes:                  Recipe Syntax.       (line  29)
5520 * compatibility:                         Features.            (line   6)
5521 * compatibility in exporting:            Variables/Recursion. (line 104)
5522 * compilation, testing:                  Testing.             (line   6)
5523 * computed variable name:                Computed Names.      (line   6)
5524 * conditional expansion:                 Conditional Functions.
5525                                                               (line   6)
5526 * conditional variable assignment:       Flavors.             (line 135)
5527 * conditionals:                          Conditionals.        (line   6)
5528 * continuation lines:                    Simple Makefile.     (line  41)
5529 * controlling make:                      Make Control Functions.
5530                                                               (line   6)
5531 * conventions for makefiles:             Makefile Conventions.
5532                                                               (line   6)
5533 * convert guile types:                   Guile Types.         (line   6)
5534 * ctangle:                               Catalogue of Rules.  (line 149)
5535 * ctangle <1>:                           Implicit Variables.  (line 103)
5536 * cweave:                                Catalogue of Rules.  (line 149)
5537 * cweave <1>:                            Implicit Variables.  (line  97)
5538 * data base of make rules:               Options Summary.     (line 188)
5539 * deducing recipes (implicit rules):     make Deduces.        (line   6)
5540 * default directories for included makefiles: Include.        (line  53)
5541 * default goal:                          How Make Works.      (line  11)
5542 * default goal <1>:                      Rules.               (line  11)
5543 * default makefile name:                 Makefile Names.      (line   6)
5544 * default rules, last-resort:            Last Resort.         (line   6)
5545 * define, expansion:                     Reading Makefiles.   (line  34)
5546 * defining variables verbatim:           Multi-Line.          (line   6)
5547 * deletion of target files:              Errors.              (line  63)
5548 * deletion of target files <1>:          Interrupts.          (line   6)
5549 * directive:                             Makefile Contents.   (line  28)
5550 * directories, creating installation:    Directory Variables. (line  20)
5551 * directories, printing them:            -w Option.           (line   6)
5552 * directories, updating archive symbol:  Archive Symbols.     (line   6)
5553 * directory part:                        File Name Functions. (line  16)
5554 * directory search (VPATH):              Directory Search.    (line   6)
5555 * directory search (VPATH), and implicit rules: Implicit/Search.
5556                                                               (line   6)
5557 * directory search (VPATH), and link libraries: Libraries/Search.
5558                                                               (line   6)
5559 * directory search (VPATH), and recipes: Recipes/Search.      (line   6)
5560 * directory search algorithm:            Search Algorithm.    (line   6)
5561 * directory search, traditional (GPATH): Search Algorithm.    (line  42)
5562 * dist (standard target):                Goals.               (line 107)
5563 * distclean (standard target):           Goals.               (line  85)
5564 * dollar sign ($), in function call:     Syntax of Functions. (line   6)
5565 * dollar sign ($), in rules:             Rule Syntax.         (line  33)
5566 * dollar sign ($), in variable name:     Computed Names.      (line   6)
5567 * dollar sign ($), in variable reference: Reference.          (line   6)
5568 * DOS, choosing a shell in:              Choosing the Shell.  (line  38)
5569 * double-colon rules:                    Double-Colon.        (line   6)
5570 * duplicate words, removing:             Text Functions.      (line 155)
5571 * E2BIG:                                 Options/Recursion.   (line  58)
5572 * echoing of recipes:                    Echoing.             (line   6)
5573 * editor:                                Introduction.        (line  22)
5574 * Emacs (M-x compile):                   Errors.              (line  61)
5575 * empty recipes:                         Empty Recipes.       (line   6)
5576 * empty targets:                         Empty Targets.       (line   6)
5577 * environment:                           Environment.         (line   6)
5578 * environment, and recursion:            Variables/Recursion. (line   6)
5579 * environment, SHELL in:                 Choosing the Shell.  (line  12)
5580 * error, stopping on:                    Make Control Functions.
5581                                                               (line  11)
5582 * errors (in recipes):                   Errors.              (line   6)
5583 * errors with wildcards:                 Wildcard Pitfall.    (line   6)
5584 * evaluating makefile syntax:            Eval Function.       (line   6)
5585 * example of loaded objects:             Loaded Object Example.
5586                                                               (line   6)
5587 * example using Guile:                   Guile Example.       (line   6)
5588 * execution, in parallel:                Parallel.            (line   6)
5589 * execution, instead of:                 Instead of Execution.
5590                                                               (line   6)
5591 * execution, of recipes:                 Execution.           (line   6)
5592 * exit status (errors):                  Errors.              (line   6)
5593 * exit status of make:                   Running.             (line  18)
5594 * expansion, secondary:                  Secondary Expansion. (line   6)
5595 * explicit rule, definition of:          Makefile Contents.   (line  10)
5596 * explicit rule, expansion:              Reading Makefiles.   (line  93)
5597 * explicit rules, secondary expansion of: Secondary Expansion.
5598                                                               (line 104)
5599 * exporting variables:                   Variables/Recursion. (line   6)
5600 * extensions, Guile:                     Guile Integration.   (line   6)
5601 * extensions, load directive:            load Directive.      (line   6)
5602 * extensions, loading:                   Loading Objects.     (line   6)
5603 * f77:                                   Catalogue of Rules.  (line  49)
5604 * f77 <1>:                               Implicit Variables.  (line  57)
5605 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
5606                                                               (line   6)
5607 * features of GNU make:                  Features.            (line   6)
5608 * features, missing:                     Missing.             (line   6)
5609 * file name functions:                   File Name Functions. (line   6)
5610 * file name of makefile:                 Makefile Names.      (line   6)
5611 * file name of makefile, how to specify: Makefile Names.      (line  31)
5612 * file name prefix, adding:              File Name Functions. (line  78)
5613 * file name suffix:                      File Name Functions. (line  42)
5614 * file name suffix, adding:              File Name Functions. (line  67)
5615 * file name with wildcards:              Wildcards.           (line   6)
5616 * file name, abspath of:                 File Name Functions. (line 120)
5617 * file name, basename of:                File Name Functions. (line  56)
5618 * file name, directory part:             File Name Functions. (line  16)
5619 * file name, nondirectory part:          File Name Functions. (line  26)
5620 * file name, realpath of:                File Name Functions. (line 113)
5621 * file, reading from:                    File Function.       (line   6)
5622 * file, writing to:                      File Function.       (line   6)
5623 * files, assuming new:                   Instead of Execution.
5624                                                               (line  41)
5625 * files, assuming old:                   Avoiding Compilation.
5626                                                               (line   6)
5627 * files, avoiding recompilation of:      Avoiding Compilation.
5628                                                               (line   6)
5629 * files, intermediate:                   Chained Rules.       (line  16)
5630 * filtering out words:                   Text Functions.      (line 133)
5631 * filtering words:                       Text Functions.      (line 115)
5632 * finding strings:                       Text Functions.      (line 104)
5633 * flags:                                 Options Summary.     (line   6)
5634 * flags for compilers:                   Implicit Variables.  (line   6)
5635 * flavor of variable:                    Flavor Function.     (line   6)
5636 * flavors of variables:                  Flavors.             (line   6)
5637 * FORCE:                                 Force Targets.       (line   6)
5638 * force targets:                         Force Targets.       (line   6)
5639 * Fortran, rule to compile:              Catalogue of Rules.  (line  49)
5640 * functions:                             Functions.           (line   6)
5641 * functions, for controlling make:       Make Control Functions.
5642                                                               (line   6)
5643 * functions, for file names:             File Name Functions. (line   6)
5644 * functions, for text:                   Text Functions.      (line   6)
5645 * functions, syntax of:                  Syntax of Functions. (line   6)
5646 * functions, user defined:               Call Function.       (line   6)
5647 * g++:                                   Catalogue of Rules.  (line  39)
5648 * g++ <1>:                               Implicit Variables.  (line  49)
5649 * gcc:                                   Catalogue of Rules.  (line  35)
5650 * generating prerequisites automatically: Include.            (line  51)
5651 * generating prerequisites automatically <1>: Automatic Prerequisites.
5652                                                               (line   6)
5653 * get:                                   Catalogue of Rules.  (line 172)
5654 * get <1>:                               Implicit Variables.  (line  69)
5655 * globbing (wildcards):                  Wildcards.           (line   6)
5656 * goal:                                  How Make Works.      (line  11)
5657 * goal, default:                         How Make Works.      (line  11)
5658 * goal, default <1>:                     Rules.               (line  11)
5659 * goal, how to specify:                  Goals.               (line   6)
5660 * grouped targets:                       Multiple Targets.    (line  61)
5661 * Guile:                                 Guile Function.      (line   6)
5662 * Guile <1>:                             Guile Integration.   (line   6)
5663 * Guile example:                         Guile Example.       (line   6)
5664 * guile, conversion of types:            Guile Types.         (line   6)
5665 * home directory:                        Wildcards.           (line  11)
5666 * IEEE Standard 1003.2:                  Overview.            (line  13)
5667 * ifdef, expansion:                      Reading Makefiles.   (line  83)
5668 * ifeq, expansion:                       Reading Makefiles.   (line  83)
5669 * ifndef, expansion:                     Reading Makefiles.   (line  83)
5670 * ifneq, expansion:                      Reading Makefiles.   (line  83)
5671 * implicit rule:                         Implicit Rules.      (line   6)
5672 * implicit rule, and directory search:   Implicit/Search.     (line   6)
5673 * implicit rule, and VPATH:              Implicit/Search.     (line   6)
5674 * implicit rule, definition of:          Makefile Contents.   (line  16)
5675 * implicit rule, expansion:              Reading Makefiles.   (line  93)
5676 * implicit rule, how to use:             Using Implicit.      (line   6)
5677 * implicit rule, introduction to:        make Deduces.        (line   6)
5678 * implicit rule, predefined:             Catalogue of Rules.  (line   6)
5679 * implicit rule, search algorithm:       Implicit Rule Search.
5680                                                               (line   6)
5681 * implicit rules, secondary expansion of: Secondary Expansion.
5682                                                               (line 144)
5683 * included makefiles, default directories: Include.           (line  53)
5684 * including (MAKEFILES variable):        MAKEFILES Variable.  (line   6)
5685 * including (MAKEFILE_LIST variable):    Special Variables.   (line   8)
5686 * including other makefiles:             Include.             (line   6)
5687 * incompatibilities:                     Missing.             (line   6)
5688 * independent targets:                   Multiple Targets.    (line  14)
5689 * Info, rule to format:                  Catalogue of Rules.  (line 156)
5690 * inheritance, suppressing:              Suppressing Inheritance.
5691                                                               (line   6)
5692 * input during parallel execution:       Parallel Input.      (line   6)
5693 * install (standard target):             Goals.               (line  93)
5694 * installation directories, creating:    Directory Variables. (line  20)
5695 * installations, staged:                 DESTDIR.             (line   6)
5696 * interface for loaded objects:          Loaded Object API.   (line   6)
5697 * intermediate files:                    Chained Rules.       (line  16)
5698 * intermediate files, preserving:        Chained Rules.       (line  46)
5699 * intermediate targets, explicit:        Special Targets.     (line  48)
5700 * interrupt:                             Interrupts.          (line   6)
5701 * job slots:                             Parallel.            (line   6)
5702 * job slots, and recursion:              Options/Recursion.   (line  25)
5703 * job slots, sharing:                    Job Slots.           (line   6)
5704 * jobs, limiting based on load:          Parallel.            (line  35)
5705 * jobserver:                             Job Slots.           (line  16)
5706 * jobserver on POSIX:                    POSIX Jobserver.     (line   6)
5707 * jobserver on Windows:                  Windows Jobserver.   (line   6)
5708 * joining lists of words:                File Name Functions. (line  89)
5709 * killing (interruption):                Interrupts.          (line   6)
5710 * last-resort default rules:             Last Resort.         (line   6)
5711 * ld:                                    Catalogue of Rules.  (line  83)
5712 * lex:                                   Catalogue of Rules.  (line 121)
5713 * lex <1>:                               Implicit Variables.  (line  73)
5714 * Lex, rule to run:                      Catalogue of Rules.  (line 121)
5715 * libraries for linking, directory search: Libraries/Search.  (line   6)
5716 * library archive, suffix rule for:      Archive Suffix Rules.
5717                                                               (line   6)
5718 * limiting jobs based on load:           Parallel.            (line  35)
5719 * link libraries, and directory search:  Libraries/Search.    (line   6)
5720 * link libraries, patterns matching:     Libraries/Search.    (line   6)
5721 * linking, predefined rule for:          Catalogue of Rules.  (line  83)
5722 * lint:                                  Catalogue of Rules.  (line 143)
5723 * lint <1>:                              Implicit Variables.  (line  80)
5724 * lint, rule to run:                     Catalogue of Rules.  (line 143)
5725 * list of all prerequisites:             Automatic Variables. (line  62)
5726 * list of changed prerequisites:         Automatic Variables. (line  52)
5727 * load average:                          Parallel.            (line  35)
5728 * load directive:                        load Directive.      (line   6)
5729 * loaded object API:                     Loaded Object API.   (line   6)
5730 * loaded object example:                 Loaded Object Example.
5731                                                               (line   6)
5732 * loaded object licensing:               Loaded Object API.   (line  31)
5733 * loaded objects:                        Loading Objects.     (line   6)
5734 * loaded objects, remaking of:           Remaking Loaded Objects.
5735                                                               (line   6)
5736 * long lines, splitting:                 Splitting Lines.     (line   6)
5737 * loops in variable expansion:           Flavors.             (line  44)
5738 * lpr (shell command):                   Wildcard Examples.   (line  21)
5739 * lpr (shell command) <1>:               Empty Targets.       (line  25)
5740 * m2c:                                   Catalogue of Rules.  (line  71)
5741 * m2c <1>:                               Implicit Variables.  (line  60)
5742 * macro:                                 Using Variables.     (line  10)
5743 * make depend:                           Automatic Prerequisites.
5744                                                               (line  37)
5745 * make extensions:                       Extending make.      (line   6)
5746 * make integration:                      Integrating make.    (line   6)
5747 * make interface to guile:               Guile Interface.     (line   6)
5748 * make procedures in guile:              Guile Interface.     (line   6)
5749 * makefile:                              Introduction.        (line   7)
5750 * makefile name:                         Makefile Names.      (line   6)
5751 * makefile name, how to specify:         Makefile Names.      (line  31)
5752 * makefile rule parts:                   Rule Introduction.   (line   6)
5753 * makefile syntax, evaluating:           Eval Function.       (line   6)
5754 * makefile, and MAKEFILES variable:      MAKEFILES Variable.  (line   6)
5755 * makefile, conventions for:             Makefile Conventions.
5756                                                               (line   6)
5757 * makefile, how make processes:          How Make Works.      (line   6)
5758 * makefile, how to write:                Makefiles.           (line   6)
5759 * makefile, including:                   Include.             (line   6)
5760 * makefile, overriding:                  Overriding Makefiles.
5761                                                               (line   6)
5762 * makefile, reading:                     Reading Makefiles.   (line   6)
5763 * makefile, remaking of:                 Remaking Makefiles.  (line   6)
5764 * makefile, simple:                      Simple Makefile.     (line   6)
5765 * makefiles, and MAKEFILE_LIST variable: Special Variables.   (line   8)
5766 * makefiles, and special variables:      Special Variables.   (line   6)
5767 * makefiles, parsing:                    Parsing Makefiles.   (line   6)
5768 * makeinfo:                              Catalogue of Rules.  (line 156)
5769 * makeinfo <1>:                          Implicit Variables.  (line  84)
5770 * match-anything rule:                   Match-Anything Rules.
5771                                                               (line   6)
5772 * match-anything rule, used to override: Overriding Makefiles.
5773                                                               (line  12)
5774 * missing features:                      Missing.             (line   6)
5775 * mistakes with wildcards:               Wildcard Pitfall.    (line   6)
5776 * modified variable reference:           Substitution Refs.   (line   6)
5777 * Modula-2, rule to compile:             Catalogue of Rules.  (line  71)
5778 * mostlyclean (standard target):         Goals.               (line  79)
5779 * multi-line variable definition:        Multi-Line.          (line   6)
5780 * multiple rules for one target:         Multiple Rules.      (line   6)
5781 * multiple rules for one target (::):    Double-Colon.        (line   6)
5782 * multiple targets:                      Multiple Targets.    (line   6)
5783 * multiple targets, in pattern rule:     Pattern Intro.       (line  44)
5784 * name of makefile:                      Makefile Names.      (line   6)
5785 * name of makefile, how to specify:      Makefile Names.      (line  31)
5786 * nested variable reference:             Computed Names.      (line   6)
5787 * newline, quoting, in makefile:         Simple Makefile.     (line  41)
5788 * newline, quoting, in recipes:          Splitting Recipe Lines.
5789                                                               (line   6)
5790 * nondirectory part:                     File Name Functions. (line  26)
5791 * normal prerequisites:                  Prerequisite Types.  (line   6)
5792 * obj:                                   Variables Simplify.  (line  20)
5793 * OBJ:                                   Variables Simplify.  (line  20)
5794 * objects:                               Variables Simplify.  (line  14)
5795 * OBJECTS:                               Variables Simplify.  (line  20)
5796 * objects, loaded:                       Loading Objects.     (line   6)
5797 * objs:                                  Variables Simplify.  (line  20)
5798 * OBJS:                                  Variables Simplify.  (line  20)
5799 * old-fashioned suffix rules:            Suffix Rules.        (line   6)
5800 * options:                               Options Summary.     (line   6)
5801 * options, and recursion:                Options/Recursion.   (line   6)
5802 * options, setting from environment:     Options/Recursion.   (line  81)
5803 * options, setting in makefiles:         Options/Recursion.   (line  81)
5804 * order of pattern rules:                Pattern Match.       (line  30)
5805 * order-only prerequisites:              Prerequisite Types.  (line   6)
5806 * origin of variable:                    Origin Function.     (line   6)
5807 * output during parallel execution:      Parallel Output.     (line   6)
5808 * output during parallel execution <1>:  Options Summary.     (line 172)
5809 * overriding makefiles:                  Overriding Makefiles.
5810                                                               (line   6)
5811 * overriding variables with arguments:   Overriding.          (line   6)
5812 * overriding with override:              Override Directive.  (line   6)
5813 * parallel execution:                    Parallel.            (line   6)
5814 * parallel execution, and archive update: Archive Pitfalls.   (line   6)
5815 * parallel execution, input during:      Parallel Input.      (line   6)
5816 * parallel execution, output during:     Parallel Output.     (line   6)
5817 * parallel execution, output during <1>: Options Summary.     (line 172)
5818 * parallel execution, overriding:        Special Targets.     (line 141)
5819 * parallel output to terminal:           Terminal Output.     (line   6)
5820 * parsing makefiles:                     Parsing Makefiles.   (line   6)
5821 * parts of makefile rule:                Rule Introduction.   (line   6)
5822 * Pascal, rule to compile:               Catalogue of Rules.  (line  45)
5823 * pattern rule:                          Pattern Intro.       (line   6)
5824 * pattern rule, expansion:               Reading Makefiles.   (line  93)
5825 * pattern rules, order of:               Pattern Match.       (line  30)
5826 * pattern rules, static (not implicit):  Static Pattern.      (line   6)
5827 * pattern rules, static, syntax of:      Static Usage.        (line   6)
5828 * pattern-specific variables:            Pattern-specific.    (line   6)
5829 * pc:                                    Catalogue of Rules.  (line  45)
5830 * pc <1>:                                Implicit Variables.  (line  63)
5831 * phony targets:                         Phony Targets.       (line   6)
5832 * phony targets and recipe execution:    Instead of Execution.
5833                                                               (line  75)
5834 * pitfalls of wildcards:                 Wildcard Pitfall.    (line   6)
5835 * plugin_is_GPL_compatible:              Loaded Object API.   (line  31)
5836 * portability:                           Features.            (line   6)
5837 * POSIX:                                 Overview.            (line  13)
5838 * POSIX <1>:                             Options/Recursion.   (line  61)
5839 * POSIX-conforming mode, setting:        Special Targets.     (line 156)
5840 * post-installation commands:            Install Command Categories.
5841                                                               (line   6)
5842 * pre-installation commands:             Install Command Categories.
5843                                                               (line   6)
5844 * precious targets:                      Special Targets.     (line  32)
5845 * predefined rules and variables, printing: Options Summary.  (line 188)
5846 * prefix, adding:                        File Name Functions. (line  78)
5847 * prerequisite:                          Rules.               (line   6)
5848 * prerequisite pattern, implicit:        Pattern Intro.       (line  22)
5849 * prerequisite pattern, static (not implicit): Static Usage.  (line  30)
5850 * prerequisite types:                    Prerequisite Types.  (line   6)
5851 * prerequisite, expansion:               Reading Makefiles.   (line  93)
5852 * prerequisites:                         Rule Syntax.         (line  47)
5853 * prerequisites, and automatic variables: Automatic Variables.
5854                                                               (line  17)
5855 * prerequisites, automatic generation:   Include.             (line  51)
5856 * prerequisites, automatic generation <1>: Automatic Prerequisites.
5857                                                               (line   6)
5858 * prerequisites, introduction to:        Rule Introduction.   (line   8)
5859 * prerequisites, list of all:            Automatic Variables. (line  62)
5860 * prerequisites, list of changed:        Automatic Variables. (line  52)
5861 * prerequisites, normal:                 Prerequisite Types.  (line   6)
5862 * prerequisites, order-only:             Prerequisite Types.  (line   6)
5863 * prerequisites, varying (static pattern): Static Pattern.    (line   6)
5864 * preserving intermediate files:         Chained Rules.       (line  46)
5865 * preserving with .PRECIOUS:             Special Targets.     (line  32)
5866 * preserving with .PRECIOUS <1>:         Chained Rules.       (line  56)
5867 * preserving with .SECONDARY:            Special Targets.     (line  54)
5868 * print (standard target):               Goals.               (line  98)
5869 * print target:                          Wildcard Examples.   (line  21)
5870 * print target <1>:                      Empty Targets.       (line  25)
5871 * printing directories:                  -w Option.           (line   6)
5872 * printing messages:                     Make Control Functions.
5873                                                               (line  43)
5874 * printing of recipes:                   Echoing.             (line   6)
5875 * printing user warnings:                Make Control Functions.
5876                                                               (line  35)
5877 * problems and bugs, reporting:          Bugs.                (line   6)
5878 * problems with wildcards:               Wildcard Pitfall.    (line   6)
5879 * processing a makefile:                 How Make Works.      (line   6)
5880 * question mode:                         Instead of Execution.
5881                                                               (line  32)
5882 * quoting %, in patsubst:                Text Functions.      (line  26)
5883 * quoting %, in static pattern:          Static Usage.        (line  37)
5884 * quoting %, in vpath:                   Selective Search.    (line  39)
5885 * quoting newline, in makefile:          Simple Makefile.     (line  41)
5886 * quoting newline, in recipes:           Splitting Recipe Lines.
5887                                                               (line   6)
5888 * Ratfor, rule to compile:               Catalogue of Rules.  (line  49)
5889 * RCS, rule to extract from:             Catalogue of Rules.  (line 163)
5890 * reading from a file:                   File Function.       (line   6)
5891 * reading makefiles:                     Reading Makefiles.   (line   6)
5892 * README:                                Makefile Names.      (line   9)
5893 * realclean (standard target):           Goals.               (line  86)
5894 * realpath:                              File Name Functions. (line 113)
5895 * recipe:                                Simple Makefile.     (line  74)
5896 * recipe execution, single invocation:   Special Targets.     (line 149)
5897 * recipe lines, single shell:            One Shell.           (line   6)
5898 * recipe syntax:                         Recipe Syntax.       (line   6)
5899 * recipe, execution:                     Execution.           (line   6)
5900 * recipes:                               Rule Syntax.         (line  25)
5901 * recipes <1>:                           Recipes.             (line   6)
5902 * recipes setting shell variables:       Execution.           (line  12)
5903 * recipes, and directory search:         Recipes/Search.      (line   6)
5904 * recipes, backslash (\) in:             Splitting Recipe Lines.
5905                                                               (line   6)
5906 * recipes, canned:                       Canned Recipes.      (line   6)
5907 * recipes, comments in:                  Recipe Syntax.       (line  29)
5908 * recipes, echoing:                      Echoing.             (line   6)
5909 * recipes, empty:                        Empty Recipes.       (line   6)
5910 * recipes, errors in:                    Errors.              (line   6)
5911 * recipes, execution in parallel:        Parallel.            (line   6)
5912 * recipes, how to write:                 Recipes.             (line   6)
5913 * recipes, instead of executing:         Instead of Execution.
5914                                                               (line   6)
5915 * recipes, introduction to:              Rule Introduction.   (line   8)
5916 * recipes, quoting newlines in:          Splitting Recipe Lines.
5917                                                               (line   6)
5918 * recipes, splitting:                    Splitting Recipe Lines.
5919                                                               (line   6)
5920 * recipes, using variables in:           Variables in Recipes.
5921                                                               (line   6)
5922 * recompilation:                         Introduction.        (line  22)
5923 * recompilation, avoiding:               Avoiding Compilation.
5924                                                               (line   6)
5925 * recording events with empty targets:   Empty Targets.       (line   6)
5926 * recursion:                             Recursion.           (line   6)
5927 * recursion, and -C:                     Options/Recursion.   (line  22)
5928 * recursion, and -f:                     Options/Recursion.   (line  22)
5929 * recursion, and -j:                     Options/Recursion.   (line  25)
5930 * recursion, and -o:                     Options/Recursion.   (line  22)
5931 * recursion, and -t:                     MAKE Variable.       (line  35)
5932 * recursion, and -W:                     Options/Recursion.   (line  22)
5933 * recursion, and -w:                     -w Option.           (line  20)
5934 * recursion, and command line variable definitions: Options/Recursion.
5935                                                               (line  17)
5936 * recursion, and environment:            Variables/Recursion. (line   6)
5937 * recursion, and MAKE variable:          MAKE Variable.       (line   6)
5938 * recursion, and MAKEFILES variable:     MAKEFILES Variable.  (line  15)
5939 * recursion, and options:                Options/Recursion.   (line   6)
5940 * recursion, and printing directories:   -w Option.           (line   6)
5941 * recursion, and variables:              Variables/Recursion. (line   6)
5942 * recursion, level of:                   Variables/Recursion. (line 114)
5943 * recursive variable expansion:          Using Variables.     (line   6)
5944 * recursive variable expansion <1>:      Flavors.             (line   6)
5945 * recursively expanded variables:        Flavors.             (line   6)
5946 * reference to variables:                Reference.           (line   6)
5947 * reference to variables <1>:            Advanced.            (line   6)
5948 * relinking:                             How Make Works.      (line  46)
5949 * remaking loaded objects:               Remaking Loaded Objects.
5950                                                               (line   6)
5951 * remaking makefiles:                    Remaking Makefiles.  (line   6)
5952 * removal of target files:               Errors.              (line  63)
5953 * removal of target files <1>:           Interrupts.          (line   6)
5954 * removing duplicate words:              Text Functions.      (line 155)
5955 * removing targets on failure:           Special Targets.     (line  71)
5956 * removing whitespace from split lines:  Splitting Lines.     (line  40)
5957 * removing, to clean up:                 Cleanup.             (line   6)
5958 * reporting bugs:                        Bugs.                (line   6)
5959 * rm:                                    Implicit Variables.  (line 106)
5960 * rm (shell command):                    Simple Makefile.     (line  85)
5961 * rm (shell command) <1>:                Wildcard Examples.   (line  12)
5962 * rm (shell command) <2>:                Phony Targets.       (line  20)
5963 * rm (shell command) <3>:                Errors.              (line  27)
5964 * rule prerequisites:                    Rule Syntax.         (line  47)
5965 * rule syntax:                           Rule Syntax.         (line   6)
5966 * rule targets:                          Rule Syntax.         (line  18)
5967 * rule, double-colon (::):               Double-Colon.        (line   6)
5968 * rule, explicit, definition of:         Makefile Contents.   (line  10)
5969 * rule, how to write:                    Rules.               (line   6)
5970 * rule, implicit:                        Implicit Rules.      (line   6)
5971 * rule, implicit, and directory search:  Implicit/Search.     (line   6)
5972 * rule, implicit, and VPATH:             Implicit/Search.     (line   6)
5973 * rule, implicit, chains of:             Chained Rules.       (line   6)
5974 * rule, implicit, definition of:         Makefile Contents.   (line  16)
5975 * rule, implicit, how to use:            Using Implicit.      (line   6)
5976 * rule, implicit, introduction to:       make Deduces.        (line   6)
5977 * rule, implicit, predefined:            Catalogue of Rules.  (line   6)
5978 * rule, introduction to:                 Rule Introduction.   (line   6)
5979 * rule, multiple for one target:         Multiple Rules.      (line   6)
5980 * rule, no recipe or prerequisites:      Force Targets.       (line   6)
5981 * rule, pattern:                         Pattern Intro.       (line   6)
5982 * rule, static pattern:                  Static Pattern.      (line   6)
5983 * rule, static pattern versus implicit:  Static versus Implicit.
5984                                                               (line   6)
5985 * rule, with multiple targets:           Multiple Targets.    (line   6)
5986 * rules, and $:                          Rule Syntax.         (line  33)
5987 * s. (SCCS file prefix):                 Catalogue of Rules.  (line 172)
5988 * SCCS, rule to extract from:            Catalogue of Rules.  (line 172)
5989 * search algorithm, implicit rule:       Implicit Rule Search.
5990                                                               (line   6)
5991 * search path for prerequisites (VPATH): Directory Search.    (line   6)
5992 * search path for prerequisites (VPATH), and implicit rules: Implicit/Search.
5993                                                               (line   6)
5994 * search path for prerequisites (VPATH), and link libraries: Libraries/Search.
5995                                                               (line   6)
5996 * searching for strings:                 Text Functions.      (line 104)
5997 * secondary expansion:                   Secondary Expansion. (line   6)
5998 * secondary expansion and explicit rules: Secondary Expansion.
5999                                                               (line 104)
6000 * secondary expansion and implicit rules: Secondary Expansion.
6001                                                               (line 144)
6002 * secondary expansion and static pattern rules: Secondary Expansion.
6003                                                               (line 136)
6004 * secondary files:                       Chained Rules.       (line  46)
6005 * secondary targets:                     Special Targets.     (line  54)
6006 * sed (shell command):                   Automatic Prerequisites.
6007                                                               (line  72)
6008 * selecting a word:                      Text Functions.      (line 159)
6009 * selecting word lists:                  Text Functions.      (line 168)
6010 * sequences of commands:                 Canned Recipes.      (line   6)
6011 * setting options from environment:      Options/Recursion.   (line  81)
6012 * setting options in makefiles:          Options/Recursion.   (line  81)
6013 * setting variables:                     Setting.             (line   6)
6014 * several rules for one target:          Multiple Rules.      (line   6)
6015 * several targets in a rule:             Multiple Targets.    (line   6)
6016 * shar (standard target):                Goals.               (line 104)
6017 * shell command, function for:           Shell Function.      (line   6)
6018 * shell file name pattern (in include):  Include.             (line  13)
6019 * shell variables, setting in recipes:   Execution.           (line  12)
6020 * shell wildcards (in include):          Include.             (line  13)
6021 * shell, choosing the:                   Choosing the Shell.  (line   6)
6022 * SHELL, exported value:                 Variables/Recursion. (line  23)
6023 * SHELL, import from environment:        Environment.         (line  37)
6024 * shell, in DOS and Windows:             Choosing the Shell.  (line  38)
6025 * SHELL, MS-DOS specifics:               Choosing the Shell.  (line  44)
6026 * SHELL, value of:                       Choosing the Shell.  (line   6)
6027 * signal:                                Interrupts.          (line   6)
6028 * silent operation:                      Echoing.             (line   6)
6029 * simple makefile:                       Simple Makefile.     (line   6)
6030 * simple variable expansion:             Using Variables.     (line   6)
6031 * simplifying with variables:            Variables Simplify.  (line   6)
6032 * simply expanded variables:             Flavors.             (line  56)
6033 * sorting words:                         Text Functions.      (line 147)
6034 * spaces, in variable values:            Flavors.             (line 107)
6035 * spaces, stripping:                     Text Functions.      (line  80)
6036 * special targets:                       Special Targets.     (line   6)
6037 * special variables:                     Special Variables.   (line   6)
6038 * specifying makefile name:              Makefile Names.      (line  31)
6039 * splitting long lines:                  Splitting Lines.     (line   6)
6040 * splitting recipes:                     Splitting Recipe Lines.
6041                                                               (line   6)
6042 * staged installs:                       DESTDIR.             (line   6)
6043 * standard input:                        Parallel Input.      (line   6)
6044 * standards conformance:                 Overview.            (line  13)
6045 * standards for makefiles:               Makefile Conventions.
6046                                                               (line   6)
6047 * static pattern rule:                   Static Pattern.      (line   6)
6048 * static pattern rule, syntax of:        Static Usage.        (line   6)
6049 * static pattern rule, versus implicit:  Static versus Implicit.
6050                                                               (line   6)
6051 * static pattern rules, secondary expansion of: Secondary Expansion.
6052                                                               (line 136)
6053 * stem:                                  Static Usage.        (line  17)
6054 * stem <1>:                              Pattern Match.       (line   6)
6055 * stem, shortest:                        Pattern Match.       (line  38)
6056 * stem, variable for:                    Automatic Variables. (line  78)
6057 * stopping make:                         Make Control Functions.
6058                                                               (line  11)
6059 * strings, searching for:                Text Functions.      (line 104)
6060 * stripping whitespace:                  Text Functions.      (line  80)
6061 * sub-make:                              Variables/Recursion. (line   6)
6062 * subdirectories, recursion for:         Recursion.           (line   6)
6063 * substitution variable reference:       Substitution Refs.   (line   6)
6064 * suffix rule:                           Suffix Rules.        (line   6)
6065 * suffix rule, for archive:              Archive Suffix Rules.
6066                                                               (line   6)
6067 * suffix, adding:                        File Name Functions. (line  67)
6068 * suffix, function to find:              File Name Functions. (line  42)
6069 * suffix, substituting in variables:     Substitution Refs.   (line   6)
6070 * suppressing inheritance:               Suppressing Inheritance.
6071                                                               (line   6)
6072 * switches:                              Options Summary.     (line   6)
6073 * symbol directories, updating archive:  Archive Symbols.     (line   6)
6074 * syntax of recipe:                      Recipe Syntax.       (line   6)
6075 * syntax of rules:                       Rule Syntax.         (line   6)
6076 * tab character (in commands):           Rule Syntax.         (line  25)
6077 * tabs in rules:                         Rule Introduction.   (line  21)
6078 * TAGS (standard target):                Goals.               (line 112)
6079 * tangle:                                Catalogue of Rules.  (line 149)
6080 * tangle <1>:                            Implicit Variables.  (line 100)
6081 * tar (standard target):                 Goals.               (line 101)
6082 * target:                                Rules.               (line   6)
6083 * target pattern, implicit:              Pattern Intro.       (line   9)
6084 * target pattern, static (not implicit): Static Usage.        (line  17)
6085 * target, deleting on error:             Errors.              (line  63)
6086 * target, deleting on interrupt:         Interrupts.          (line   6)
6087 * target, expansion:                     Reading Makefiles.   (line  93)
6088 * target, multiple in pattern rule:      Pattern Intro.       (line  44)
6089 * target, multiple rules for one:        Multiple Rules.      (line   6)
6090 * target, touching:                      Instead of Execution.
6091                                                               (line  24)
6092 * target-specific variables:             Target-specific.     (line   6)
6093 * targets:                               Rule Syntax.         (line  18)
6094 * targets without a file:                Phony Targets.       (line   6)
6095 * targets, built-in special:             Special Targets.     (line   6)
6096 * targets, empty:                        Empty Targets.       (line   6)
6097 * targets, force:                        Force Targets.       (line   6)
6098 * targets, grouped:                      Multiple Targets.    (line  61)
6099 * targets, independent:                  Multiple Targets.    (line  14)
6100 * targets, introduction to:              Rule Introduction.   (line   8)
6101 * targets, multiple:                     Multiple Targets.    (line   6)
6102 * targets, phony:                        Phony Targets.       (line   6)
6103 * terminal rule:                         Match-Anything Rules.
6104                                                               (line   6)
6105 * terminal, output to:                   Terminal Output.     (line   6)
6106 * test (standard target):                Goals.               (line 116)
6107 * testing compilation:                   Testing.             (line   6)
6108 * tex:                                   Catalogue of Rules.  (line 149)
6109 * tex <1>:                               Implicit Variables.  (line  87)
6110 * TeX, rule to run:                      Catalogue of Rules.  (line 149)
6111 * texi2dvi:                              Catalogue of Rules.  (line 156)
6112 * texi2dvi <1>:                          Implicit Variables.  (line  91)
6113 * Texinfo, rule to format:               Catalogue of Rules.  (line 156)
6114 * tilde (~):                             Wildcards.           (line  11)
6115 * tools, sharing job slots:              Job Slots.           (line   6)
6116 * touch (shell command):                 Wildcard Examples.   (line  21)
6117 * touch (shell command) <1>:             Empty Targets.       (line  25)
6118 * touching files:                        Instead of Execution.
6119                                                               (line  24)
6120 * traditional directory search (GPATH):  Search Algorithm.    (line  42)
6121 * types of prerequisites:                Prerequisite Types.  (line   6)
6122 * types, conversion of:                  Guile Types.         (line   6)
6123 * undefined variables, warning message:  Options Summary.     (line 293)
6124 * undefining variable:                   Undefine Directive.  (line   6)
6125 * updating archive symbol directories:   Archive Symbols.     (line   6)
6126 * updating loaded objects:               Remaking Loaded Objects.
6127                                                               (line   6)
6128 * updating makefiles:                    Remaking Makefiles.  (line   6)
6129 * user defined functions:                Call Function.       (line   6)
6130 * value:                                 Using Variables.     (line   6)
6131 * value, how a variable gets it:         Values.              (line   6)
6132 * variable:                              Using Variables.     (line   6)
6133 * variable definition:                   Makefile Contents.   (line  22)
6134 * variable references in recipes:        Variables in Recipes.
6135                                                               (line   6)
6136 * variables:                             Variables Simplify.  (line   6)
6137 * variables, $ in name:                  Computed Names.      (line   6)
6138 * variables, and implicit rule:          Automatic Variables. (line   6)
6139 * variables, appending to:               Appending.           (line   6)
6140 * variables, automatic:                  Automatic Variables. (line   6)
6141 * variables, command line:               Overriding.          (line   6)
6142 * variables, command line, and recursion: Options/Recursion.  (line  17)
6143 * variables, computed names:             Computed Names.      (line   6)
6144 * variables, conditional assignment:     Flavors.             (line 135)
6145 * variables, defining verbatim:          Multi-Line.          (line   6)
6146 * variables, environment:                Variables/Recursion. (line   6)
6147 * variables, environment <1>:            Environment.         (line   6)
6148 * variables, exporting:                  Variables/Recursion. (line   6)
6149 * variables, flavor of:                  Flavor Function.     (line   6)
6150 * variables, flavors:                    Flavors.             (line   6)
6151 * variables, how they get their values:  Values.              (line   6)
6152 * variables, how to reference:           Reference.           (line   6)
6153 * variables, loops in expansion:         Flavors.             (line  44)
6154 * variables, modified reference:         Substitution Refs.   (line   6)
6155 * variables, multi-line:                 Multi-Line.          (line   6)
6156 * variables, nested references:          Computed Names.      (line   6)
6157 * variables, origin of:                  Origin Function.     (line   6)
6158 * variables, overriding:                 Override Directive.  (line   6)
6159 * variables, overriding with arguments:  Overriding.          (line   6)
6160 * variables, pattern-specific:           Pattern-specific.    (line   6)
6161 * variables, recursively expanded:       Flavors.             (line   6)
6162 * variables, setting:                    Setting.             (line   6)
6163 * variables, simply expanded:            Flavors.             (line  56)
6164 * variables, spaces in values:           Flavors.             (line 107)
6165 * variables, substituting suffix in:     Substitution Refs.   (line   6)
6166 * variables, substitution reference:     Substitution Refs.   (line   6)
6167 * variables, target-specific:            Target-specific.     (line   6)
6168 * variables, unexpanded value:           Value Function.      (line   6)
6169 * variables, warning for undefined:      Options Summary.     (line 293)
6170 * varying prerequisites:                 Static Pattern.      (line   6)
6171 * verbatim variable definition:          Multi-Line.          (line   6)
6172 * vpath:                                 Directory Search.    (line   6)
6173 * VPATH, and implicit rules:             Implicit/Search.     (line   6)
6174 * VPATH, and link libraries:             Libraries/Search.    (line   6)
6175 * warnings, printing:                    Make Control Functions.
6176                                                               (line  35)
6177 * weave:                                 Catalogue of Rules.  (line 149)
6178 * weave <1>:                             Implicit Variables.  (line  94)
6179 * Web, rule to run:                      Catalogue of Rules.  (line 149)
6180 * what if:                               Instead of Execution.
6181                                                               (line  41)
6182 * whitespace, avoiding on line split:    Splitting Lines.     (line  40)
6183 * whitespace, in variable values:        Flavors.             (line 107)
6184 * whitespace, stripping:                 Text Functions.      (line  80)
6185 * wildcard:                              Wildcards.           (line   6)
6186 * wildcard pitfalls:                     Wildcard Pitfall.    (line   6)
6187 * wildcard, function:                    File Name Functions. (line 106)
6188 * wildcard, in archive member:           Archive Members.     (line  36)
6189 * wildcard, in include:                  Include.             (line  13)
6190 * wildcards and MS-DOS/MS-Windows backslashes: Wildcard Pitfall.
6191                                                               (line  31)
6192 * Windows, choosing a shell in:          Choosing the Shell.  (line  38)
6193 * word, selecting a:                     Text Functions.      (line 159)
6194 * words, extracting first:               Text Functions.      (line 185)
6195 * words, extracting last:                Text Functions.      (line 198)
6196 * words, filtering:                      Text Functions.      (line 115)
6197 * words, filtering out:                  Text Functions.      (line 133)
6198 * words, finding number:                 Text Functions.      (line 180)
6199 * words, iterating over:                 Foreach Function.    (line   6)
6200 * words, joining lists:                  File Name Functions. (line  89)
6201 * words, removing duplicates:            Text Functions.      (line 155)
6202 * words, selecting lists of:             Text Functions.      (line 168)
6203 * writing recipes:                       Recipes.             (line   6)
6204 * writing rules:                         Rules.               (line   6)
6205 * writing to a file:                     File Function.       (line   6)
6206 * yacc:                                  Catalogue of Rules.  (line 117)
6207 * yacc <1>:                              Implicit Variables.  (line  77)
6208 * yacc <2>:                              Canned Recipes.      (line  18)
6209 * Yacc, rule to run:                     Catalogue of Rules.  (line 117)
6210
6211 \1f
6212 File: make.info,  Node: Name Index,  Prev: Concept Index,  Up: Top
6213
6214 Index of Functions, Variables, & Directives
6215 *******************************************
6216
6217 \0\b[index\0\b]
6218 * Menu:
6219
6220 * $%:                                    Automatic Variables. (line  37)
6221 * $(%D):                                 Automatic Variables. (line 129)
6222 * $(%F):                                 Automatic Variables. (line 130)
6223 * $(*D):                                 Automatic Variables. (line 124)
6224 * $(*F):                                 Automatic Variables. (line 125)
6225 * $(+D):                                 Automatic Variables. (line 147)
6226 * $(+F):                                 Automatic Variables. (line 148)
6227 * $(<D):                                 Automatic Variables. (line 137)
6228 * $(<F):                                 Automatic Variables. (line 138)
6229 * $(?D):                                 Automatic Variables. (line 153)
6230 * $(?F):                                 Automatic Variables. (line 154)
6231 * $(@D):                                 Automatic Variables. (line 113)
6232 * $(@F):                                 Automatic Variables. (line 119)
6233 * $(^D):                                 Automatic Variables. (line 142)
6234 * $(^F):                                 Automatic Variables. (line 143)
6235 * $*:                                    Automatic Variables. (line  74)
6236 * $*, and static pattern:                Static Usage.        (line  82)
6237 * $+:                                    Automatic Variables. (line  64)
6238 * $<:                                    Automatic Variables. (line  43)
6239 * $?:                                    Automatic Variables. (line  48)
6240 * $@:                                    Automatic Variables. (line  30)
6241 * $^:                                    Automatic Variables. (line  54)
6242 * $|:                                    Automatic Variables. (line  70)
6243 * % (automatic variable):                Automatic Variables. (line  37)
6244 * %D (automatic variable):               Automatic Variables. (line 129)
6245 * %F (automatic variable):               Automatic Variables. (line 130)
6246 * * (automatic variable):                Automatic Variables. (line  74)
6247 * * (automatic variable), unsupported bizarre usage: Missing. (line  44)
6248 * *D (automatic variable):               Automatic Variables. (line 124)
6249 * *F (automatic variable):               Automatic Variables. (line 125)
6250 * + (automatic variable):                Automatic Variables. (line  64)
6251 * +D (automatic variable):               Automatic Variables. (line 147)
6252 * +F (automatic variable):               Automatic Variables. (line 148)
6253 * -load:                                 load Directive.      (line  65)
6254 * .DEFAULT:                              Special Targets.     (line  22)
6255 * .DEFAULT <1>:                          Last Resort.         (line  23)
6256 * .DEFAULT, and empty recipes:           Empty Recipes.       (line  16)
6257 * .DEFAULT_GOAL (define default goal):   Special Variables.   (line  34)
6258 * .DELETE_ON_ERROR:                      Special Targets.     (line  70)
6259 * .DELETE_ON_ERROR <1>:                  Errors.              (line  63)
6260 * .EXPORT_ALL_VARIABLES:                 Special Targets.     (line 134)
6261 * .EXPORT_ALL_VARIABLES <1>:             Variables/Recursion. (line  99)
6262 * .EXTRA_PREREQS (prerequisites not added to automatic variables): Special Variables.
6263                                                               (line 178)
6264 * .FEATURES (list of supported features): Special Variables.  (line 121)
6265 * .IGNORE:                               Special Targets.     (line  77)
6266 * .IGNORE <1>:                           Errors.              (line  30)
6267 * .INCLUDE_DIRS (list of include directories): Special Variables.
6268                                                               (line 174)
6269 * .INTERMEDIATE:                         Special Targets.     (line  47)
6270 * .LIBPATTERNS:                          Libraries/Search.    (line   6)
6271 * .LOADED:                               load Directive.      (line  62)
6272 * .LOW_RESOLUTION_TIME:                  Special Targets.     (line  90)
6273 * .NOTPARALLEL:                          Special Targets.     (line 140)
6274 * .ONESHELL:                             Special Targets.     (line 148)
6275 * .ONESHELL <1>:                         One Shell.           (line   6)
6276 * .PHONY:                                Phony Targets.       (line  22)
6277 * .PHONY <1>:                            Special Targets.     (line   8)
6278 * .POSIX:                                Special Targets.     (line 155)
6279 * .POSIX <1>:                            Options/Recursion.   (line  61)
6280 * .PRECIOUS:                             Special Targets.     (line  31)
6281 * .PRECIOUS <1>:                         Interrupts.          (line  22)
6282 * .RECIPEPREFIX (change the recipe prefix character): Special Variables.
6283                                                               (line  99)
6284 * .SECONDARY:                            Special Targets.     (line  53)
6285 * .SECONDEXPANSION:                      Secondary Expansion. (line   6)
6286 * .SECONDEXPANSION <1>:                  Special Targets.     (line  63)
6287 * .SHELLFLAGS:                           Choosing the Shell.  (line   6)
6288 * .SHELLFLAGS <1>:                       Choosing the Shell.  (line  87)
6289 * .SHELLSTATUS:                          Shell Function.      (line  25)
6290 * .SILENT:                               Special Targets.     (line 121)
6291 * .SILENT <1>:                           Echoing.             (line  24)
6292 * .SUFFIXES:                             Special Targets.     (line  16)
6293 * .SUFFIXES <1>:                         Suffix Rules.        (line  61)
6294 * .VARIABLES (list of variables):        Special Variables.   (line 112)
6295 * /usr/gnu/include:                      Include.             (line  53)
6296 * /usr/include:                          Include.             (line  53)
6297 * /usr/local/include:                    Include.             (line  53)
6298 * < (automatic variable):                Automatic Variables. (line  43)
6299 * <D (automatic variable):               Automatic Variables. (line 137)
6300 * <F (automatic variable):               Automatic Variables. (line 138)
6301 * ? (automatic variable):                Automatic Variables. (line  48)
6302 * ?D (automatic variable):               Automatic Variables. (line 153)
6303 * ?F (automatic variable):               Automatic Variables. (line 154)
6304 * @ (automatic variable):                Automatic Variables. (line  30)
6305 * @D (automatic variable):               Automatic Variables. (line 113)
6306 * @F (automatic variable):               Automatic Variables. (line 119)
6307 * ^ (automatic variable):                Automatic Variables. (line  54)
6308 * ^D (automatic variable):               Automatic Variables. (line 142)
6309 * ^F (automatic variable):               Automatic Variables. (line 143)
6310 * | (automatic variable):                Automatic Variables. (line  70)
6311 * abspath:                               File Name Functions. (line 120)
6312 * addprefix:                             File Name Functions. (line  78)
6313 * addsuffix:                             File Name Functions. (line  67)
6314 * and:                                   Conditional Functions.
6315                                                               (line  45)
6316 * AR:                                    Implicit Variables.  (line  40)
6317 * ARFLAGS:                               Implicit Variables.  (line 113)
6318 * AS:                                    Implicit Variables.  (line  43)
6319 * ASFLAGS:                               Implicit Variables.  (line 116)
6320 * basename:                              File Name Functions. (line  56)
6321 * bindir:                                Directory Variables. (line  57)
6322 * call:                                  Call Function.       (line   6)
6323 * CC:                                    Implicit Variables.  (line  46)
6324 * CFLAGS:                                Implicit Variables.  (line 120)
6325 * CO:                                    Implicit Variables.  (line  66)
6326 * COFLAGS:                               Implicit Variables.  (line 126)
6327 * COMSPEC:                               Choosing the Shell.  (line  41)
6328 * CPP:                                   Implicit Variables.  (line  52)
6329 * CPPFLAGS:                              Implicit Variables.  (line 129)
6330 * CTANGLE:                               Implicit Variables.  (line 103)
6331 * CURDIR:                                Recursion.           (line  28)
6332 * CWEAVE:                                Implicit Variables.  (line  97)
6333 * CXX:                                   Implicit Variables.  (line  49)
6334 * CXXFLAGS:                              Implicit Variables.  (line 123)
6335 * define:                                Multi-Line.          (line   6)
6336 * DESTDIR:                               DESTDIR.             (line   6)
6337 * dir:                                   File Name Functions. (line  16)
6338 * else:                                  Conditional Syntax.  (line   6)
6339 * endef:                                 Multi-Line.          (line   6)
6340 * endif:                                 Conditional Syntax.  (line   6)
6341 * error:                                 Make Control Functions.
6342                                                               (line  11)
6343 * eval:                                  Eval Function.       (line   6)
6344 * exec_prefix:                           Directory Variables. (line  39)
6345 * export:                                Variables/Recursion. (line  40)
6346 * FC:                                    Implicit Variables.  (line  56)
6347 * FFLAGS:                                Implicit Variables.  (line 133)
6348 * file:                                  File Function.       (line   6)
6349 * filter:                                Text Functions.      (line 115)
6350 * filter-out:                            Text Functions.      (line 133)
6351 * findstring:                            Text Functions.      (line 104)
6352 * firstword:                             Text Functions.      (line 185)
6353 * flavor:                                Flavor Function.     (line   6)
6354 * foreach:                               Foreach Function.    (line   6)
6355 * GET:                                   Implicit Variables.  (line  69)
6356 * GFLAGS:                                Implicit Variables.  (line 136)
6357 * gmk-eval:                              Guile Interface.     (line  18)
6358 * gmk-expand:                            Guile Interface.     (line  12)
6359 * gmk_add_function:                      Loaded Object API.   (line  53)
6360 * gmk_alloc:                             Loaded Object API.   (line 149)
6361 * gmk_eval:                              Loaded Object API.   (line 123)
6362 * gmk_expand:                            Loaded Object API.   (line 117)
6363 * gmk_free:                              Loaded Object API.   (line 154)
6364 * gmk_func_ptr:                          Loaded Object API.   (line  95)
6365 * GNUmakefile:                           Makefile Names.      (line   7)
6366 * GPATH:                                 Search Algorithm.    (line  48)
6367 * guile:                                 Guile Function.      (line   6)
6368 * if:                                    Conditional Functions.
6369                                                               (line   6)
6370 * if <1>:                                Conditional Functions.
6371                                                               (line  12)
6372 * ifdef:                                 Conditional Syntax.  (line   6)
6373 * ifeq:                                  Conditional Syntax.  (line   6)
6374 * ifndef:                                Conditional Syntax.  (line   6)
6375 * ifneq:                                 Conditional Syntax.  (line   6)
6376 * include:                               Include.             (line   6)
6377 * info:                                  Make Control Functions.
6378                                                               (line  43)
6379 * join:                                  File Name Functions. (line  89)
6380 * lastword:                              Text Functions.      (line 198)
6381 * LDFLAGS:                               Implicit Variables.  (line 139)
6382 * LDLIBS:                                Implicit Variables.  (line 144)
6383 * LEX:                                   Implicit Variables.  (line  72)
6384 * LFLAGS:                                Implicit Variables.  (line 150)
6385 * libexecdir:                            Directory Variables. (line  70)
6386 * LINT:                                  Implicit Variables.  (line  80)
6387 * LINTFLAGS:                             Implicit Variables.  (line 162)
6388 * load:                                  load Directive.      (line   9)
6389 * LOADLIBES:                             Implicit Variables.  (line 144)
6390 * M2C:                                   Implicit Variables.  (line  60)
6391 * MAKE:                                  MAKE Variable.       (line   6)
6392 * MAKE <1>:                              Flavors.             (line  88)
6393 * MAKECMDGOALS:                          Goals.               (line  30)
6394 * Makefile:                              Makefile Names.      (line   7)
6395 * makefile:                              Makefile Names.      (line   7)
6396 * MAKEFILES:                             MAKEFILES Variable.  (line   6)
6397 * MAKEFILES <1>:                         Variables/Recursion. (line 126)
6398 * MAKEFILE_LIST (list of parsed makefiles): Special Variables.
6399                                                               (line   8)
6400 * MAKEFLAGS:                             Options/Recursion.   (line   6)
6401 * MAKEINFO:                              Implicit Variables.  (line  83)
6402 * MAKELEVEL:                             Variables/Recursion. (line 114)
6403 * MAKELEVEL <1>:                         Flavors.             (line  88)
6404 * MAKEOVERRIDES:                         Options/Recursion.   (line  50)
6405 * MAKESHELL (MS-DOS alternative to SHELL): Choosing the Shell.
6406                                                               (line  27)
6407 * MAKE_HOST:                             Quick Reference.     (line 348)
6408 * MAKE_RESTARTS (number of times make has restarted): Special Variables.
6409                                                               (line  73)
6410 * MAKE_TERMERR (whether stderr is a terminal): Special Variables.
6411                                                               (line  80)
6412 * MAKE_TERMOUT (whether stdout is a terminal): Special Variables.
6413                                                               (line  80)
6414 * MAKE_VERSION:                          Quick Reference.     (line 343)
6415 * MFLAGS:                                Options/Recursion.   (line  66)
6416 * notdir:                                File Name Functions. (line  26)
6417 * or:                                    Conditional Functions.
6418                                                               (line  37)
6419 * origin:                                Origin Function.     (line   6)
6420 * OUTPUT_OPTION:                         Catalogue of Rules.  (line 200)
6421 * override:                              Override Directive.  (line   6)
6422 * patsubst:                              Substitution Refs.   (line  28)
6423 * patsubst <1>:                          Text Functions.      (line  18)
6424 * PC:                                    Implicit Variables.  (line  63)
6425 * PFLAGS:                                Implicit Variables.  (line 156)
6426 * prefix:                                Directory Variables. (line  29)
6427 * private:                               Suppressing Inheritance.
6428                                                               (line   6)
6429 * realpath:                              File Name Functions. (line 113)
6430 * RFLAGS:                                Implicit Variables.  (line 159)
6431 * RM:                                    Implicit Variables.  (line 106)
6432 * sbindir:                               Directory Variables. (line  63)
6433 * SHELL:                                 Choosing the Shell.  (line   6)
6434 * SHELL <1>:                             Choosing the Shell.  (line  88)
6435 * shell:                                 Shell Function.      (line   6)
6436 * SHELL (recipe execution):              Execution.           (line   6)
6437 * sort:                                  Text Functions.      (line 147)
6438 * strip:                                 Text Functions.      (line  80)
6439 * subst:                                 Multiple Targets.    (line  39)
6440 * subst <1>:                             Text Functions.      (line   9)
6441 * suffix:                                File Name Functions. (line  42)
6442 * SUFFIXES:                              Suffix Rules.        (line  81)
6443 * TANGLE:                                Implicit Variables.  (line 100)
6444 * TEX:                                   Implicit Variables.  (line  87)
6445 * TEXI2DVI:                              Implicit Variables.  (line  90)
6446 * undefine:                              Undefine Directive.  (line   6)
6447 * unexport:                              Variables/Recursion. (line  45)
6448 * value:                                 Value Function.      (line   6)
6449 * VPATH:                                 Directory Search.    (line   6)
6450 * VPATH <1>:                             General Search.      (line   6)
6451 * vpath:                                 Directory Search.    (line   6)
6452 * vpath <1>:                             Selective Search.    (line   6)
6453 * warning:                               Make Control Functions.
6454                                                               (line  35)
6455 * WEAVE:                                 Implicit Variables.  (line  94)
6456 * wildcard:                              Wildcard Function.   (line   6)
6457 * wildcard <1>:                          File Name Functions. (line 106)
6458 * word:                                  Text Functions.      (line 159)
6459 * wordlist:                              Text Functions.      (line 168)
6460 * words:                                 Text Functions.      (line 180)
6461 * YACC:                                  Implicit Variables.  (line  76)
6462 * YFLAGS:                                Implicit Variables.  (line 153)
6463