Changeset 503 for trunk/src/gmake/doc


Ignore:
Timestamp:
Sep 15, 2006, 7:09:38 AM (19 years ago)
Author:
bird
Message:

Untested merge with GNU Make v3.81 (vendor/gnumake/2005-05-16 -> vendor/gnumake/current).

Location:
trunk/src/gmake/doc
Files:
1 deleted
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/doc/Makefile.am

    r53 r503  
    11# -*-Makefile-*-, or close enough
     2# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
     3# Foundation, Inc.
     4# This file is part of GNU Make.
     5#
     6# GNU Make is free software; you can redistribute it and/or modify it under the
     7# terms of the GNU General Public License as published by the Free Software
     8# Foundation; either version 2, or (at your option) any later version.
     9#
     10# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
     11# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     12# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     13#
     14# You should have received a copy of the GNU General Public License along with
     15# GNU Make; see the file COPYING.  If not, write to the Free Software
     16# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    217
    318TEXI2HTML = texi2html
  • trunk/src/gmake/doc/Makefile.in

    r200 r503  
    1 # Makefile.in generated by automake 1.8.3 from Makefile.am.
     1# Makefile.in generated by automake 1.9.6 from Makefile.am.
    22# @configure_input@
    33
    44# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
    5 # 2003, 2004  Free Software Foundation, Inc.
     5# 2003, 2004, 2005  Free Software Foundation, Inc.
    66# This Makefile.in is free software; the Free Software Foundation
    77# gives unlimited permission to copy and/or distribute it,
     
    1616
    1717# -*-Makefile-*-, or close enough
     18# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
     19# Foundation, Inc.
     20# This file is part of GNU Make.
     21#
     22# GNU Make is free software; you can redistribute it and/or modify it under the
     23# terms of the GNU General Public License as published by the Free Software
     24# Foundation; either version 2, or (at your option) any later version.
     25#
     26# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
     27# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     28# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     29#
     30# You should have received a copy of the GNU General Public License along with
     31# GNU Make; see the file COPYING.  If not, write to the Free Software
     32# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1833srcdir = @srcdir@
    1934top_srcdir = @top_srcdir@
     
    3651PRE_UNINSTALL = :
    3752POST_UNINSTALL = :
     53build_triplet = @build@
    3854host_triplet = @host@
    3955subdir = doc
    4056DIST_COMMON = $(make_TEXINFOS) $(srcdir)/Makefile.am \
    41         $(srcdir)/Makefile.in
     57        $(srcdir)/Makefile.in $(srcdir)/stamp-vti \
     58        $(srcdir)/version.texi
    4259ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    43 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
    44         $(top_srcdir)/configure.in
     60am__aclocal_m4_deps = $(top_srcdir)/config/dospaths.m4 \
     61        $(top_srcdir)/config/gettext.m4 $(top_srcdir)/config/iconv.m4 \
     62        $(top_srcdir)/config/lib-ld.m4 \
     63        $(top_srcdir)/config/lib-link.m4 \
     64        $(top_srcdir)/config/lib-prefix.m4 $(top_srcdir)/config/nls.m4 \
     65        $(top_srcdir)/config/po.m4 $(top_srcdir)/config/progtest.m4 \
     66        $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
    4567am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    4668        $(ACLOCAL_M4)
     
    134156USE_NLS = @USE_NLS@
    135157VERSION = @VERSION@
     158WINDOWSENV_FALSE = @WINDOWSENV_FALSE@
     159WINDOWSENV_TRUE = @WINDOWSENV_TRUE@
    136160XGETTEXT = @XGETTEXT@
    137161ac_ct_CC = @ac_ct_CC@
     
    143167am__leading_dot = @am__leading_dot@
    144168am__quote = @am__quote@
     169am__tar = @am__tar@
     170am__untar = @am__untar@
    145171bindir = @bindir@
    146172build = @build@
     
    211237
    212238.texi.info:
    213         restore=: && \
    214         backupdir="$(am__leading_dot)am$$$$" && \
     239        restore=: && backupdir="$(am__leading_dot)am$$$$" && \
    215240        am__cwd=`pwd` && cd $(srcdir) && \
    216241        rm -rf $$backupdir && mkdir $$backupdir && \
    217         for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
    218           if test -f $$f; then \
    219             mv $$f $$backupdir; \
    220             restore=mv; \
    221           fi; \
    222         done; \
     242        if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
     243          for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
     244            if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
     245          done; \
     246        else :; fi && \
    223247        cd "$$am__cwd"; \
    224248        if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
     
    232256          $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
    233257        fi; \
    234         rm -rf $$backupdir; \
    235         exit $$rc
     258        rm -rf $$backupdir; exit $$rc
    236259
    237260.texi.dvi:
     
    246269
    247270.texi.html:
    248         $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
    249          -o $@ $<
    250         if test ! -d $@ && test -d $(@:.html=); then \
    251           mv $(@:.html=) $@; else :; fi
    252 $(srcdir)/make.info: make.texi $(make_TEXINFOS)
    253 make.dvi: make.texi $(make_TEXINFOS)
    254 make.pdf: make.texi $(make_TEXINFOS)
    255 make.html: make.texi $(make_TEXINFOS)
     271        rm -rf $(@:.html=.htp)
     272        if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
     273         -o $(@:.html=.htp) $<; \
     274        then \
     275          rm -rf $@; \
     276          if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
     277            mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
     278        else \
     279          if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
     280            rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
     281          exit 1; \
     282        fi
     283$(srcdir)/make.info: make.texi $(srcdir)/version.texi $(make_TEXINFOS)
     284make.dvi: make.texi $(srcdir)/version.texi $(make_TEXINFOS)
     285make.pdf: make.texi $(srcdir)/version.texi $(make_TEXINFOS)
     286make.html: make.texi $(srcdir)/version.texi $(make_TEXINFOS)
     287$(srcdir)/version.texi:  $(srcdir)/stamp-vti
     288$(srcdir)/stamp-vti: make.texi $(top_srcdir)/configure
     289        @(dir=.; test -f ./make.texi || dir=$(srcdir); \
     290        set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/make.texi`; \
     291        echo "@set UPDATED $$1 $$2 $$3"; \
     292        echo "@set UPDATED-MONTH $$2 $$3"; \
     293        echo "@set EDITION $(VERSION)"; \
     294        echo "@set VERSION $(VERSION)") > vti.tmp
     295        @cmp -s vti.tmp $(srcdir)/version.texi \
     296          || (echo "Updating $(srcdir)/version.texi"; \
     297              cp vti.tmp $(srcdir)/version.texi)
     298        -@rm -f vti.tmp
     299        @cp $(srcdir)/version.texi $@
     300
     301mostlyclean-vti:
     302        -rm -f vti.tmp
     303
     304maintainer-clean-vti:
     305        -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
    256306.dvi.ps:
     307        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
    257308        $(DVIPS) -o $@ $<
    258309
    259310uninstall-info-am:
    260         $(PRE_UNINSTALL)
     311        @$(PRE_UNINSTALL)
    261312        @if (install-info --version && \
    262313             install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
     
    274325          relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
    275326          (if cd "$(DESTDIR)$(infodir)"; then \
    276              echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
     327             echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
    277328             rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
    278329           else :; fi); \
     
    369420
    370421distclean-generic:
    371         -rm -f $(CONFIG_CLEAN_FILES)
     422        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    372423
    373424maintainer-clean-generic:
     
    435486        -rm -f Makefile
    436487maintainer-clean-am: distclean-am maintainer-clean-aminfo \
    437         maintainer-clean-generic
     488        maintainer-clean-generic maintainer-clean-vti
    438489
    439490mostlyclean: mostlyclean-am
    440491
    441 mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
     492mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
    442493
    443494pdf: pdf-am
     
    457508        install-man install-strip installcheck installcheck-am \
    458509        installdirs maintainer-clean maintainer-clean-aminfo \
    459         maintainer-clean-generic mostlyclean mostlyclean-aminfo \
    460         mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
    461         uninstall-info-am
     510        maintainer-clean-generic maintainer-clean-vti mostlyclean \
     511        mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
     512        pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
    462513
    463514
  • trunk/src/gmake/doc/fdl.texi

    r151 r503  
    44
    55@cindex FDL, GNU Free Documentation License
    6 @center Version 1.1, March 2000
     6@center Version 1.2, November 2002
    77
    88@display
    9 Copyright @copyright{} 2000 Free Software Foundation, Inc.
    10 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
     9Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
     1051 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
    1111
    1212Everyone is permitted to copy and distribute verbatim copies
     
    1919
    2020The purpose of this License is to make a manual, textbook, or other
    21 written document @dfn{free} in the sense of freedom: to assure everyone
    22 the effective freedom to copy and redistribute it, with or without
    23 modifying it, either commercially or noncommercially.  Secondarily,
    24 this License preserves for the author and publisher a way to get
    25 credit for their work, while not being considered responsible for
    26 modifications made by others.
     21functional and useful document @dfn{free} in the sense of freedom: to
     22assure everyone the effective freedom to copy and redistribute it,
     23with or without modifying it, either commercially or noncommercially.
     24Secondarily, this License preserves for the author and publisher a way
     25to get credit for their work, while not being considered responsible
     26for modifications made by others.
    2727
    2828This License is a kind of ``copyleft'', which means that derivative
     
    4242APPLICABILITY AND DEFINITIONS
    4343
    44 This License applies to any manual or other work that contains a
    45 notice placed by the copyright holder saying it can be distributed
    46 under the terms of this License.  The ``Document'', below, refers to any
    47 such manual or work.  Any member of the public is a licensee, and is
    48 addressed as ``you''.
     44This License applies to any manual or other work, in any medium, that
     45contains a notice placed by the copyright holder saying it can be
     46distributed under the terms of this License.  Such a notice grants a
     47world-wide, royalty-free license, unlimited in duration, to use that
     48work under the conditions stated herein.  The ``Document'', below,
     49refers to any such manual or work.  Any member of the public is a
     50licensee, and is addressed as ``you''.  You accept the license if you
     51copy, modify or distribute the work in a way requiring permission
     52under copyright law.
    4953
    5054A ``Modified Version'' of the Document means any work containing the
     
    5256modifications and/or translated into another language.
    5357
    54 A ``Secondary Section'' is a named appendix or a front-matter section of
    55 the Document that deals exclusively with the relationship of the
    56 publishers or authors of the Document to the Document's overall subject
    57 (or to related matters) and contains nothing that could fall directly
    58 within that overall subject.  (For example, if the Document is in part a
    59 textbook of mathematics, a Secondary Section may not explain any
    60 mathematics.)  The relationship could be a matter of historical
     58A ``Secondary Section'' is a named appendix or a front-matter section
     59of the Document that deals exclusively with the relationship of the
     60publishers or authors of the Document to the Document's overall
     61subject (or to related matters) and contains nothing that could fall
     62directly within that overall subject.  (Thus, if the Document is in
     63part a textbook of mathematics, a Secondary Section may not explain
     64any mathematics.)  The relationship could be a matter of historical
    6165connection with the subject or with related matters, or of legal,
    6266commercial, philosophical, ethical or political position regarding
     
    6569The ``Invariant Sections'' are certain Secondary Sections whose titles
    6670are designated, as being those of Invariant Sections, in the notice
    67 that says that the Document is released under this License.
     71that says that the Document is released under this License.  If a
     72section does not fit the above definition of Secondary then it is not
     73allowed to be designated as Invariant.  The Document may contain zero
     74Invariant Sections.  If the Document does not identify any Invariant
     75Sections then there are none.
    6876
    6977The ``Cover Texts'' are certain short passages of text that are listed,
    7078as Front-Cover Texts or Back-Cover Texts, in the notice that says that
    71 the Document is released under this License.
     79the Document is released under this License.  A Front-Cover Text may
     80be at most 5 words, and a Back-Cover Text may be at most 25 words.
    7281
    7382A ``Transparent'' copy of the Document means a machine-readable copy,
    7483represented in a format whose specification is available to the
    75 general public, whose contents can be viewed and edited directly and
     84general public, that is suitable for revising the document
    7685straightforwardly with generic text editors or (for images composed of
    7786pixels) generic paint programs or (for drawings) some widely available
     
    7988for automatic translation to a variety of formats suitable for input
    8089to text formatters.  A copy made in an otherwise Transparent file
    81 format whose markup has been designed to thwart or discourage
    82 subsequent modification by readers is not Transparent.  A copy that is
    83 not ``Transparent'' is called ``Opaque''.
     90format whose markup, or absence of markup, has been arranged to thwart
     91or discourage subsequent modification by readers is not Transparent.
     92An image format is not Transparent if used for any substantial amount
     93of text.  A copy that is not ``Transparent'' is called ``Opaque''.
    8494
    8595Examples of suitable formats for Transparent copies include plain
    86 @sc{ascii} without markup, Texinfo input format, La@TeX{} input format,
    87 @acronym{SGML} or @acronym{XML} using a publicly available
    88 @acronym{DTD}, and standard-conforming simple @acronym{HTML} designed
    89 for human modification.  Opaque formats include PostScript,
    90 @acronym{PDF}, proprietary formats that can be read and edited only by
    91 proprietary word processors, @acronym{SGML} or @acronym{XML} for which
    92 the @acronym{DTD} and/or processing tools are not generally available,
    93 and the machine-generated @acronym{HTML} produced by some word
    94 processors for output purposes only.
     96@sc{ascii} without markup, Texinfo input format, La@TeX{} input
     97format, @acronym{SGML} or @acronym{XML} using a publicly available
     98@acronym{DTD}, and standard-conforming simple @acronym{HTML},
     99PostScript or @acronym{PDF} designed for human modification.  Examples
     100of transparent image formats include @acronym{PNG}, @acronym{XCF} and
     101@acronym{JPG}.  Opaque formats include proprietary formats that can be
     102read and edited only by proprietary word processors, @acronym{SGML} or
     103@acronym{XML} for which the @acronym{DTD} and/or processing tools are
     104not generally available, and the machine-generated @acronym{HTML},
     105PostScript or @acronym{PDF} produced by some word processors for
     106output purposes only.
    95107
    96108The ``Title Page'' means, for a printed book, the title page itself,
     
    100112the text near the most prominent appearance of the work's title,
    101113preceding the beginning of the body of the text.
     114
     115A section ``Entitled XYZ'' means a named subunit of the Document whose
     116title either is precisely XYZ or contains XYZ in parentheses following
     117text that translates XYZ in another language.  (Here XYZ stands for a
     118specific section name mentioned below, such as ``Acknowledgements'',
     119``Dedications'', ``Endorsements'', or ``History''.)  To ``Preserve the Title''
     120of such a section when you modify the Document means that it remains a
     121section ``Entitled XYZ'' according to this definition.
     122
     123The Document may include Warranty Disclaimers next to the notice which
     124states that this License applies to the Document.  These Warranty
     125Disclaimers are considered to be included by reference in this
     126License, but only as regards disclaiming warranties: any other
     127implication that these Warranty Disclaimers may have is void and has
     128no effect on the meaning of this License.
    102129
    103130@item
     
    120147COPYING IN QUANTITY
    121148
    122 If you publish printed copies of the Document numbering more than 100,
    123 and the Document's license notice requires Cover Texts, you must enclose
    124 the copies in covers that carry, clearly and legibly, all these Cover
     149If you publish printed copies (or copies in media that commonly have
     150printed covers) of the Document, numbering more than 100, and the
     151Document's license notice requires Cover Texts, you must enclose the
     152copies in covers that carry, clearly and legibly, all these Cover
    125153Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
    126154the back cover.  Both covers must also clearly and legibly identify
     
    140168more than 100, you must either include a machine-readable Transparent
    141169copy along with each Opaque copy, or state in or with each Opaque copy
    142 a publicly-accessible computer-network location containing a complete
    143 Transparent copy of the Document, free of added material, which the
    144 general network-using public has access to download anonymously at no
    145 charge using public-standard network protocols.  If you use the latter
    146 option, you must take reasonably prudent steps, when you begin
    147 distribution of Opaque copies in quantity, to ensure that this
    148 Transparent copy will remain thus accessible at the stated location
    149 until at least one year after the last time you distribute an Opaque
    150 copy (directly or through your agents or retailers) of that edition to
    151 the public.
     170a computer-network location from which the general network-using
     171public has access to download using public-standard network protocols
     172a complete Transparent copy of the Document, free of added material.
     173If you use the latter option, you must take reasonably prudent steps,
     174when you begin distribution of Opaque copies in quantity, to ensure
     175that this Transparent copy will remain thus accessible at the stated
     176location until at least one year after the last time you distribute an
     177Opaque copy (directly or through your agents or retailers) of that
     178edition to the public.
    152179
    153180It is requested, but not required, that you contact the authors of the
     
    177204responsible for authorship of the modifications in the Modified
    178205Version, together with at least five of the principal authors of the
    179 Document (all of its principal authors, if it has less than five).
     206Document (all of its principal authors, if it has fewer than five),
     207unless they release you from this requirement.
    180208
    181209@item
     
    203231
    204232@item
    205 Preserve the section entitled ``History'', and its title, and add to
    206 it an item stating at least the title, year, new authors, and
     233Preserve the section Entitled ``History'', Preserve its Title, and add
     234to it an item stating at least the title, year, new authors, and
    207235publisher of the Modified Version as given on the Title Page.  If
    208 there is no section entitled ``History'' in the Document, create one
     236there is no section Entitled ``History'' in the Document, create one
    209237stating the title, year, authors, and publisher of the Document as
    210238given on its Title Page, then add an item describing the Modified
     
    221249
    222250@item
    223 In any section entitled ``Acknowledgments'' or ``Dedications'',
    224 preserve the section's title, and preserve in the section all the
    225 substance and tone of each of the contributor acknowledgments
    226 and/or dedications given therein.
     251For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
     252the Title of the section, and preserve in the section all the
     253substance and tone of each of the contributor acknowledgements and/or
     254dedications given therein.
    227255
    228256@item
     
    232260
    233261@item
    234 Delete any section entitled ``Endorsements''.  Such a section
     262Delete any section Entitled ``Endorsements''.  Such a section
    235263may not be included in the Modified Version.
    236264
    237265@item
    238 Do not retitle any existing section as ``Endorsements''
    239 or to conflict in title with any Invariant Section.
     266Do not retitle any existing section to be Entitled ``Endorsements'' or
     267to conflict in title with any Invariant Section.
     268
     269@item
     270Preserve any Warranty Disclaimers.
    240271@end enumerate
    241272
     
    247278These titles must be distinct from any other section titles.
    248279
    249 You may add a section entitled ``Endorsements'', provided it contains
     280You may add a section Entitled ``Endorsements'', provided it contains
    250281nothing but endorsements of your Modified Version by various
    251282parties---for example, statements of peer review or that the text has
     
    275306Invariant Sections of all of the original documents, unmodified, and
    276307list them all as Invariant Sections of your combined work in its
    277 license notice.
     308license notice, and that you preserve all their Warranty Disclaimers.
    278309
    279310The combined work need only contain one copy of this License, and
     
    286317Invariant Sections in the license notice of the combined work.
    287318
    288 In the combination, you must combine any sections entitled ``History''
    289 in the various original documents, forming one section entitled
    290 ``History''; likewise combine any sections entitled ``Acknowledgments'',
    291 and any sections entitled ``Dedications''.  You must delete all sections
    292 entitled ``Endorsements.''
     319In the combination, you must combine any sections Entitled ``History''
     320in the various original documents, forming one section Entitled
     321``History''; likewise combine any sections Entitled ``Acknowledgements'',
     322and any sections Entitled ``Dedications''.  You must delete all
     323sections Entitled ``Endorsements.''
    293324
    294325@item
     
    311342A compilation of the Document or its derivatives with other separate
    312343and independent documents or works, in or on a volume of a storage or
    313 distribution medium, does not as a whole count as a Modified Version
    314 of the Document, provided no compilation copyright is claimed for the
    315 compilation.  Such a compilation is called an ``aggregate'', and this
    316 License does not apply to the other self-contained works thus compiled
    317 with the Document, on account of their being thus compiled, if they
    318 are not themselves derivative works of the Document.
     344distribution medium, is called an ``aggregate'' if the copyright
     345resulting from the compilation is not used to limit the legal rights
     346of the compilation's users beyond what the individual works permit.
     347When the Document is included in an aggregate, this License does not
     348apply to the other works in the aggregate which are not themselves
     349derivative works of the Document.
    319350
    320351If the Cover Text requirement of section 3 is applicable to these
    321 copies of the Document, then if the Document is less than one quarter
    322 of the entire aggregate, the Document's Cover Texts may be placed on
    323 covers that surround only the Document within the aggregate.
    324 Otherwise they must appear on covers around the whole aggregate.
     352copies of the Document, then if the Document is less than one half of
     353the entire aggregate, the Document's Cover Texts may be placed on
     354covers that bracket the Document within the aggregate, or the
     355electronic equivalent of covers if the Document is in electronic form.
     356Otherwise they must appear on printed covers that bracket the whole
     357aggregate.
    325358
    326359@item
     
    333366translations of some or all Invariant Sections in addition to the
    334367original versions of these Invariant Sections.  You may include a
    335 translation of this License provided that you also include the
    336 original English version of this License.  In case of a disagreement
    337 between the translation and the original English version of this
    338 License, the original English version will prevail.
     368translation of this License, and all the license notices in the
     369Document, and any Warranty Disclaimers, provided that you also include
     370the original English version of this License and the original versions
     371of those notices and disclaimers.  In case of a disagreement between
     372the translation and the original version of this License or a notice
     373or disclaimer, the original version will prevail.
     374
     375If a section in the Document is Entitled ``Acknowledgements'',
     376``Dedications'', or ``History'', the requirement (section 4) to Preserve
     377its Title (section 1) will typically require changing the actual
     378title.
    339379
    340380@item
     
    379419  Copyright (C)  @var{year}  @var{your name}.
    380420  Permission is granted to copy, distribute and/or modify this document
    381   under the terms of the GNU Free Documentation License, Version 1.1
     421  under the terms of the GNU Free Documentation License, Version 1.2
    382422  or any later version published by the Free Software Foundation;
    383   with the Invariant Sections being @var{list their titles}, with the
    384   Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
    385   A copy of the license is included in the section entitled ``GNU
     423  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
     424  Texts.  A copy of the license is included in the section entitled ``GNU
    386425  Free Documentation License''.
    387426@end group
    388427@end smallexample
    389428
    390 If you have no Invariant Sections, write ``with no Invariant Sections''
    391 instead of saying which ones are invariant.  If you have no
    392 Front-Cover Texts, write ``no Front-Cover Texts'' instead of
    393 ``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
     429If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
     430replace the ``with...Texts.'' line with this:
     431
     432@smallexample
     433@group
     434    with the Invariant Sections being @var{list their titles}, with
     435    the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
     436    being @var{list}.
     437@end group
     438@end smallexample
     439
     440If you have Invariant Sections without Cover Texts, or some other
     441combination of the three, merge those two alternatives to suit the
     442situation.
    394443
    395444If your document contains nontrivial examples of program code, we
  • trunk/src/gmake/doc/make-stds.texi

    r151 r503  
    99@cindex standards for makefiles
    1010
    11 @c Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free
    12 @c Software Foundation, Inc.
     11@c Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
     12@c 2004, 2005 Free Software Foundation, Inc.
    1313
    1414@c Permission is granted to copy, distribute and/or modify this document
     
    294294Installation directories should always be named by variables, so it is
    295295easy to install in a nonstandard place.  The standard names for these
    296 variables are described below.  They are based on a standard filesystem
    297 layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4,
    298 and other modern operating systems.
     296variables and the values they should have in GNU packages are
     297described below.  They are based on a standard filesystem layout;
     298variants of it are used in GNU/Linux and other modern operating
     299systems.
     300
     301Installers are expected to override these values when calling
     302@command{make} (e.g., @kbd{make prefix=/usr install} or
     303@command{configure} (e.g., @kbd{configure --prefix=/usr}).  GNU
     304packages should not try to guess which value should be appropriate for
     305these variables on the system they are being installed onto: use the
     306default settings specified here so that all GNU packages behave
     307identically, allowing the installer to achieve any desired layout.
    299308
    300309These two variables set the root for the installation.  All the other
     
    356365@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}.
    357366(If you are using Autoconf, write it as @samp{@@libexecdir@@}.)
     367
     368The definition of @samp{libexecdir} is the same for all packages, so
     369you should install your data in a subdirectory thereof.  Most packages
     370install their data under @file{$(libexecdir)/@var{package-name}/},
     371possibly within additional subdirectories thereof, such as
     372@file{$(libexecdir)/@var{package-name}/@var{machine}/@var{version}}.
    358373@end table
    359374
     
    378393architecture-independent, and it is generally not hard.
    379394
    380 Therefore, here are the variables Makefiles should use to specify
    381 directories:
     395Here are the variables Makefiles should use to specify directories
     396to put these various kinds of files in:
    382397
    383398@table @samp
     399@item datarootdir
     400The root of the directory tree for read-only architecture-independent
     401data files.  This should normally be @file{/usr/local/share}, but
     402write it as @file{$(prefix)/share}.  (If you are using Autoconf, write
     403it as @samp{@@datarootdir@@}.)  @samp{datadir}'s default value is
     404based on this variable; so are @samp{infodir}, @samp{mandir}, and
     405others.
     406
    384407@item datadir
    385 The directory for installing read-only architecture independent data
    386 files.  This should normally be @file{/usr/local/share}, but write it as
    387 @file{$(prefix)/share}.
    388 (If you are using Autoconf, write it as @samp{@@datadir@@}.)
    389 As a special exception, see @file{$(infodir)}
    390 and @file{$(includedir)} below.
     408The directory for installing idiosyncratic read-only
     409architecture-independent data files for this program.  This is usually
     410the same place as @samp{datarootdir}, but we use the two separate
     411variables so that you can move these program-specific files without
     412altering the location for Info files, man pages, etc.
     413
     414This should normally be @file{/usr/local/share}, but write it as
     415@file{$(datarootdir)}.  (If you are using Autoconf, write it as
     416@samp{@@datadir@@}.)
     417
     418The definition of @samp{datadir} is the same for all packages, so you
     419should install your data in a subdirectory thereof.  Most packages
     420install their data under @file{$(datadir)/@var{package-name}/}.
    391421
    392422@item sysconfdir
     
    420450@file{$(prefix)/var}.
    421451(If you are using Autoconf, write it as @samp{@@localstatedir@@}.)
    422 
    423 @item libdir
    424 The directory for object files and libraries of object code.  Do not
    425 install executables here, they probably ought to go in @file{$(libexecdir)}
    426 instead.  The value of @code{libdir} should normally be
    427 @file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
    428 (If you are using Autoconf, write it as @samp{@@libdir@@}.)
    429 
    430 @item infodir
    431 The directory for installing the Info files for this package.  By
    432 default, it should be @file{/usr/local/info}, but it should be written
    433 as @file{$(prefix)/info}.
    434 (If you are using Autoconf, write it as @samp{@@infodir@@}.)
    435 
    436 @item lispdir
    437 The directory for installing any Emacs Lisp files in this package.  By
    438 default, it should be @file{/usr/local/share/emacs/site-lisp}, but it
    439 should be written as @file{$(prefix)/share/emacs/site-lisp}.
    440 
    441 If you are using Autoconf, write the default as @samp{@@lispdir@@}.
    442 In order to make @samp{@@lispdir@@} work, you need the following lines
    443 in your @file{configure.in} file:
    444 
    445 @example
    446 lispdir='$@{datadir@}/emacs/site-lisp'
    447 AC_SUBST(lispdir)
    448 @end example
    449 
     452@end table
     453
     454These variables specify the directory for installing certain specific
     455types of files, if your program has them.  Every GNU package should
     456have Info files, so every program needs @samp{infodir}, but not all
     457need @samp{libdir} or @samp{lispdir}.
     458
     459@table @samp
    450460@item includedir
    451461@c rewritten to avoid overfull hbox --roland
     
    482492To tell whether @file{foo.h} came from the Foo package, put a magic
    483493string in the file---part of a comment---and @code{grep} for that string.
     494
     495@item docdir
     496The directory for installing documentation files (other than Info) for
     497this package.  By default, it should be
     498@file{/usr/local/share/doc/@var{yourpkg}}, but it should be written as
     499@file{$(datarootdir)/doc/@var{yourpkg}}.  (If you are using Autoconf,
     500write it as @samp{@@docdir@@}.)  The @var{yourpkg} subdirectory, which
     501may include a version number, prevents collisions among files with
     502common names, such as @file{README}.
     503
     504@item infodir
     505The directory for installing the Info files for this package.  By
     506default, it should be @file{/usr/local/share/info}, but it should be
     507written as @file{$(datarootdir)/info}.  (If you are using Autoconf,
     508write it as @samp{@@infodir@@}.)  @code{infodir} is separate from
     509@code{docdir} for compatibility with existing practice.
     510
     511@item htmldir
     512@itemx dvidir
     513@itemx pdfdir
     514@itemx psdir
     515Directories for installing documentation files in the particular
     516format.  (It is not required to support documentation in all these
     517formats.)  They should all be set to @code{$(docdir)} by default.  (If
     518you are using Autoconf, write them as @samp{@@htmldir@@},
     519@samp{@@dvidir@@}, etc.)  Packages which supply several translations
     520of their documentation should install them in
     521@samp{$(htmldir)/}@var{ll}, @samp{$(pdfdir)/}@var{ll}, etc. where
     522@var{ll} is a locale abbreviation such as @samp{en} or @samp{pt_BR}.
     523
     524@item libdir
     525The directory for object files and libraries of object code.  Do not
     526install executables here, they probably ought to go in @file{$(libexecdir)}
     527instead.  The value of @code{libdir} should normally be
     528@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
     529(If you are using Autoconf, write it as @samp{@@libdir@@}.)
     530
     531@item lispdir
     532The directory for installing any Emacs Lisp files in this package.  By
     533default, it should be @file{/usr/local/share/emacs/site-lisp}, but it
     534should be written as @file{$(datarootdir)/emacs/site-lisp}.
     535
     536If you are using Autoconf, write the default as @samp{@@lispdir@@}.
     537In order to make @samp{@@lispdir@@} work, you need the following lines
     538in your @file{configure.in} file:
     539
     540@example
     541lispdir='$@{datarootdir@}/emacs/site-lisp'
     542AC_SUBST(lispdir)
     543@end example
     544
     545@item localedir
     546The directory for installing locale-specific message catalogs for this
     547package.  By default, it should be @file{/usr/local/share/locale}, but
     548it should be written as @file{$(datarootdir)/locale}.  (If you are
     549using Autoconf, write it as @samp{@@localedir@@}.)  This directory
     550usually has a subdirectory per locale.
    484551@end table
    485552
     
    489556@item mandir
    490557The top-level directory for installing the man pages (if any) for this
    491 package.  It will normally be @file{/usr/local/man}, but you should
    492 write it as @file{$(prefix)/man}.
    493 (If you are using Autoconf, write it as @samp{@@mandir@@}.)
     558package.  It will normally be @file{/usr/local/share/man}, but you
     559should write it as @file{$(datarootdir)/man}.  (If you are using
     560Autoconf, write it as @samp{@@mandir@@}.)
    494561
    495562@item man1dir
     
    536603# NOTE: This directory must exist when you start the install.
    537604prefix = /usr/local
     605datarootdir = $(prefix)/share
     606datadir = $(datarootdir)
    538607exec_prefix = $(prefix)
    539608# Where to put the executable for the command `gcc'.
     
    542611libexecdir = $(exec_prefix)/libexec
    543612# Where to put the Info files.
    544 infodir = $(prefix)/info
     613infodir = $(datarootdir)/info
    545614@end smallexample
    546615
     
    631700Categories}.
    632701
     702@item install-html
     703@itemx install-dvi
     704@itemx install-pdf
     705@itemx install-ps
     706These targets install documentation in formats other than Info;
     707they're intended to be called explicitly by the person installing the
     708package, if that format is desired.  GNU prefers Info files, so these
     709must be installed by the @code{install} target.
     710
     711When you have many documentation files to install, we recommend that
     712you avoid collisions and clutter by arranging for these targets to
     713install in subdirectories of the appropriate installation directory,
     714such as @code{htmldir}.  As one example, if your package has multiple
     715manuals, and you wish to install HTML documentation with many files
     716(such as the ``split'' mode output by @code{makeinfo --html}), you'll
     717certainly want to use subdirectories, or two nodes with the same name
     718in different manuals will overwrite each other.
     719
    633720@item uninstall
    634721Delete all the installed files---the copies that the @samp{install}
    635 target creates.
     722and @samp{install-*} targets create.
    636723
    637724This rule should not modify the directories where compilation is done,
     
    669756@item clean
    670757
    671 Delete all files from the current directory that are normally created by
    672 building the program.  Don't delete the files that record the
    673 configuration.  Also preserve files that could be made by building, but
    674 normally aren't because the distribution comes with them.
     758Delete all files in the current directory that are normally created by
     759building the program.  Also delete files in other directories if they
     760are created by this makefile.  However, don't delete the files that
     761record the configuration.  Also preserve files that could be made by
     762building, but normally aren't because the distribution comes with
     763them.  There is no need to delete parent directories that were created
     764with @samp{mkdir -p}, since they could have existed anyway.
    675765
    676766Delete @file{.dvi} files here if they are not part of the distribution.
    677767
    678768@item distclean
    679 Delete all files from the current directory that are created by
    680 configuring or building the program.  If you have unpacked the source
    681 and built the program without creating any other files, @samp{make
    682 distclean} should leave only the files that were in the distribution.
     769Delete all files in the current directory (or created by this
     770makefile) that are created by configuring or building the program.  If
     771you have unpacked the source and built the program without creating
     772any other files, @samp{make distclean} should leave only the files
     773that were in the distribution.  However, there is no need to delete
     774parent directories that were created with @samp{mkdir -p}, since they
     775could have existed anyway.
    683776
    684777@item mostlyclean
     
    689782
    690783@item maintainer-clean
    691 Delete almost everything from the current directory that can be
    692 reconstructed with this Makefile.  This typically includes everything
    693 deleted by @code{distclean}, plus more: C source files produced by
    694 Bison, tags tables, Info files, and so on.
     784Delete almost everything that can be reconstructed with this Makefile.
     785This typically includes everything deleted by @code{distclean}, plus
     786more: C source files produced by Bison, tags tables, Info files, and
     787so on.
    695788
    696789The reason we say ``almost everything'' is that running the command
    697 @samp{make maintainer-clean} should not delete @file{configure} even if
    698 @file{configure} can be remade using a rule in the Makefile.  More generally,
    699 @samp{make maintainer-clean} should not delete anything that needs to
    700 exist in order to run @file{configure} and then begin to build the
    701 program.  This is the only exception; @code{maintainer-clean} should
    702 delete everything else that can be rebuilt.
     790@samp{make maintainer-clean} should not delete @file{configure} even
     791if @file{configure} can be remade using a rule in the Makefile.  More
     792generally, @samp{make maintainer-clean} should not delete anything
     793that needs to exist in order to run @file{configure} and then begin to
     794build the program.  Also, there is no need to delete parent
     795directories that were created with @samp{mkdir -p}, since they could
     796have existed anyway.  These are the only exceptions;
     797@code{maintainer-clean} should delete everything else that can be
     798rebuilt.
    703799
    704800The @samp{maintainer-clean} target is intended to be used by a maintainer of
     
    744840
    745841@item dvi
    746 Generate DVI files for all Texinfo documentation.
    747 For example:
     842@itemx html
     843@itemx pdf
     844@itemx ps
     845Generate documentation files in the given format, if possible.
     846Here's an example rule for generating DVI files from Texinfo:
    748847
    749848@smallexample
     
    760859of formatting. @TeX{} is not distributed with Texinfo.}  Alternatively,
    761860write just the dependencies, and allow GNU @code{make} to provide the command.
     861
     862Here's another example, this one for generating HTML from Texinfo:
     863
     864@smallexample
     865html: foo.html
     866
     867foo.html: foo.texi chap1.texi chap2.texi
     868        $(TEXI2HTML) $(srcdir)/foo.texi
     869@end smallexample
     870
     871@noindent
     872Again, you would define the variable @code{TEXI2HTML} in the Makefile;
     873for example, it might run @code{makeinfo --no-split --html}
     874(@command{makeinfo} is part of the Texinfo distribution).
    762875
    763876@item dist
     
    9331046Programs to build binary packages work by extracting the
    9341047pre-installation and post-installation commands.  Here is one way of
    935 extracting the pre-installation commands:
    936 
    937 @smallexample
    938 make -n install -o all \
     1048extracting the pre-installation commands (the @option{-s} option to
     1049@command{make} is needed to silence messages about entering
     1050subdirectories):
     1051
     1052@smallexample
     1053make -s -n install -o all \
    9391054      PRE_INSTALL=pre-install \
    9401055      POST_INSTALL=post-install \
     
    9471062
    9481063@smallexample
    949 $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@}
     1064$0 ~ /^(normal-install|post-install)[ \t]*$/ @{on = 0@}
    9501065on @{print $0@}
    951 $0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@}
    952 @end smallexample
    953 
    954 The resulting file of pre-installation commands is executed as a shell
    955 script as part of installing the binary package.
     1066$0 ~ /^pre-install[ \t]*$/ @{on = 1@}
     1067@end smallexample
  • trunk/src/gmake/doc/make.info

    r200 r503  
    1 This is ../../doc/make.info, produced by makeinfo version 4.6 from
    2 ../../doc/make.texi.
     1This is make.info, produced by makeinfo version 4.8 from make.texi.
     2
     3   This file documents the GNU `make' utility, which determines
     4automatically which pieces of a large program need to be recompiled,
     5and issues the commands to recompile them.
     6
     7   This is Edition 0.70, last updated 1 April 2006, of `The GNU Make
     8Manual', for GNU `make' version 3.81.
     9
     10   Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
     111997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
     12Foundation, Inc.
     13
     14     Permission is granted to copy, distribute and/or modify this
     15     document under the terms of the GNU Free Documentation License,
     16     Version 1.2 or any later version published by the Free Software
     17     Foundation; with no Invariant Sections, with the Front-Cover Texts
     18     being "A GNU Manual," and with the Back-Cover Texts as in (a)
     19     below.  A copy of the license is included in the section entitled
     20     "GNU Free Documentation License."
     21
     22     (a) The FSF's Back-Cover Text is: "You have freedom to copy and
     23     modify this GNU Manual, like GNU software.  Copies published by
     24     the Free Software Foundation raise funds for GNU development."
    325
    426INFO-DIR-SECTION GNU Packages
     
    729END-INFO-DIR-ENTRY
    830
    9    This file documents the GNU Make utility, which determines
    10 automatically which pieces of a large program need to be recompiled,
    11 and issues the commands to recompile them.
    12 
    13    This is Edition 0.61, last updated 02 May 2003, of `The GNU Make
    14 Manual', for `make', Version 3.81.
    15 
    16    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    17 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    18 
    19    Permission is granted to copy, distribute and/or modify this document
    20 under the terms of the GNU Free Documentation License, Version 1.1 or
    21 any later version published by the Free Software Foundation; with no
    22 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    23 Texts.  A copy of the license is included in the section entitled "GNU
    24 Free Documentation License".
    25 
    2631
    2732Indirect:
    28 make.info-1: 1017
    29 make.info-2: 300520
     33make.info-1: 1297
     34make.info-2: 301265
    3035
    3136Tag Table:
    3237(Indirect)
    33 Node: Top1017
    34 Node: Overview13551
    35 Node: Preparing14555
    36 Node: Reading15527
    37 Node: Bugs16446
    38 Node: Introduction18268
    39 Node: Rule Introduction19852
    40 Node: Simple Makefile21588
    41 Node: How Make Works25209
    42 Node: Variables Simplify27697
    43 Node: make Deduces29900
    44 Node: Combine By Prerequisite31647
    45 Node: Cleanup32678
    46 Node: Makefiles34089
    47 Node: Makefile Contents34972
    48 Node: Makefile Names37919
    49 Node: Include39518
    50 Ref: Include-Footnote-143069
    51 Node: MAKEFILES Variable43203
    52 Node: MAKEFILE_LIST Variable44705
    53 Node: Special Variables46024
    54 Node: Remaking Makefiles46759
    55 Node: Overriding Makefiles51001
    56 Node: Reading Makefiles53051
    57 Node: Rules55578
    58 Node: Rule Example58246
    59 Node: Rule Syntax59095
    60 Node: Prerequisite Types61316
    61 Node: Wildcards63084
    62 Node: Wildcard Examples64767
    63 Node: Wildcard Pitfall66011
    64 Node: Wildcard Function67793
    65 Node: Directory Search69570
    66 Node: General Search70704
    67 Node: Selective Search72407
    68 Node: Search Algorithm75383
    69 Node: Commands/Search77890
    70 Node: Implicit/Search79225
    71 Node: Libraries/Search80157
    72 Node: Phony Targets82239
    73 Node: Force Targets87215
    74 Node: Empty Targets88252
    75 Node: Special Targets89539
    76 Node: Multiple Targets96235
    77 Node: Multiple Rules98095
    78 Node: Static Pattern100321
    79 Node: Static Usage100963
    80 Node: Static versus Implicit104684
    81 Node: Double-Colon106414
    82 Node: Automatic Prerequisites108061
    83 Node: Commands112315
    84 Node: Echoing114004
    85 Node: Execution115282
    86 Ref: Execution-Footnote-1119708
    87 Node: Parallel119854
    88 Node: Errors123437
    89 Node: Interrupts127073
    90 Node: Recursion128652
    91 Node: MAKE Variable130735
    92 Node: Variables/Recursion132986
    93 Node: Options/Recursion138131
    94 Node: -w Option143284
    95 Node: Sequences144267
    96 Node: Empty Commands147268
    97 Node: Using Variables148434
    98 Node: Reference151541
    99 Node: Flavors153097
    100 Node: Advanced158881
    101 Node: Substitution Refs159378
    102 Node: Computed Names160924
    103 Node: Values165491
    104 Node: Setting166396
    105 Node: Appending168424
    106 Node: Override Directive172339
    107 Node: Defining173715
    108 Node: Environment176171
    109 Node: Target-specific178443
    110 Node: Pattern-specific181400
    111 Node: Conditionals182792
    112 Node: Conditional Example183498
    113 Node: Conditional Syntax186082
    114 Node: Testing Flags190950
    115 Node: Functions192044
    116 Node: Syntax of Functions193386
    117 Node: Text Functions195577
    118 Node: File Name Functions203727
    119 Node: Foreach Function208166
    120 Node: If Function211366
    121 Node: Call Function212634
    122 Node: Value Function215516
    123 Node: Eval Function216950
    124 Node: Origin Function219256
    125 Node: Shell Function222465
    126 Node: Make Control Functions224046
    127 Node: Running225476
    128 Node: Makefile Arguments227461
    129 Node: Goals228169
    130 Node: Instead of Execution232724
    131 Node: Avoiding Compilation236002
    132 Node: Overriding237969
    133 Node: Testing240259
    134 Node: Options Summary242136
    135 Node: Implicit Rules251567
    136 Node: Using Implicit253711
    137 Node: Catalogue of Rules257240
    138 Node: Implicit Variables266223
    139 Node: Chained Rules270449
    140 Node: Pattern Rules274448
    141 Node: Pattern Intro275974
    142 Node: Pattern Examples278822
    143 Node: Automatic Variables280617
    144 Node: Pattern Match288780
    145 Node: Match-Anything Rules290401
    146 Node: Canceling Rules294262
    147 Node: Last Resort294964
    148 Node: Suffix Rules296801
    149 Node: Implicit Rule Search300520
    150 Node: Archives304029
    151 Node: Archive Members304721
    152 Node: Archive Update306317
    153 Node: Archive Symbols308221
    154 Node: Archive Pitfalls309441
    155 Node: Archive Suffix Rules310154
    156 Node: Features311691
    157 Node: Missing320238
    158 Node: Makefile Conventions323968
    159 Node: Makefile Basics324748
    160 Node: Utilities in Makefiles327905
    161 Node: Command Variables330033
    162 Node: Directory Variables333593
    163 Node: Standard Targets344470
    164 Ref: Standard Targets-Footnote-1355724
    165 Node: Install Command Categories355824
    166 Node: Quick Reference360389
    167 Node: Error Messages370133
    168 Node: Complex Makefile377802
    169 Node: GNU Free Documentation License386482
    170 Node: Concept Index406374
    171 Node: Name Index451280
     38Node: Top1297
     39Node: Overview14702
     40Node: Preparing15712
     41Node: Reading16684
     42Node: Bugs17611
     43Node: Introduction19441
     44Node: Rule Introduction21033
     45Node: Simple Makefile22777
     46Node: How Make Works26406
     47Node: Variables Simplify29061
     48Node: make Deduces31267
     49Node: Combine By Prerequisite33007
     50Node: Cleanup34036
     51Node: Makefiles35455
     52Node: Makefile Contents36421
     53Node: Makefile Names39376
     54Node: Include40987
     55Ref: Include-Footnote-144619
     56Node: MAKEFILES Variable44753
     57Node: MAKEFILE_LIST Variable46263
     58Node: Special Variables47531
     59Node: Remaking Makefiles51038
     60Node: Overriding Makefiles55287
     61Node: Reading Makefiles57340
     62Node: Secondary Expansion60244
     63Node: Rules67678
     64Node: Rule Example70350
     65Node: Rule Syntax71207
     66Node: Prerequisite Types73710
     67Node: Wildcards75486
     68Node: Wildcard Examples77204
     69Node: Wildcard Pitfall78460
     70Node: Wildcard Function80249
     71Node: Directory Search82033
     72Node: General Search83175
     73Node: Selective Search84890
     74Node: Search Algorithm87878
     75Node: Commands/Search90397
     76Node: Implicit/Search91743
     77Node: Libraries/Search92687
     78Node: Phony Targets94779
     79Node: Force Targets99865
     80Node: Empty Targets100910
     81Node: Special Targets102208
     82Node: Multiple Targets109382
     83Node: Multiple Rules111257
     84Node: Static Pattern113493
     85Node: Static Usage114145
     86Node: Static versus Implicit117866
     87Node: Double-Colon119610
     88Node: Automatic Prerequisites121267
     89Node: Commands125545
     90Node: Command Syntax126753
     91Node: Splitting Lines128778
     92Node: Variables in Commands131759
     93Node: Echoing133086
     94Node: Execution134378
     95Ref: Execution-Footnote-1135629
     96Node: Choosing the Shell135775
     97Node: Parallel139744
     98Node: Errors143337
     99Node: Interrupts146983
     100Node: Recursion148570
     101Node: MAKE Variable150664
     102Node: Variables/Recursion152931
     103Node: Options/Recursion158372
     104Node: -w Option163537
     105Node: Sequences164532
     106Node: Empty Commands167544
     107Node: Using Variables168718
     108Node: Reference171831
     109Node: Flavors173390
     110Node: Advanced179128
     111Node: Substitution Refs179633
     112Node: Computed Names181186
     113Node: Values185730
     114Node: Setting186643
     115Node: Appending188679
     116Node: Override Directive192605
     117Node: Defining193989
     118Node: Environment196453
     119Node: Target-specific198702
     120Node: Pattern-specific201669
     121Node: Conditionals203071
     122Node: Conditional Example203781
     123Node: Conditional Syntax206358
     124Node: Testing Flags212083
     125Node: Functions213185
     126Node: Syntax of Functions214605
     127Node: Text Functions216804
     128Node: File Name Functions225375
     129Node: Conditional Functions230597
     130Node: Foreach Function232971
     131Node: Call Function236183
     132Node: Value Function239068
     133Node: Eval Function240505
     134Node: Origin Function242779
     135Node: Flavor Function245997
     136Node: Shell Function247063
     137Node: Make Control Functions248697
     138Node: Running250366
     139Node: Makefile Arguments252355
     140Node: Goals253071
     141Node: Instead of Execution257812
     142Node: Avoiding Compilation261098
     143Node: Overriding263073
     144Node: Testing265371
     145Node: Options Summary267256
     146Node: Implicit Rules277382
     147Node: Using Implicit279530
     148Node: Catalogue of Rules283069
     149Node: Implicit Variables292419
     150Node: Chained Rules297254
     151Node: Pattern Rules301265
     152Node: Pattern Intro302801
     153Node: Pattern Examples305698
     154Node: Automatic Variables307507
     155Node: Pattern Match314878
     156Node: Match-Anything Rules316514
     157Node: Canceling Rules320389
     158Node: Last Resort321105
     159Node: Suffix Rules322952
     160Node: Implicit Rule Search326681
     161Node: Archives330200
     162Node: Archive Members330898
     163Node: Archive Update332511
     164Node: Archive Symbols334425
     165Node: Archive Pitfalls335659
     166Node: Archive Suffix Rules336382
     167Node: Features337929
     168Node: Missing346484
     169Node: Makefile Conventions350222
     170Node: Makefile Basics351008
     171Node: Utilities in Makefiles354175
     172Node: Command Variables356313
     173Node: Directory Variables359883
     174Node: Standard Targets374023
     175Ref: Standard Targets-Footnote-1387142
     176Node: Install Command Categories387242
     177Node: Quick Reference391768
     178Node: Error Messages402464
     179Node: Complex Makefile410154
     180Node: GNU Free Documentation License418872
     181Node: Concept Index441321
     182Node: Name Index506510
    172183
    173184End Tag Table
  • trunk/src/gmake/doc/make.info-1

    r200 r503  
    1 This is ../../doc/make.info, produced by makeinfo version 4.6 from
    2 ../../doc/make.texi.
     1This is make.info, produced by makeinfo version 4.8 from make.texi.
     2
     3   This file documents the GNU `make' utility, which determines
     4automatically which pieces of a large program need to be recompiled,
     5and issues the commands to recompile them.
     6
     7   This is Edition 0.70, last updated 1 April 2006, of `The GNU Make
     8Manual', for GNU `make' version 3.81.
     9
     10   Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
     111997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
     12Foundation, Inc.
     13
     14     Permission is granted to copy, distribute and/or modify this
     15     document under the terms of the GNU Free Documentation License,
     16     Version 1.2 or any later version published by the Free Software
     17     Foundation; with no Invariant Sections, with the Front-Cover Texts
     18     being "A GNU Manual," and with the Back-Cover Texts as in (a)
     19     below.  A copy of the license is included in the section entitled
     20     "GNU Free Documentation License."
     21
     22     (a) The FSF's Back-Cover Text is: "You have freedom to copy and
     23     modify this GNU Manual, like GNU software.  Copies published by
     24     the Free Software Foundation raise funds for GNU development."
    325
    426INFO-DIR-SECTION GNU Packages
     
    729END-INFO-DIR-ENTRY
    830
    9    This file documents the GNU Make utility, which determines
     31
     32File: make.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
     33
     34GNU `make'
     35**********
     36
     37This file documents the GNU `make' utility, which determines
    1038automatically which pieces of a large program need to be recompiled,
    1139and issues the commands to recompile them.
    1240
    13    This is Edition 0.61, last updated 02 May 2003, of `The GNU Make
    14 Manual', for `make', Version 3.81.
    15 
    16    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    17 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    18 
    19    Permission is granted to copy, distribute and/or modify this document
    20 under the terms of the GNU Free Documentation License, Version 1.1 or
    21 any later version published by the Free Software Foundation; with no
    22 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    23 Texts.  A copy of the license is included in the section entitled "GNU
    24 Free Documentation License".
    25 
    26 
    27 File: make.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
    28 
    29 Make
    30 ****
    31 
    32 The GNU `make' utility automatically determines which pieces of a large
    33 program need to be recompiled, and issues the commands to recompile
    34 them.
    35 
    36    This edition of the `GNU Make Manual', last updated 02 May 2003,
    37 documents GNU `make' Version 3.81.
    38 
    39    This manual describes `make' and contains the following chapters:
     41   This is Edition 0.70, last updated 1 April 2006, of `The GNU Make
     42Manual', for GNU `make' version 3.81.
     43
     44   Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
     451997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
     46Foundation, Inc.
     47
     48     Permission is granted to copy, distribute and/or modify this
     49     document under the terms of the GNU Free Documentation License,
     50     Version 1.2 or any later version published by the Free Software
     51     Foundation; with no Invariant Sections, with the Front-Cover Texts
     52     being "A GNU Manual," and with the Back-Cover Texts as in (a)
     53     below.  A copy of the license is included in the section entitled
     54     "GNU Free Documentation License."
     55
     56     (a) The FSF's Back-Cover Text is: "You have freedom to copy and
     57     modify this GNU Manual, like GNU software.  Copies published by
     58     the Free Software Foundation raise funds for GNU development."
    4059
    4160* Menu:
     
    97116                                  with another makefile.
    98117* Reading Makefiles::           How makefiles are parsed.
     118* Secondary Expansion::         How and when secondary expansion is performed.
    99119
    100120Writing Rules
     
    107127* Phony Targets::               Using a target that is not a real file's name.
    108128* Force Targets::               You can use a target without commands
    109                                   or prerequisites to mark other
    110                                   targets as phony.
     129                                  or prerequisites to mark other targets
     130                                  as phony.
    111131* Empty Targets::               When only the date matters and the
    112132                                  files are empty.
     
    148168Writing the Commands in Rules
    149169
     170* Command Syntax::              Command syntax features and pitfalls.
    150171* Echoing::                     How to control when commands are echoed.
    151172* Execution::                   How commands are executed.
     
    156177* Sequences::                   Defining canned sequences of commands.
    157178* Empty Commands::              Defining useful, do-nothing commands.
     179
     180Command Syntax
     181
     182* Splitting Lines::             Breaking long command lines for readability.
     183* Variables in Commands::       Using `make' variables in commands.
     184
     185Command Execution
     186
     187* Choosing the Shell::          How `make' chooses the shell used
     188                                  to run commands.
    158189
    159190Recursive Use of `make'
     
    201232* Text Functions::              General-purpose text manipulation functions.
    202233* File Name Functions::         Functions for manipulating file names.
     234* Conditional Functions::       Functions that implement conditions.
    203235* Foreach Function::            Repeat some text with controlled variation.
    204 * If Function::                 Conditionally expand a value.
    205236* Call Function::               Expand a user-defined function.
    206237* Value Function::              Return the un-expanded value of a variable.
    207238* Eval Function::               Evaluate the arguments as makefile syntax.
    208239* Origin Function::             Find where a variable got its value.
     240* Flavor Function::             Find out the flavor of a variable.
    209241* Shell Function::              Substitute the output of a shell command.
    210242* Make Control Functions::      Functions that control how make runs.
     
    234266* Chained Rules::               How to use a chain of implicit rules.
    235267* Pattern Rules::               How to define new implicit rules.
    236 * Last Resort::                 How to defining commands for rules
    237                                   which cannot find any.
     268* Last Resort::                 How to define commands for rules which
     269                                  cannot find any.
    238270* Suffix Rules::                The old-fashioned style of implicit rule.
    239271* Implicit Rule Search::        The precise algorithm for applying
     
    264296* Archive Symbols::             How to update archive symbol directories.
    265297
    266 Makefile Conventions
    267 
    268 * Makefile Basics::             General Conventions for Makefiles
    269 * Utilities in Makefiles::      Utilities in Makefiles
    270 * Command Variables::           Variables for Specifying Commands
    271 * Directory Variables::         Variables for Installation Directories
    272 * Standard Targets::            Standard Targets for Users
    273 * Install Command Categories::  Three categories of commands in the `install'
    274 
    275 Copying This Manual
    276 
    277298
    278299File: make.info,  Node: Overview,  Next: Introduction,  Prev: Top,  Up: Top
    279300
    280 Overview of `make'
    281 ******************
     3011 Overview of `make'
     302********************
    282303
    283304The `make' utility automatically determines which pieces of a large
     
    288309
    289310   GNU `make' conforms to section 6.2 of `IEEE Standard 1003.2-1992'
    290 (POSIX.2).
     311(POSIX.2). 
    291312
    292313   Our examples show C programs, since they are most common, but you
     
    330351File: make.info,  Node: Reading,  Next: Bugs,  Prev: Preparing,  Up: Overview
    331352
    332 How to Read This Manual
    333 =======================
     3531.1 How to Read This Manual
     354===========================
    334355
    335356If you are new to `make', or are looking for a general introduction,
     
    351372File: make.info,  Node: Bugs,  Prev: Reading,  Up: Overview
    352373
    353 Problems and Bugs
    354 =================
     3741.2 Problems and Bugs
     375=====================
    355376
    356377If you have problems with GNU `make' or think you've found a bug,
     
    394415File: make.info,  Node: Introduction,  Next: Makefiles,  Prev: Overview,  Up: Top
    395416
    396 An Introduction to Makefiles
    397 ****************************
     4172 An Introduction to Makefiles
     418******************************
    398419
    399420You need a file called a "makefile" to tell `make' what to do.  Most
    400 often, the makefile tells `make' how to compile and link a program.
     421often, the makefile tells `make' how to compile and link a program. 
    401422
    402423   In this chapter, we will discuss a simple makefile that describes
     
    413434Finally, if any source file has been recompiled, all the object files,
    414435whether newly made or saved from previous compilations, must be linked
    415 together to produce the new executable editor.
     436together to produce the new executable editor. 
    416437
    417438* Menu:
     
    428449File: make.info,  Node: Rule Introduction,  Next: Simple Makefile,  Prev: Introduction,  Up: Introduction
    429450
    430 What a Rule Looks Like
    431 ======================
     4512.1 What a Rule Looks Like
     452==========================
    432453
    433454A simple makefile consists of "rules" with the following shape:
     
    471492File: make.info,  Node: Simple Makefile,  Next: How Make Works,  Prev: Rule Introduction,  Up: Introduction
    472493
    473 A Simple Makefile
    474 =================
     4942.2 A Simple Makefile
     495=====================
    475496
    476497Here is a straightforward makefile that describes the way an executable
     
    486507             cc -o edit main.o kbd.o command.o display.o \
    487508                        insert.o search.o files.o utils.o
    488      
     509
    489510     main.o : main.c defs.h
    490511             cc -c main.c
     
    508529
    509530We split each long line into two lines using backslash-newline; this is
    510 like using one long line, but is easier to read.
     531like using one long line, but is easier to read. 
    511532
    512533   To use this makefile to create the executable file called `edit',
     
    536557prerequisites.  These shell commands say how to update the target file.
    537558A tab character must come at the beginning of every command line to
    538 distinguish commands lines from other lines in the makefile.  (Bear in
     559distinguish command lines from other lines in the makefile.  (Bear in
    539560mind that `make' does not know anything about how the commands work.
    540561It is up to you to supply commands that will update the target file
    541562properly.  All `make' does is execute the commands in the rule you have
    542 specified when the target file needs to be updated.)
     563specified when the target file needs to be updated.) 
    543564
    544565   The target `clean' is not a file, but merely the name of an action.
     
    551572called "phony targets".  *Note Phony Targets::, for information about
    552573this kind of target.  *Note Errors in Commands: Errors, to see how to
    553 cause `make' to ignore errors from `rm' or any other command.
     574cause `make' to ignore errors from `rm' or any other command. 
    554575
    555576
    556577File: make.info,  Node: How Make Works,  Next: Variables Simplify,  Prev: Simple Makefile,  Up: Introduction
    557578
    558 How `make' Processes a Makefile
    559 ===============================
     5792.3 How `make' Processes a Makefile
     580===================================
    560581
    561582By default, `make' starts with the first target (not targets whose
    562583names start with `.').  This is called the "default goal".  ("Goals"
    563 are the targets that `make' strives ultimately to update.  *Note
    564 Arguments to Specify the Goals: Goals.)
     584are the targets that `make' strives ultimately to update.    You can
     585override this behavior using the command line (*note Arguments to
     586Specify the Goals: Goals.) or with the `.DEFAULT_GOAL' special variable
     587(*note Other Special Variables: Special Variables.). 
    565588
    566589   In the simple example of the previous section, the default goal is to
     
    597620not exist, or if any of the object files are newer than it.  If an
    598621object file was just recompiled, it is now newer than `edit', so `edit'
    599 is relinked.
     622is relinked. 
    600623
    601624   Thus, if we change the file `insert.c' and run `make', `make' will
     
    608631File: make.info,  Node: Variables Simplify,  Next: make Deduces,  Prev: How Make Works,  Up: Introduction
    609632
    610 Variables Make Makefiles Simpler
    611 ================================
     6332.4 Variables Make Makefiles Simpler
     634====================================
    612635
    613636In our example, we had to list all the object files twice in the rule
     
    642665     objects = main.o kbd.o command.o display.o \
    643666               insert.o search.o files.o utils.o
    644      
     667
    645668     edit : $(objects)
    646669             cc -o edit $(objects)
     
    667690File: make.info,  Node: make Deduces,  Next: Combine By Prerequisite,  Prev: Variables Simplify,  Up: Introduction
    668691
    669 Letting `make' Deduce the Commands
    670 ==================================
     6922.5 Letting `make' Deduce the Commands
     693======================================
    671694
    672695It is not necessary to spell out the commands for compiling the
     
    687710     objects = main.o kbd.o command.o display.o \
    688711               insert.o search.o files.o utils.o
    689      
     712
    690713     edit : $(objects)
    691714             cc -o edit $(objects)
    692      
     715
    693716     main.o : defs.h
    694717     kbd.o : defs.h command.h
     
    699722     files.o : defs.h buffer.h command.h
    700723     utils.o : defs.h
    701      
     724
    702725     .PHONY : clean
    703726     clean :
     
    714737File: make.info,  Node: Combine By Prerequisite,  Next: Cleanup,  Prev: make Deduces,  Up: Introduction
    715738
    716 Another Style of Makefile
    717 =========================
     7392.6 Another Style of Makefile
     740=============================
    718741
    719742When the objects of a makefile are created only by implicit rules, an
     
    724747     objects = main.o kbd.o command.o display.o \
    725748               insert.o search.o files.o utils.o
    726      
     749
    727750     edit : $(objects)
    728751             cc -o edit $(objects)
    729      
     752
    730753     $(objects) : defs.h
    731754     kbd.o command.o files.o : command.h
     
    743766File: make.info,  Node: Cleanup,  Prev: Combine By Prerequisite,  Up: Introduction
    744767
    745 Rules for Cleaning the Directory
    746 ================================
     7682.7 Rules for Cleaning the Directory
     769====================================
    747770
    748771Compiling a program is not the only thing you might want to write rules
     
    782805File: make.info,  Node: Makefiles,  Next: Rules,  Prev: Introduction,  Up: Top
    783806
    784 Writing Makefiles
    785 *****************
     8073 Writing Makefiles
     808*******************
    786809
    787810The information that tells `make' how to recompile a system comes from
     
    800823                                  with another makefile.
    801824* Reading Makefiles::           How makefiles are parsed.
     825* Secondary Expansion::         How and when secondary expansion is performed.
    802826
    803827
    804828File: make.info,  Node: Makefile Contents,  Next: Makefile Names,  Prev: Makefiles,  Up: Makefiles
    805829
    806 What Makefiles Contain
    807 ======================
     8303.1 What Makefiles Contain
     831==========================
    808832
    809833Makefiles contain five kinds of things: "explicit rules", "implicit
     
    865889File: make.info,  Node: Makefile Names,  Next: Include,  Prev: Makefile Contents,  Up: Makefiles
    866890
    867 What Name to Give Your Makefile
    868 ===============================
     8913.2 What Name to Give Your Makefile
     892===================================
    869893
    870894By default, when `make' looks for the makefile, it tries the following
    871 names, in order: `GNUmakefile', `makefile' and `Makefile'.
     895names, in order: `GNUmakefile', `makefile' and `Makefile'. 
    872896
    873897   Normally you should call your makefile either `makefile' or
     
    892916concatenated in the order specified.  The default makefile names
    893917`GNUmakefile', `makefile' and `Makefile' are not checked automatically
    894 if you specify `-f' or `--file'.
     918if you specify `-f' or `--file'. 
    895919
    896920
    897921File: make.info,  Node: Include,  Next: MAKEFILES Variable,  Prev: Makefile Names,  Up: Makefiles
    898922
    899 Including Other Makefiles
    900 =========================
     9233.3 Including Other Makefiles
     924=============================
    901925
    902926The `include' directive tells `make' to suspend reading the current
     
    906930     include FILENAMES...
    907931
    908 FILENAMES can contain shell file name patterns.
     932FILENAMES can contain shell file name patterns.  If FILENAMES is empty,
     933nothing is included and no error is printed. 
    909934
    910935   Extra spaces are allowed and ignored at the beginning of the line,
     
    943968than that of somehow appending the prerequisites to the end of the main
    944969makefile as has been traditionally done with other versions of `make'.
    945 *Note Automatic Prerequisites::.
     970*Note Automatic Prerequisites::. 
    946971
    947972   If the specified name does not start with a slash, and the file is
     
    9811006File: make.info,  Node: MAKEFILES Variable,  Next: MAKEFILE_LIST Variable,  Prev: Include,  Up: Makefiles
    9821007
    983 The Variable `MAKEFILES'
    984 ========================
     10083.4 The Variable `MAKEFILES'
     1009============================
    9851010
    9861011If the environment variable `MAKEFILES' is defined, `make' considers
     
    10101035File: make.info,  Node: MAKEFILE_LIST Variable,  Next: Special Variables,  Prev: MAKEFILES Variable,  Up: Makefiles
    10111036
    1012 The Variable `MAKEFILE_LIST'
    1013 ============================
     10373.5 The Variable `MAKEFILE_LIST'
     1038================================
    10141039
    10151040As `make' reads various makefiles, including any obtained from the
     
    10261051   If a makefile named `Makefile' has this content:
    10271052
    1028      name1 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
    1029      
     1053     name1 := $(lastword $(MAKEFILE_LIST))
     1054
    10301055     include inc.mk
    1031      
    1032      name2 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
    1033      
     1056
     1057     name2 := $(lastword $(MAKEFILE_LIST))
     1058
    10341059     all:
    10351060             @echo name1 = $(name1)
     
    10491074File: make.info,  Node: Special Variables,  Next: Remaking Makefiles,  Prev: MAKEFILE_LIST Variable,  Up: Makefiles
    10501075
    1051 Other Special Variables
    1052 =======================
    1053 
    1054 GNU `make' also supports a special variable.  Note that any value you
    1055 assign to this variable will be ignored; it will always return its
    1056 special value.
    1057 
    1058    The first special variable is `.VARIABLES'.  When expanded, the
    1059 value consists of a list of the _names_ of all global variables defined
    1060 in all makefiles read up until that point.  This includes variables
    1061 which have empty values, as well as built-in variables (*note Variables
    1062 Used by Implicit Rules: Implicit Variables.), but does not include any
    1063 variables which are only defined in a target-specific context.
     10763.6 Other Special Variables
     1077===========================
     1078
     1079GNU `make' also supports other special variables.  Unless otherwise
     1080documented here, these values lose their special properties if they are
     1081set by a makefile or on the command line.
     1082
     1083`.DEFAULT_GOAL'
     1084     Sets the default goal to be used if no targets were specified on
     1085     the command line (*note Arguments to Specify the Goals: Goals.).
     1086     The `.DEFAULT_GOAL' variable allows you to discover the current
     1087     default goal, restart the default goal selection algorithm by
     1088     clearing its value, or to explicitly set the default goal.  The
     1089     following example illustrates these cases:
     1090
     1091          # Query the default goal.
     1092          ifeq ($(.DEFAULT_GOAL),)
     1093            $(warning no default goal is set)
     1094          endif
     1095
     1096          .PHONY: foo
     1097          foo: ; @echo $@
     1098
     1099          $(warning default goal is $(.DEFAULT_GOAL))
     1100
     1101          # Reset the default goal.
     1102          .DEFAULT_GOAL :=
     1103
     1104          .PHONY: bar
     1105          bar: ; @echo $@
     1106
     1107          $(warning default goal is $(.DEFAULT_GOAL))
     1108
     1109          # Set our own.
     1110          .DEFAULT_GOAL := foo
     1111
     1112     This makefile prints:
     1113
     1114          no default goal is set
     1115          default goal is foo
     1116          default goal is bar
     1117          foo
     1118
     1119     Note that assigning more than one target name to `.DEFAULT_GOAL' is
     1120     illegal and will result in an error.
     1121
     1122`MAKE_RESTARTS'
     1123     This variable is set only if this instance of `make' has restarted
     1124     (*note How Makefiles Are Remade: Remaking Makefiles.): it will
     1125     contain the number of times this instance has restarted.  Note
     1126     this is not the same as recursion (counted by the `MAKELEVEL'
     1127     variable).  You should not set, modify, or export this variable.
     1128
     1129`.VARIABLES'
     1130     Expands to a list of the _names_ of all global variables defined
     1131     so far.  This includes variables which have empty values, as well
     1132     as built-in variables (*note Variables Used by Implicit Rules:
     1133     Implicit Variables.), but does not include any variables which are
     1134     only defined in a target-specific context.  Note that any value
     1135     you assign to this variable will be ignored; it will always return
     1136     its special value.
     1137
     1138`.FEATURES'
     1139     Expands to a list of special features supported by this version of
     1140     `make'.  Possible values include:
     1141
     1142    `archives'
     1143          Supports `ar' (archive) files using special filename syntax.
     1144          *Note Using `make' to Update Archive Files: Archives.
     1145
     1146    `check-symlink'
     1147          Supports the `-L' (`--check-symlink-times') flag.  *Note
     1148          Summary of Options: Options Summary.
     1149
     1150    `else-if'
     1151          Supports "else if" non-nested conditionals.  *Note Syntax of
     1152          Conditionals: Conditional Syntax.
     1153
     1154    `jobserver'
     1155          Supports "job server" enhanced parallel builds.  *Note
     1156          Parallel Execution: Parallel.
     1157
     1158    `second-expansion'
     1159          Supports secondary expansion of prerequisite lists.
     1160
     1161    `order-only'
     1162          Supports order-only prerequisites.  *Note Types of
     1163          Prerequisites: Prerequisite Types.
     1164
     1165    `target-specific'
     1166          Supports target-specific and pattern-specific variable
     1167          assignments.  *Note Target-specific Variable Values:
     1168          Target-specific.
     1169
     1170
     1171`.INCLUDE_DIRS'
     1172     Expands to a list of directories that `make' searches for included
     1173     makefiles (*note Including Other Makefiles: Include.).
     1174
    10641175
    10651176
    10661177File: make.info,  Node: Remaking Makefiles,  Next: Overriding Makefiles,  Prev: Special Variables,  Up: Makefiles
    10671178
    1068 How Makefiles Are Remade
    1069 ========================
     11793.7 How Makefiles Are Remade
     1180============================
    10701181
    10711182Sometimes makefiles can be remade from other files, such as RCS or SCCS
     
    11041215   If you do not specify any makefiles to be read with `-f' or `--file'
    11051216options, `make' will try the default makefile names; *note What Name to
    1106 Give Your Makefile: Makefile Names..  Unlike makefiles explicitly
     1217Give Your Makefile: Makefile Names.  Unlike makefiles explicitly
    11071218requested with `-f' or `--file' options, `make' is not certain that
    11081219these makefiles should exist.  However, if a default makefile does not
     
    11441255File: make.info,  Node: Overriding Makefiles,  Next: Reading Makefiles,  Prev: Remaking Makefiles,  Up: Makefiles
    11451256
    1146 Overriding Part of Another Makefile
    1147 ===================================
     12573.8 Overriding Part of Another Makefile
     1258=======================================
    11481259
    11491260Sometimes it is useful to have a makefile that is mostly just like
     
    11651276     foo:
    11661277             frobnicate > foo
    1167      
     1278
    11681279     %: force
    11691280             @$(MAKE) -f Makefile $@
     
    11871298
    11881299
    1189 File: make.info,  Node: Reading Makefiles,  Prev: Overriding Makefiles,  Up: Makefiles
    1190 
    1191 How `make' Reads a Makefile
    1192 ===========================
     1300File: make.info,  Node: Reading Makefiles,  Next: Secondary Expansion,  Prev: Overriding Makefiles,  Up: Makefiles
     1301
     13023.9 How `make' Reads a Makefile
     1303===============================
    11931304
    11941305GNU `make' does its work in two distinct phases.  During the first
     
    12251336     IMMEDIATE := IMMEDIATE
    12261337     IMMEDIATE += DEFERRED or IMMEDIATE
    1227      
     1338
    12281339     define IMMEDIATE
    12291340       DEFERRED
     
    12391350All instances of conditional syntax are parsed immediately, in their
    12401351entirety; this includes the `ifdef', `ifeq', `ifndef', and `ifneq'
    1241 forms.
     1352forms.  Of course this means that automatic variables cannot be used in
     1353conditional statements, as automatic variables are not set until the
     1354command script for that rule is invoked.  If you need to use automatic
     1355variables in a conditional you _must_ use shell conditional syntax, in
     1356your command script proper, for these tests, not `make' conditionals.
    12421357
    12431358Rule Definition
     
    12551370
    12561371
     1372File: make.info,  Node: Secondary Expansion,  Prev: Reading Makefiles,  Up: Makefiles
     1373
     13743.10 Secondary Expansion
     1375========================
     1376
     1377In the previous section we learned that GNU `make' works in two
     1378distinct phases: a read-in phase and a target-update phase (*note How
     1379`make' Reads a Makefile: Reading Makefiles.).  GNU make also has the
     1380ability to enable a _second expansion_ of the prerequisites (only) for
     1381some or all targets defined in the makefile.  In order for this second
     1382expansion to occur, the special target `.SECONDEXPANSION' must be
     1383defined before the first prerequisite list that makes use of this
     1384feature.
     1385
     1386   If that special target is defined then in between the two phases
     1387mentioned above, right at the end of the read-in phase, all the
     1388prerequisites of the targets defined after the special target are
     1389expanded a _second time_.  In most circumstances this secondary
     1390expansion will have no effect, since all variable and function
     1391references will have been expanded during the initial parsing of the
     1392makefiles.  In order to take advantage of the secondary expansion phase
     1393of the parser, then, it's necessary to _escape_ the variable or
     1394function reference in the makefile.  In this case the first expansion
     1395merely un-escapes the reference but doesn't expand it, and expansion is
     1396left to the secondary expansion phase.  For example, consider this
     1397makefile:
     1398
     1399     .SECONDEXPANSION:
     1400     ONEVAR = onefile
     1401     TWOVAR = twofile
     1402     myfile: $(ONEVAR) $$(TWOVAR)
     1403
     1404   After the first expansion phase the prerequisites list of the
     1405`myfile' target will be `onefile' and `$(TWOVAR)'; the first
     1406(unescaped) variable reference to ONEVAR is expanded, while the second
     1407(escaped) variable reference is simply unescaped, without being
     1408recognized as a variable reference.  Now during the secondary expansion
     1409the first word is expanded again but since it contains no variable or
     1410function references it remains the static value `onefile', while the
     1411second word is now a normal reference to the variable TWOVAR, which is
     1412expanded to the value `twofile'.  The final result is that there are
     1413two prerequisites, `onefile' and `twofile'.
     1414
     1415   Obviously, this is not a very interesting case since the same result
     1416could more easily have been achieved simply by having both variables
     1417appear, unescaped, in the prerequisites list.  One difference becomes
     1418apparent if the variables are reset; consider this example:
     1419
     1420     .SECONDEXPANSION:
     1421     AVAR = top
     1422     onefile: $(AVAR)
     1423     twofile: $$(AVAR)
     1424     AVAR = bottom
     1425
     1426   Here the prerequisite of `onefile' will be expanded immediately, and
     1427resolve to the value `top', while the prerequisite of `twofile' will
     1428not be full expanded until the secondary expansion and yield a value of
     1429`bottom'.
     1430
     1431   This is marginally more exciting, but the true power of this feature
     1432only becomes apparent when you discover that secondary expansions
     1433always take place within the scope of the automatic variables for that
     1434target.  This means that you can use variables such as `$@', `$*', etc.
     1435during the second expansion and they will have their expected values,
     1436just as in the command script.  All you have to do is defer the
     1437expansion by escaping the `$'.  Also, secondary expansion occurs for
     1438both explicit and implicit (pattern) rules.  Knowing this, the possible
     1439uses for this feature increase dramatically.  For example:
     1440
     1441     .SECONDEXPANSION:
     1442     main_OBJS := main.o try.o test.o
     1443     lib_OBJS := lib.o api.o
     1444
     1445     main lib: $$($$@_OBJS)
     1446
     1447   Here, after the initial expansion the prerequisites of both the
     1448`main' and `lib' targets will be `$($@_OBJS)'.  During the secondary
     1449expansion, the `$@' variable is set to the name of the target and so
     1450the expansion for the `main' target will yield `$(main_OBJS)', or
     1451`main.o try.o test.o', while the secondary expansion for the `lib'
     1452target will yield `$(lib_OBJS)', or `lib.o api.o'.
     1453
     1454   You can also mix functions here, as long as they are properly
     1455escaped:
     1456
     1457     main_SRCS := main.c try.c test.c
     1458     lib_SRCS := lib.c api.c
     1459
     1460     .SECONDEXPANSION:
     1461     main lib: $$(patsubst %.c,%.o,$$($$@_SRCS))
     1462
     1463   This version allows users to specify source files rather than object
     1464files, but gives the same resulting prerequisites list as the previous
     1465example.
     1466
     1467   Evaluation of automatic variables during the secondary expansion
     1468phase, especially of the target name variable `$$@', behaves similarly
     1469to evaluation within command scripts.  However, there are some subtle
     1470differences and "corner cases" which come into play for the different
     1471types of rule definitions that `make' understands.  The subtleties of
     1472using the different automatic variables are described below.
     1473
     1474Secondary Expansion of Explicit Rules
     1475-------------------------------------
     1476
     1477During the secondary expansion of explicit rules, `$$@' and `$$%'
     1478evaluate, respectively, to the file name of the target and, when the
     1479target is an archive member, the target member name.  The `$$<'
     1480variable evaluates to the first prerequisite in the first rule for this
     1481target.  `$$^' and `$$+' evaluate to the list of all prerequisites of
     1482rules _that have already appeared_ for the same target (`$$+' with
     1483repetitions and `$$^' without).  The following example will help
     1484illustrate these behaviors:
     1485
     1486     .SECONDEXPANSION:
     1487
     1488     foo: foo.1 bar.1 $$< $$^ $$+    # line #1
     1489
     1490     foo: foo.2 bar.2 $$< $$^ $$+    # line #2
     1491
     1492     foo: foo.3 bar.3 $$< $$^ $$+    # line #3
     1493
     1494   In the first prerequisite list, all three variables (`$$<', `$$^',
     1495and `$$+') expand to the empty string.  In the second, they will have
     1496values `foo.1', `foo.1 bar.1', and `foo.1 bar.1' respectively.  In the
     1497third they will have values `foo.1', `foo.1 bar.1 foo.2 bar.2', and
     1498`foo.1 bar.1 foo.2 bar.2' respectively.
     1499
     1500   Rules undergo secondary expansion in makefile order, except that the
     1501rule with the command script is always evaluated last.
     1502
     1503   The variables `$$?' and `$$*' are not available and expand to the
     1504empty string.
     1505
     1506Secondary Expansion of Static Pattern Rules
     1507-------------------------------------------
     1508
     1509Rules for secondary expansion of static pattern rules are identical to
     1510those for explicit rules, above, with one exception: for static pattern
     1511rules the `$$*' variable is set to the pattern stem.  As with explicit
     1512rules, `$$?' is not available and expands to the empty string.
     1513
     1514Secondary Expansion of Implicit Rules
     1515-------------------------------------
     1516
     1517As `make' searches for an implicit rule, it substitutes the stem and
     1518then performs secondary expansion for every rule with a matching target
     1519pattern.  The value of the automatic variables is derived in the same
     1520fashion as for static pattern rules.  As an example:
     1521
     1522     .SECONDEXPANSION:
     1523
     1524     foo: bar
     1525
     1526     foo foz: fo%: bo%
     1527
     1528     %oo: $$< $$^ $$+ $$*
     1529
     1530   When the implicit rule is tried for target `foo', `$$<' expands to
     1531`bar', `$$^' expands to `bar boo', `$$+' also expands to `bar boo', and
     1532`$$*' expands to `f'.
     1533
     1534   Note that the directory prefix (D), as described in *Note Implicit
     1535Rule Search Algorithm: Implicit Rule Search, is appended (after
     1536expansion) to all the patterns in the prerequisites list.  As an
     1537example:
     1538
     1539     .SECONDEXPANSION:
     1540
     1541     /tmp/foo.o:
     1542
     1543     %.o: $$(addsuffix /%.c,foo bar) foo.h
     1544
     1545   The prerequisite list after the secondary expansion and directory
     1546prefix reconstruction will be `/tmp/foo/foo.c /tmp/var/bar/foo.c
     1547foo.h'.  If you are not interested in this reconstruction, you can use
     1548`$$*' instead of `%' in the prerequisites list.
     1549
     1550
    12571551File: make.info,  Node: Rules,  Next: Commands,  Prev: Makefiles,  Up: Top
    12581552
    1259 Writing Rules
    1260 *************
     15534 Writing Rules
     1554***************
    12611555
    12621556A "rule" appears in the makefile and says when and how to remake
     
    12891583* Phony Targets::               Using a target that is not a real file's name.
    12901584* Force Targets::               You can use a target without commands
    1291                                   or prerequisites to mark other
    1292                                   targets as phony.
     1585                                  or prerequisites to mark other targets
     1586                                  as phony.
    12931587* Empty Targets::               When only the date matters and the
    12941588                                  files are empty.
     
    13071601File: make.info,  Node: Rule Example,  Next: Rule Syntax,  Prev: Rules,  Up: Rules
    13081602
    1309 Rule Example
    1310 ============
     16034.1 Rule Example
     1604================
    13111605
    13121606Here is an example of a rule:
     
    13331627File: make.info,  Node: Rule Syntax,  Next: Prerequisite Types,  Prev: Rule Example,  Up: Rules
    13341628
    1335 Rule Syntax
    1336 ===========
     16294.2 Rule Syntax
     1630===============
    13371631
    13381632In general, a rule looks like this:
     
    13591653appear on the line after the prerequisites, with a tab character, or may
    13601654appear on the same line, with a semicolon.  Either way, the effect is
    1361 the same.  *Note Writing the Commands in Rules: Commands.
    1362 
    1363    Because dollar signs are used to start variable references, if you
    1364 really want a dollar sign in a rule you must write two of them, `$$'
    1365 (*note How to Use Variables: Using Variables.).  You may split a long
    1366 line by inserting a backslash followed by a newline, but this is not
    1367 required, as `make' places no limit on the length of a line in a
    1368 makefile.
     1655the same.  There are other differences in the syntax of command lines.
     1656*Note Writing the Commands in Rules: Commands.
     1657
     1658   Because dollar signs are used to start `make' variable references,
     1659if you really want a dollar sign in a target or prerequisite you must
     1660write two of them, `$$' (*note How to Use Variables: Using Variables.).
     1661If you have enabled secondary expansion (*note Secondary Expansion::)
     1662and you want a literal dollar sign in the prerequisites lise, you must
     1663actually write _four_ dollar signs (`$$$$').
     1664
     1665   You may split a long line by inserting a backslash followed by a
     1666newline, but this is not required, as `make' places no limit on the
     1667length of a line in a makefile.
    13691668
    13701669   A rule tells `make' two things: when the targets are out of date,
     
    13881687File: make.info,  Node: Prerequisite Types,  Next: Wildcards,  Prev: Rule Syntax,  Up: Rules
    13891688
    1390 Types of Prerequisites
    1391 ======================
     16894.3 Types of Prerequisites
     1690==========================
    13921691
    13931692There are actually two different types of prerequisites understood by
     
    14241723File: make.info,  Node: Wildcards,  Next: Directory Search,  Prev: Prerequisite Types,  Up: Rules
    14251724
    1426 Using Wildcard Characters in File Names
    1427 =======================================
     17254.4 Using Wildcard Characters in File Names
     1726===========================================
    14281727
    14291728A single file name can specify many files using "wildcard characters".
     
    14411740simulated by setting the environment variable HOME.
    14421741
    1443    Wildcard expansion happens automatically in targets, in
    1444 prerequisites, and in commands (where the shell does the expansion).
    1445 In other contexts, wildcard expansion happens only if you request it
    1446 explicitly with the `wildcard' function.
     1742   Wildcard expansion is performed by `make' automatically in targets
     1743and in prerequisites.  In commands the shell is responsible for
     1744wildcard expansion.  In other contexts, wildcard expansion happens only
     1745if you request it explicitly with the `wildcard' function.
    14471746
    14481747   The special significance of a wildcard character can be turned off by
     
    14601759File: make.info,  Node: Wildcard Examples,  Next: Wildcard Pitfall,  Prev: Wildcards,  Up: Wildcards
    14611760
    1462 Wildcard Examples
    1463 -----------------
     17614.4.1 Wildcard Examples
     1762-----------------------
    14641763
    14651764Wildcards can be used in the commands of a rule, where they are expanded
     
    15001799File: make.info,  Node: Wildcard Pitfall,  Next: Wildcard Function,  Prev: Wildcard Examples,  Up: Wildcards
    15011800
    1502 Pitfalls of Using Wildcards
    1503 ---------------------------
     18014.4.2 Pitfalls of Using Wildcards
     1802---------------------------------
    15041803
    15051804Now here is an example of a naive way of using wildcard expansion, that
     
    15091808
    15101809     objects = *.o
    1511      
     1810
    15121811     foo : $(objects)
    15131812             cc -o foo $(CFLAGS) $(objects)
     
    15431842File: make.info,  Node: Wildcard Function,  Prev: Wildcard Pitfall,  Up: Wildcards
    15441843
    1545 The Function `wildcard'
    1546 -----------------------
     18444.4.3 The Function `wildcard'
     1845-----------------------------
    15471846
    15481847Wildcard expansion happens automatically in rules.  But wildcard
     
    15791878
    15801879     objects := $(patsubst %.c,%.o,$(wildcard *.c))
    1581      
     1880
    15821881     foo : $(objects)
    15831882             cc -o foo $(objects)
     
    15911890File: make.info,  Node: Directory Search,  Next: Phony Targets,  Prev: Wildcards,  Up: Rules
    15921891
    1593 Searching Directories for Prerequisites
    1594 =======================================
     18924.5 Searching Directories for Prerequisites
     1893===========================================
    15951894
    15961895For large systems, it is often desirable to put sources in a separate
     
    16151914File: make.info,  Node: General Search,  Next: Selective Search,  Prev: Directory Search,  Up: Directory Search
    16161915
    1617 `VPATH': Search Path for All Prerequisites
    1618 ------------------------------------------
     19164.5.1 `VPATH': Search Path for All Prerequisites
     1917------------------------------------------------
    16191918
    16201919The value of the `make' variable `VPATH' specifies a list of
     
    16591958File: make.info,  Node: Selective Search,  Next: Search Algorithm,  Prev: General Search,  Up: Directory Search
    16601959
    1661 The `vpath' Directive
    1662 ---------------------
     19604.5.2 The `vpath' Directive
     1961---------------------------
    16631962
    16641963Similar to the `VPATH' variable, but more selective, is the `vpath'
     
    17382037File: make.info,  Node: Search Algorithm,  Next: Commands/Search,  Prev: Selective Search,  Up: Directory Search
    17392038
    1740 How Directory Searches are Performed
    1741 ------------------------------------
     20394.5.3 How Directory Searches are Performed
     2040------------------------------------------
    17422041
    17432042When a prerequisite is found through directory search, regardless of
     
    17962095File: make.info,  Node: Commands/Search,  Next: Implicit/Search,  Prev: Search Algorithm,  Up: Directory Search
    17972096
    1798 Writing Shell Commands with Directory Search
    1799 --------------------------------------------
     20974.5.4 Writing Shell Commands with Directory Search
     2098--------------------------------------------------
    18002099
    18012100When a prerequisite is found in another directory through directory
     
    18172116compilation by implicit rules; we use it here for consistency so it will
    18182117affect all C compilations uniformly; *note Variables Used by Implicit
    1819 Rules: Implicit Variables..)
     2118Rules: Implicit Variables.)
    18202119
    18212120   Often the prerequisites include header files as well, which you do
     
    18302129File: make.info,  Node: Implicit/Search,  Next: Libraries/Search,  Prev: Commands/Search,  Up: Directory Search
    18312130
    1832 Directory Search and Implicit Rules
    1833 -----------------------------------
     21314.5.5 Directory Search and Implicit Rules
     2132-----------------------------------------
    18342133
    18352134The search through the directories specified in `VPATH' or with `vpath'
     
    18512150File: make.info,  Node: Libraries/Search,  Prev: Implicit/Search,  Up: Directory Search
    18522151
    1853 Directory Search for Link Libraries
    1854 -----------------------------------
     21524.5.6 Directory Search for Link Libraries
     2153-----------------------------------------
    18552154
    18562155Directory search applies in a special way to libraries used with the
     
    18902189word in the list will be used.
    18912190
    1892    The default value for `.LIBPATTERNS' is "`lib%.so lib%.a'", which
     2191   The default value for `.LIBPATTERNS' is `lib%.so lib%.a', which
    18932192provides the default behavior described above.
    18942193
     
    18992198File: make.info,  Node: Phony Targets,  Next: Force Targets,  Prev: Directory Search,  Up: Rules
    19002199
    1901 Phony Targets
    1902 =============
     22004.6 Phony Targets
     2201=================
    19032202
    19042203A phony target is one that is not really the name of a file.  It is
     
    19162215Because the `rm' command does not create a file named `clean', probably
    19172216no such file will ever exist.  Therefore, the `rm' command will be
    1918 executed every time you say `make clean'.
     2217executed every time you say `make clean'. 
    19192218
    19202219   The phony target will cease to work if anything ever does create a
     
    19462245   Another example of the usefulness of phony targets is in conjunction
    19472246with recursive invocations of `make' (for more information, see *Note
    1948 Recursive Use of `make': Recursion).  In this case the makefile will
     2247Recursive Use of `make': Recursion.).  In this case the makefile will
    19492248often contain a variable which lists a number of subdirectories to be
    19502249built.  One way to handle this is with one rule whose command is a
     
    19522251
    19532252     SUBDIRS = foo bar baz
    1954      
     2253
    19552254     subdirs:
    19562255             for dir in $(SUBDIRS); do \
     
    19642263it will do so even if `make' is invoked with the `-k' option, which is
    19652264unfortunate.  Second, and perhaps more importantly, you cannot take
    1966 advantage of the parallel build capabilities of make using this method,
    1967 since there is only one rule.
     2265advantage of `make''s ability to build targets in parallel (*note
     2266Parallel Execution: Parallel.), since there is only one rule.
    19682267
    19692268   By declaring the subdirectories as phony targets (you must do this as
     
    19722271
    19732272     SUBDIRS = foo bar baz
    1974      
     2273
    19752274     .PHONY: subdirs $(SUBDIRS)
    1976      
     2275
    19772276     subdirs: $(SUBDIRS)
    1978      
     2277
    19792278     $(SUBDIRS):
    19802279             $(MAKE) -C $@
    1981      
     2280
    19822281     foo: baz
    19832282
     
    20032302     all : prog1 prog2 prog3
    20042303     .PHONY : all
    2005      
     2304
    20062305     prog1 : prog1.o utils.o
    20072306             cc -o prog1 prog1.o utils.o
    2008      
     2307
    20092308     prog2 : prog2.o
    20102309             cc -o prog2 prog2.o
    2011      
     2310
    20122311     prog3 : prog3.o sort.o utils.o
    20132312             cc -o prog3 prog3.o sort.o utils.o
    20142313
    20152314Now you can say just `make' to remake all three programs, or specify as
    2016 arguments the ones to remake (as in `make prog1 prog3').
     2315arguments the ones to remake (as in `make prog1 prog3').  Phoniness is
     2316not inherited: the prerequisites of a phony target are not themselves
     2317phony, unless explicitly declared to be so.
    20172318
    20182319   When one phony target is a prerequisite of another, it serves as a
     
    20212322
    20222323     .PHONY: cleanall cleanobj cleandiff
    2023      
     2324
    20242325     cleanall : cleanobj cleandiff
    20252326             rm program
    2026      
     2327
    20272328     cleanobj :
    20282329             rm *.o
    2029      
     2330
    20302331     cleandiff :
    20312332             rm *.diff
     
    20342335File: make.info,  Node: Force Targets,  Next: Empty Targets,  Prev: Phony Targets,  Up: Rules
    20352336
    2036 Rules without Commands or Prerequisites
    2037 =======================================
     23374.7 Rules without Commands or Prerequisites
     2338===========================================
    20382339
    20392340If a rule has no prerequisites or commands, and the target of the rule
     
    20632364File: make.info,  Node: Empty Targets,  Next: Special Targets,  Prev: Force Targets,  Up: Rules
    20642365
    2065 Empty Target Files to Record Events
    2066 ===================================
     23664.8 Empty Target Files to Record Events
     2367=======================================
    20672368
    20682369The "empty target" is a variant of the phony target; it is used to hold
     
    20852386             lpr -p $?
    20862387             touch print
    2087 
     2388   
    20882389With this rule, `make print' will execute the `lpr' command if either
    20892390source file has changed since the last `make print'.  The automatic
     
    20942395File: make.info,  Node: Special Targets,  Next: Multiple Targets,  Prev: Empty Targets,  Up: Rules
    20952396
    2096 Special Built-in Target Names
    2097 =============================
     23974.9 Special Built-in Target Names
     2398=================================
    20982399
    20992400Certain names have special meanings if they appear as targets.
     
    21482449     intermediate).
    21492450
     2451`.SECONDEXPANSION'
     2452     If `.SECONDEXPANSION' is mentioned as a target anywhere in the
     2453     makefile, then all prerequisite lists defined _after_ it appears
     2454     will be expanded a second time after all makefiles have been read
     2455     in.  *Note Secondary Expansion: Secondary Expansion.
     2456
     2457     The prerequisites of the special target `.SUFFIXES' are the list
     2458     of suffixes to be used in checking for suffix rules.  *Note
     2459     Old-Fashioned Suffix Rules: Suffix Rules.
     2460
    21502461`.DELETE_ON_ERROR'
    21512462     If `.DELETE_ON_ERROR' is mentioned as a target anywhere in the
     
    22342545File: make.info,  Node: Multiple Targets,  Next: Multiple Rules,  Prev: Special Targets,  Up: Rules
    22352546
    2236 Multiple Targets in a Rule
    2237 ==========================
     25474.10 Multiple Targets in a Rule
     2548===============================
    22382549
    22392550A rule with multiple targets is equivalent to writing many rules, each
     
    22592570          bigoutput littleoutput : text.g
    22602571                  generate text.g -$(subst output,,$@) > $@
    2261 
     2572     
    22622573     is equivalent to
    22632574
     
    22812592File: make.info,  Node: Multiple Rules,  Next: Static Pattern,  Prev: Multiple Targets,  Up: Rules
    22822593
    2283 Multiple Rules for One Target
    2284 =============================
     25944.11 Multiple Rules for One Target
     2595==================================
    22852596
    22862597One file can be the target of several rules.  All the prerequisites
     
    23322643File: make.info,  Node: Static Pattern,  Next: Double-Colon,  Prev: Multiple Rules,  Up: Rules
    23332644
    2334 Static Pattern Rules
    2335 ====================
     26454.12 Static Pattern Rules
     2646=========================
    23362647
    23372648"Static pattern rules" are rules which specify multiple targets and
     
    23492660File: make.info,  Node: Static Usage,  Next: Static versus Implicit,  Prev: Static Pattern,  Up: Static Pattern
    23502661
    2351 Syntax of Static Pattern Rules
    2352 ------------------------------
     26624.12.1 Syntax of Static Pattern Rules
     2663-------------------------------------
    23532664
    23542665Here is the syntax of a static pattern rule:
     
    23982709
    23992710     objects = foo.o bar.o
    2400      
     2711
    24012712     all: $(objects)
    2402      
     2713
    24032714     $(objects): %.o: %.c
    24042715             $(CC) -c $(CFLAGS) $< -o $@
     
    24152726
    24162727     files = foo.elc bar.o lose.o
    2417      
     2728
    24182729     $(filter %.o,$(files)): %.o: %.c
    24192730             $(CC) -c $(CFLAGS) $< -o $@
     
    24272738from `foo.el'.
    24282739
    2429    Another example shows how to use `$*' in static pattern rules:
     2740   Another example shows how to use `$*' in static pattern rules: 
    24302741
    24312742     bigoutput littleoutput : %output : text.g
     
    24382749File: make.info,  Node: Static versus Implicit,  Prev: Static Usage,  Up: Static Pattern
    24392750
    2440 Static Pattern Rules versus Implicit Rules
    2441 ------------------------------------------
     27514.12.2 Static Pattern Rules versus Implicit Rules
     2752-------------------------------------------------
    24422753
    24432754A static pattern rule has much in common with an implicit rule defined
     
    24752786File: make.info,  Node: Double-Colon,  Next: Automatic Prerequisites,  Prev: Static Pattern,  Up: Rules
    24762787
    2477 Double-Colon Rules
    2478 ==================
     27884.13 Double-Colon Rules
     2789=======================
    24792790
    24802791"Double-colon" rules are rules written with `::' instead of `:' after
     
    25122823File: make.info,  Node: Automatic Prerequisites,  Prev: Double-Colon,  Up: Rules
    25132824
    2514 Generating Prerequisites Automatically
    2515 ======================================
     28254.14 Generating Prerequisites Automatically
     2826===========================================
    25162827
    25172828In the makefile for a program, many of the rules you need to write often
     
    25252836would have to write dozens of such rules in your makefile.  And, you
    25262837must always be very careful to update the makefile every time you add
    2527 or remove an `#include'.
     2838or remove an `#include'. 
    25282839
    25292840   To avoid this hassle, most modern C compilers can write these rules
     
    25442855makefile, so it can never be considered an intermediate file by implicit
    25452856rule search.  This means that `make' won't ever remove the file after
    2546 using it; *note Chains of Implicit Rules: Chained Rules..
     2857using it; *note Chains of Implicit Rules: Chained Rules.
    25472858
    25482859   With old `make' programs, it was traditional practice to use this
     
    25682879
    25692880     %.d: %.c
    2570              
     2881             @set -e; rm -f $@; \
    25712882              $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
    25722883              sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
     
    25752886*Note Pattern Rules::, for information on defining pattern rules.  The
    25762887`-e' flag to the shell causes it to exit immediately if the `$(CC)'
    2577 command (or any other command) fails (exits with a nonzero status).
     2888command (or any other command) fails (exits with a nonzero status). 
    25782889
    25792890   With the GNU C compiler, you may wish to use the `-MM' flag instead
     
    26002911
    26012912     sources = foo.c bar.c
    2602      
     2913
    26032914     include $(sources:.c=.d)
    26042915
     
    26112922
    26122923   Note that the `.d' files contain target definitions; you should be
    2613 sure to place the `include' directive _after_ the first, default target
     2924sure to place the `include' directive _after_ the first, default goal
    26142925in your makefiles or run the risk of having a random object file become
    2615 the default target.  *Note How Make Works::.
     2926the default goal.  *Note How Make Works::.
    26162927
    26172928
    26182929File: make.info,  Node: Commands,  Next: Using Variables,  Prev: Rules,  Up: Top
    26192930
    2620 Writing the Commands in Rules
    2621 *****************************
    2622 
    2623 The commands of a rule consist of shell command lines to be executed one
    2624 by one.  Each command line must start with a tab, except that the first
    2625 command line may be attached to the target-and-prerequisites line with a
    2626 semicolon in between.  Blank lines and lines of just comments may appear
    2627 among the command lines; they are ignored.  (But beware, an apparently
    2628 "blank" line that begins with a tab is _not_ blank!  It is an empty
    2629 command; *note Empty Commands::.)
     29315 Writing the Commands in Rules
     2932*******************************
     2933
     2934The commands of a rule consist of one or more shell command lines to be
     2935executed, one at a time, in the order they appear.  Typically, the
     2936result of executing these commands is that the target of the rule is
     2937brought up to date.
    26302938
    26312939   Users use many different shell programs, but commands in makefiles
     
    26332941otherwise.  *Note Command Execution: Execution.
    26342942
    2635    The shell that is in use determines whether comments can be written
    2636 on command lines, and what syntax they use.  When the shell is
    2637 `/bin/sh', a `#' starts a comment that extends to the end of the line.
    2638 The `#' does not have to be at the beginning of a line.  Text on a line
    2639 before a `#' is not part of the comment.
    2640 
    26412943* Menu:
    26422944
     2945* Command Syntax::              Command syntax features and pitfalls.
    26432946* Echoing::                     How to control when commands are echoed.
    26442947* Execution::                   How commands are executed.
     
    26512954
    26522955
    2653 File: make.info,  Node: Echoing,  Next: Execution,  Prev: Commands,  Up: Commands
    2654 
    2655 Command Echoing
    2656 ===============
     2956File: make.info,  Node: Command Syntax,  Next: Echoing,  Prev: Commands,  Up: Commands
     2957
     29585.1 Command Syntax
     2959==================
     2960
     2961Makefiles have the unusual property that there are really two distinct
     2962syntaxes in one file.  Most of the makefile uses `make' syntax (*note
     2963Writing Makefiles: Makefiles.).  However, commands are meant to be
     2964interpreted by the shell and so they are written using shell syntax.
     2965The `make' program does not try to understand shell syntax: it performs
     2966only a very few specific translations on the content of the command
     2967before handing it to the shell.
     2968
     2969   Each command line must start with a tab, except that the first
     2970command line may be attached to the target-and-prerequisites line with a
     2971semicolon in between.  _Any_ line in the makefile that begins with a
     2972tab and appears in a "rule context" (that is, after a rule has been
     2973started until another rule or variable definition) will be considered a
     2974command line for that rule.  Blank lines and lines of just comments may
     2975appear among the command lines; they are ignored.
     2976
     2977   Some consequences of these rules include:
     2978
     2979   * A blank line that begins with a tab is not blank: it's an empty
     2980     command (*note Empty Commands::).
     2981
     2982   * A comment in a command line is not a `make' comment; it will be
     2983     passed to the shell as-is.  Whether the shell treats it as a
     2984     comment or not depends on your shell.
     2985
     2986   * A variable definition in a "rule context" which is indented by a
     2987     tab as the first character on the line, will be considered a
     2988     command line, not a `make' variable definition, and passed to the
     2989     shell.
     2990
     2991   * A conditional expression (`ifdef', `ifeq', etc. *note Syntax of
     2992     Conditionals: Conditional Syntax.) in a "rule context" which is
     2993     indented by a tab as the first character on the line, will be
     2994     considered a command line and be passed to the shell.
     2995
     2996
     2997* Menu:
     2998
     2999* Splitting Lines::             Breaking long command lines for readability.
     3000* Variables in Commands::       Using `make' variables in commands.
     3001
     3002
     3003File: make.info,  Node: Splitting Lines,  Next: Variables in Commands,  Prev: Command Syntax,  Up: Command Syntax
     3004
     30055.1.1 Splitting Command Lines
     3006-----------------------------
     3007
     3008One of the few ways in which `make' does interpret command lines is
     3009checking for a backslash just before the newline.  As in normal
     3010makefile syntax, a single command can be split into multiple lines in
     3011the makefile by placing a backslash before each newline.  A sequence of
     3012lines like this is considered a single command, and one instance of the
     3013shell will be invoked to run it.
     3014
     3015   However, in contrast to how they are treated in other places in a
     3016makefile, backslash-newline pairs are _not_ removed from the command.
     3017Both the backslash and the newline characters are preserved and passed
     3018to the shell.  How the backslash-newline is interpreted depends on your
     3019shell.  If the first character of the next line after the
     3020backslash-newline is a tab, then that tab (and only that tab) is
     3021removed.  Whitespace is never added to the command.
     3022
     3023   For example, this makefile:
     3024
     3025     all :
     3026             @echo no\
     3027     space
     3028             @echo no\
     3029             space
     3030             @echo one \
     3031             space
     3032             @echo one\
     3033              space
     3034
     3035consists of four separate shell commands where the output is:
     3036
     3037     nospace
     3038     nospace
     3039     one space
     3040     one space
     3041
     3042   As a more complex example, this makefile:
     3043
     3044     all : ; @echo 'hello \
     3045             world' ; echo "hello \
     3046         world"
     3047
     3048will run one shell with a command script of:
     3049
     3050     echo 'hello \
     3051     world' ; echo "hello \
     3052         world"
     3053
     3054which, according to shell quoting rules, will yield the following
     3055output:
     3056
     3057     hello \
     3058     world
     3059     hello     world
     3060
     3061Notice how the backslash/newline pair was removed inside the string
     3062quoted with double quotes (`"..."'), but not from the string quoted
     3063with single quotes (`'...'').  This is the way the default shell
     3064(`/bin/sh') handles backslash/newline pairs.  If you specify a
     3065different shell in your makefiles it may treat them differently.
     3066
     3067   Sometimes you want to split a long line inside of single quotes, but
     3068you don't want the backslash-newline to appear in the quoted content.
     3069This is often the case when passing scripts to languages such as Perl,
     3070where extraneous backslashes inside the script can change its meaning
     3071or even be a syntax error.  One simple way of handling this is to place
     3072the quoted string, or even the entire command, into a `make' variable
     3073then use the variable in the command.  In this situation the newline
     3074quoting rules for makefiles will be used, and the backslash-newline
     3075will be removed.  If we rewrite our example above using this method:
     3076
     3077     HELLO = 'hello \
     3078     world'
     3079
     3080     all : ; @echo $(HELLO)
     3081
     3082we will get output like this:
     3083
     3084     hello world
     3085
     3086   If you like, you can also use target-specific variables (*note
     3087Target-specific Variable Values: Target-specific.) to obtain a tighter
     3088correspondence between the variable and the command that uses it.
     3089
     3090
     3091File: make.info,  Node: Variables in Commands,  Prev: Splitting Lines,  Up: Command Syntax
     3092
     30935.1.2 Using Variables in Commands
     3094---------------------------------
     3095
     3096The other way in which `make' processes commands is by expanding any
     3097variable references in them (*note Basics of Variable References:
     3098Reference.).  This occurs after make has finished reading all the
     3099makefiles and the target is determined to be out of date; so, the
     3100commands for targets which are not rebuilt are never expanded.
     3101
     3102   Variable and function references in commands have identical syntax
     3103and semantics to references elsewhere in the makefile.  They also have
     3104the same quoting rules: if you want a dollar sign to appear in your
     3105command, you must double it (`$$').  For shells like the default shell,
     3106that use dollar signs to introduce variables, it's important to keep
     3107clear in your mind whether the variable you want to reference is a
     3108`make' variable (use a single dollar sign) or a shell variable (use two
     3109dollar signs).  For example:
     3110
     3111     LIST = one two three
     3112     all:
     3113             for i in $(LIST); do \
     3114                 echo $$i; \
     3115             done
     3116
     3117results in the following command being passed to the shell:
     3118
     3119     for i in one two three; do \
     3120         echo $i; \
     3121     done
     3122
     3123which generates the expected result:
     3124
     3125     one
     3126     two
     3127     three
     3128
     3129
     3130File: make.info,  Node: Echoing,  Next: Execution,  Prev: Command Syntax,  Up: Commands
     3131
     31325.2 Command Echoing
     3133===================
    26573134
    26583135Normally `make' prints each command line before it is executed.  We
     
    26833160File: make.info,  Node: Execution,  Next: Parallel,  Prev: Echoing,  Up: Commands
    26843161
    2685 Command Execution
    2686 =================
     31625.3 Command Execution
     3163=====================
    26873164
    26883165When it is time to execute commands to update a target, they are
    2689 executed by making a new subshell for each line.  (In practice, `make'
    2690 may take shortcuts that do not affect the results.)
    2691 
    2692    *Please note:* this implies that shell commands such as `cd' that
    2693 set variables local to each process will not affect the following
    2694 command lines. (1)  If you want to use `cd' to affect the next command,
    2695 put the two on a single line with a semicolon between them.  Then
    2696 `make' will consider them a single command and pass them, together, to
    2697 a shell which will execute them in sequence.  For example:
     3166executed by invoking a new subshell for each command line.  (In
     3167practice, `make' may take shortcuts that do not affect the results.)
     3168
     3169   *Please note:* this implies that setting shell variables and
     3170invoking shell commands such as `cd' that set a context local to each
     3171process will not affect the following command lines.(1)  If you want to
     3172use `cd' to affect the next statement, put both statements in a single
     3173command line.  Then `make' will invoke one shell to run the entire
     3174line, and the shell will execute the statements in sequence.  For
     3175example:
    26983176
    26993177     foo : bar/lose
    2700              cd bar; gobble lose > ../foo
    2701 
    2702    If you would like to split a single shell command into multiple
    2703 lines of text, you must use a backslash at the end of all but the last
    2704 subline.  Such a sequence of lines is combined into a single line, by
    2705 deleting the backslash-newline sequences, before passing it to the
    2706 shell.  Thus, the following is equivalent to the preceding example:
    2707 
    2708      foo : bar/lose
    2709              cd bar;  \
    2710              gobble lose > ../foo
    2711 
    2712    The program used as the shell is taken from the variable `SHELL'.
    2713 By default, the program `/bin/sh' is used.
     3178             cd $(@D) && gobble $(@F) > ../$@
     3179
     3180Here we use the shell AND operator (`&&') so that if the `cd' command
     3181fails, the script will fail without trying to invoke the `gobble'
     3182command in the wrong directory, which could cause problems (in this
     3183case it would certainly cause `../foo' to be truncated, at least).
     3184
     3185* Menu:
     3186
     3187* Choosing the Shell::          How `make' chooses the shell used
     3188                                  to run commands.
     3189
     3190   ---------- Footnotes ----------
     3191
     3192   (1) On MS-DOS, the value of current working directory is *global*, so
     3193changing it _will_ affect the following command lines on those systems.
     3194
     3195
     3196File: make.info,  Node: Choosing the Shell,  Prev: Execution,  Up: Execution
     3197
     31985.3.1 Choosing the Shell
     3199------------------------
     3200
     3201The program used as the shell is taken from the variable `SHELL'.  If
     3202this variable is not set in your makefile, the program `/bin/sh' is
     3203used as the shell.
     3204
     3205   Unlike most variables, the variable `SHELL' is never set from the
     3206environment.  This is because the `SHELL' environment variable is used
     3207to specify your personal choice of shell program for interactive use.
     3208It would be very bad for personal choices like this to affect the
     3209functioning of makefiles.  *Note Variables from the Environment:
     3210Environment.
     3211
     3212   Furthermore, when you do set `SHELL' in your makefile that value is
     3213_not_ exported in the environment to commands that `make' invokes.
     3214Instead, the value inherited from the user's environment, if any, is
     3215exported.  You can override this behavior by explicitly exporting
     3216`SHELL' (*note Communicating Variables to a Sub-`make':
     3217Variables/Recursion.), forcing it to be passed in the environment to
     3218commands.
     3219
     3220   However, on MS-DOS and MS-Windows the value of `SHELL' in the
     3221environment *is* used, since on those systems most users do not set
     3222this variable, and therefore it is most likely set specifically to be
     3223used by `make'.  On MS-DOS, if the setting of `SHELL' is not suitable
     3224for `make', you can set the variable `MAKESHELL' to the shell that
     3225`make' should use; if set it will be used as the shell instead of the
     3226value of `SHELL'.
     3227
     3228Choosing a Shell in DOS and Windows
     3229...................................
     3230
     3231Choosing a shell in MS-DOS and MS-Windows is much more complex than on
     3232other systems.
    27143233
    27153234   On MS-DOS, if `SHELL' is not set, the value of the variable
     
    27573276
    27583277   The effect of the above DOS-specific processing is that a Makefile
    2759 that says `SHELL = /bin/sh' (as many Unix makefiles do), will work on
    2760 MS-DOS unaltered if you have e.g. `sh.exe' installed in some directory
    2761 along your `PATH'.
    2762 
    2763    Unlike most variables, the variable `SHELL' is never set from the
    2764 environment.  This is because the `SHELL' environment variable is used
    2765 to specify your personal choice of shell program for interactive use.
    2766 It would be very bad for personal choices like this to affect the
    2767 functioning of makefiles.  *Note Variables from the Environment:
    2768 Environment.  However, on MS-DOS and MS-Windows the value of `SHELL' in
    2769 the environment *is* used, since on those systems most users do not set
    2770 this variable, and therefore it is most likely set specifically to be
    2771 used by `make'.  On MS-DOS, if the setting of `SHELL' is not suitable
    2772 for `make', you can set the variable `MAKESHELL' to the shell that
    2773 `make' should use; this will override the value of `SHELL'.
    2774 
    2775    ---------- Footnotes ----------
    2776 
    2777    (1) On MS-DOS, the value of current working directory is *global*,
    2778 so changing it _will_ affect the following command lines on those
    2779 systems.
     3278that contains `SHELL = /bin/sh' (as many Unix makefiles do), will work
     3279on MS-DOS unaltered if you have e.g. `sh.exe' installed in some
     3280directory along your `PATH'.
    27803281
    27813282
    27823283File: make.info,  Node: Parallel,  Next: Errors,  Prev: Execution,  Up: Commands
    27833284
    2784 Parallel Execution
    2785 ==================
     32855.4 Parallel Execution
     3286======================
    27863287
    27873288GNU `make' knows how to execute several commands at once.  Normally,
     
    28093310streams of all but one running command.  This means that attempting to
    28103311read from standard input will usually be a fatal error (a `Broken pipe'
    2811 signal) for most child processes if there are several.
     3312signal) for most child processes if there are several. 
    28123313
    28133314   It is unpredictable which command will have a valid standard input
     
    28583359File: make.info,  Node: Errors,  Next: Interrupts,  Prev: Parallel,  Up: Commands
    28593360
    2860 Errors in Commands
    2861 ==================
     33615.5 Errors in Commands
     3362======================
    28623363
    28633364After each shell command returns, `make' looks at its exit status.  If
     
    29173418program as possible, perhaps to find several independent problems so
    29183419that you can correct them all before the next attempt to compile.  This
    2919 is why Emacs' `compile' command passes the `-k' flag by default.
     3420is why Emacs' `compile' command passes the `-k' flag by default. 
    29203421
    29213422   Usually when a command fails, if it has changed the target file at
     
    29343435File: make.info,  Node: Interrupts,  Next: Recursion,  Prev: Errors,  Up: Commands
    29353436
    2936 Interrupting or Killing `make'
    2937 ==============================
     34375.6 Interrupting or Killing `make'
     3438==================================
    29383439
    29393440If `make' gets a fatal signal while a command is executing, it may
     
    29653466File: make.info,  Node: Recursion,  Next: Sequences,  Prev: Interrupts,  Up: Commands
    29663467
    2967 Recursive Use of `make'
    2968 =======================
     34685.7 Recursive Use of `make'
     3469===========================
    29693470
    29703471Recursive use of `make' means using `make' as a command in a makefile.
     
    29823483     subsystem:
    29833484             $(MAKE) -C subdir
    2984 
     3485   
    29853486   You can write recursive `make' commands just by copying this example,
    29863487but there are many things to know about how they work and why, and about
     
    30123513File: make.info,  Node: MAKE Variable,  Next: Variables/Recursion,  Prev: Recursion,  Up: Recursion
    30133514
    3014 How the `MAKE' Variable Works
    3015 -----------------------------
     35155.7.1 How the `MAKE' Variable Works
     3516-----------------------------------
    30163517
    30173518Recursive `make' commands should always use the variable `MAKE', not
     
    30253526is `cd subdir && /bin/make'.  If you use a special version of `make' to
    30263527run the top-level makefile, the same special version will be executed
    3027 for recursive invocations.
     3528for recursive invocations. 
    30283529
    30293530   As a special feature, using the variable `MAKE' in the commands of a
     
    30433544file named `subsystem' and do nothing else.  What you really want it to
    30443545do is run `cd subdir && make -t'; but that would require executing the
    3045 command, and `-t' says not to execute commands.
     3546command, and `-t' says not to execute commands. 
    30463547
    30473548   The special feature makes this do what you want: whenever a command
     
    30573558File: make.info,  Node: Variables/Recursion,  Next: Options/Recursion,  Prev: MAKE Variable,  Up: Recursion
    30583559
    3059 Communicating Variables to a Sub-`make'
    3060 ---------------------------------------
     35605.7.2 Communicating Variables to a Sub-`make'
     3561---------------------------------------------
    30613562
    30623563Variable values of the top-level `make' can be passed to the sub-`make'
     
    30773578characters other than letters, numbers, and underscores.
    30783579
    3079    The special variables `SHELL' and `MAKEFLAGS' are always exported
    3080 (unless you unexport them).  `MAKEFILES' is exported if you set it to
    3081 anything.
     3580   The value of the `make' variable `SHELL' is not exported.  Instead,
     3581the value of the `SHELL' variable from the invoking environment is
     3582passed to the sub-`make'.  You can force `make' to export its value for
     3583`SHELL' by using the `export' directive, described below.  *Note
     3584Choosing the Shell::.
     3585
     3586   The special variable `MAKEFLAGS' is always exported (unless you
     3587unexport it).  `MAKEFILES' is exported if you set it to anything.
    30823588
    30833589   `make' automatically passes down variable values that were defined
     
    31543660`.EXPORT_ALL_VARIABLES' instead of using the `export' directive.  This
    31553661will be ignored by old `make's, while the `export' directive will cause
    3156 a syntax error.
     3662a syntax error. 
    31573663
    31583664   Likewise, you can use `unexport' by itself to tell `make' _not_ to
     
    31873693File: make.info,  Node: Options/Recursion,  Next: -w Option,  Prev: Variables/Recursion,  Up: Recursion
    31883694
    3189 Communicating Options to a Sub-`make'
    3190 -------------------------------------
     36955.7.3 Communicating Options to a Sub-`make'
     3696-------------------------------------------
    31913697
    31923698Flags such as `-s' and `-k' are passed automatically to the sub-`make'
     
    32923798File: make.info,  Node: -w Option,  Prev: Options/Recursion,  Up: Recursion
    32933799
    3294 The `--print-directory' Option
    3295 ------------------------------
     38005.7.4 The `--print-directory' Option
     3801------------------------------------
    32963802
    32973803If you use several levels of recursive `make' invocations, the `-w' or
     
    33183824File: make.info,  Node: Sequences,  Next: Empty Commands,  Prev: Recursion,  Up: Commands
    33193825
    3320 Defining Canned Command Sequences
    3321 =================================
     38265.8 Defining Canned Command Sequences
     3827=====================================
    33223828
    33233829When the same sequence of commands is useful in making various targets,
     
    33333839     mv y.tab.c $@
    33343840     endef
    3335 
     3841   
    33363842Here `run-yacc' is the name of the variable being defined; `endef'
    33373843marks the end of the definition; the lines in between are the commands.
     
    33933899File: make.info,  Node: Empty Commands,  Prev: Sequences,  Up: Commands
    33943900
    3395 Using Empty Commands
    3396 ====================
     39015.9 Using Empty Commands
     3902========================
    33973903
    33983904It is sometimes useful to define commands which do nothing.  This is
     
    34223928File: make.info,  Node: Using Variables,  Next: Conditionals,  Prev: Commands,  Up: Top
    34233929
    3424 How to Use Variables
    3425 ********************
     39306 How to Use Variables
     3931**********************
    34263932
    34273933A "variable" is a name defined in a makefile to represent a string of
     
    34293935explicit request into targets, prerequisites, commands, and other parts
    34303936of the makefile.  (In some other versions of `make', variables are
    3431 called "macros".)
     3937called "macros".) 
    34323938
    34333939   Variables and functions in all parts of a makefile are expanded when
     
    34843990File: make.info,  Node: Reference,  Next: Flavors,  Prev: Using Variables,  Up: Using Variables
    34853991
    3486 Basics of Variable References
    3487 =============================
     39926.1 Basics of Variable References
     3993=================================
    34883994
    34893995To substitute a variable's value, write a dollar sign followed by the
     
    35014007     program : $(objects)
    35024008             cc -o program $(objects)
    3503      
     4009
    35044010     $(objects) : defs.h
    35054011
     
    35244030File: make.info,  Node: Flavors,  Next: Advanced,  Prev: Reference,  Up: Using Variables
    35254031
    3526 The Two Flavors of Variables
    3527 ============================
     40326.2 The Two Flavors of Variables
     4033================================
    35284034
    35294035There are two ways that a variable in GNU `make' can have a value; we
     
    35454051     bar = $(ugh)
    35464052     ugh = Huh?
    3547      
     4053
    35484054     all:;echo $(foo)
    35494055
     
    35654071
    35664072because it will cause an infinite loop in the variable expansion.
    3567 (Actually `make' detects the infinite loop and reports an error.)
     4073(Actually `make' detects the infinite loop and reports an error.) 
    35684074
    35694075   Another disadvantage is that any functions (*note Functions for
     
    36064112
    36074113     ifeq (0,${MAKELEVEL})
    3608      cur-dir   := $(shell pwd)
    36094114     whoami    := $(shell whoami)
    36104115     host-type := $(shell arch)
     
    36164121
    36174122     ${subdirs}:
    3618            ${MAKE} cur-dir=${cur-dir}/$@ -C $@ all
     4123             ${MAKE} -C $@ all
    36194124
    36204125   Simply expanded variables generally make complicated makefile
     
    36704175File: make.info,  Node: Advanced,  Next: Values,  Prev: Flavors,  Up: Using Variables
    36714176
    3672 Advanced Features for Reference to Variables
    3673 ============================================
     41776.3 Advanced Features for Reference to Variables
     4178================================================
    36744179
    36754180This section describes some advanced features you can use to reference
     
    36854190File: make.info,  Node: Substitution Refs,  Next: Computed Names,  Prev: Advanced,  Up: Advanced
    36864191
    3687 Substitution References
    3688 -----------------------
     41926.3.1 Substitution References
     4193-----------------------------
    36894194
    36904195A "substitution reference" substitutes the value of a variable with
     
    37184223
    37194224For example:
    3720      
     4225
    37214226     foo := a.o b.o c.o
    37224227     bar := $(foo:%.o=%.c)
     
    37274232File: make.info,  Node: Computed Names,  Prev: Substitution Refs,  Up: Advanced
    37284233
    3729 Computed Variable Names
    3730 -----------------------
     42346.3.2 Computed Variable Names
     4235-----------------------------
    37314236
    37324237Computed variable names are a complicated concept needed only for
     
    37994304     a_dirs := dira dirb
    38004305     1_dirs := dir1 dir2
    3801      
     4306
    38024307     a_files := filea fileb
    38034308     1_files := file1 file2
    3804      
     4309
    38054310     ifeq "$(use_a)" "yes"
    38064311     a1 := a
     
    38084313     a1 := 1
    38094314     endif
    3810      
     4315
    38114316     ifeq "$(use_dirs)" "yes"
    38124317     df := dirs
     
    38144319     df := files
    38154320     endif
    3816      
     4321
    38174322     dirs := $($(a1)_$(df))
    38184323
     
    38244329     a_objects := a.o b.o c.o
    38254330     1_objects := 1.o 2.o 3.o
    3826      
     4331
    38274332     sources := $($(a1)_objects:.o=.c)
    38284333
     
    38404345     func := strip
    38414346     endif
    3842      
     4347
    38434348     bar := a d b g q c
    3844      
     4349
    38454350     foo := $($(func) $(bar))
    38464351
     
    38704375File: make.info,  Node: Values,  Next: Setting,  Prev: Advanced,  Up: Using Variables
    38714376
    3872 How Variables Get Their Values
    3873 ==============================
     43776.4 How Variables Get Their Values
     4378==================================
    38744379
    38754380Variables can get values in several different ways:
     
    38954400File: make.info,  Node: Setting,  Next: Appending,  Prev: Values,  Up: Using Variables
    38964401
    3897 Setting Variables
    3898 =================
     44026.5 Setting Variables
     4403=====================
    38994404
    39004405To set a variable from the makefile, write a line starting with the
     
    39484453File: make.info,  Node: Appending,  Next: Override Directive,  Prev: Setting,  Up: Using Variables
    39494454
    3950 Appending More Text to Variables
    3951 ================================
     44556.6 Appending More Text to Variables
     4456====================================
    39524457
    39534458Often it is useful to add more text to the value of a variable already
     
    39844489it a simply-expanded variable, `+=' adds to that simply-expanded
    39854490definition, and expands the new text before appending it to the old
    3986 value just as `:=' does (*note Setting Variables: Setting., for a full
    3987 explanation of `:=').  In fact,
     4491value just as `:=' does (see *Note Setting Variables: Setting, for a
     4492full explanation of `:=').  In fact,
    39884493
    39894494     variable := value
     
    39914496
    39924497is exactly equivalent to:
     4498
    39934499
    39944500     variable := value
     
    40234529The first line defines the `CFLAGS' variable with a reference to another
    40244530variable, `includes'.  (`CFLAGS' is used by the rules for C
    4025 compilation; *note Catalogue of Implicit Rules: Catalogue of Rules..)
     4531compilation; *note Catalogue of Implicit Rules: Catalogue of Rules.)
    40264532Using `=' for the definition makes `CFLAGS' a recursively-expanded
    40274533variable, meaning `$(includes) -O' is _not_ expanded when `make'
     
    40454551File: make.info,  Node: Override Directive,  Next: Defining,  Prev: Appending,  Up: Using Variables
    40464552
    4047 The `override' Directive
    4048 ========================
     45536.7 The `override' Directive
     4554============================
    40494555
    40504556If a variable has been set with a command argument (*note Overriding
     
    40894595File: make.info,  Node: Defining,  Next: Environment,  Prev: Override Directive,  Up: Using Variables
    40904596
    4091 Defining Variables Verbatim
    4092 ===========================
     45976.8 Defining Variables Verbatim
     4598===============================
    40934599
    40944600Another way to set the value of a variable is to use the `define'
     
    41484654File: make.info,  Node: Environment,  Next: Target-specific,  Prev: Defining,  Up: Using Variables
    41494655
    4150 Variables from the Environment
    4151 ==============================
     46566.9 Variables from the Environment
     4657==================================
    41524658
    41534659Variables in `make' can come from the environment in which `make' is
    41544660run.  Every environment variable that `make' sees when it starts up is
    4155 transformed into a `make' variable with the same name and value.  But
    4156 an explicit assignment in the makefile, or with a command argument,
    4157 overrides the environment.  (If the `-e' flag is specified, then values
    4158 from the environment override assignments in the makefile.  *Note
    4159 Summary of Options: Options Summary.  But this is not recommended
     4661transformed into a `make' variable with the same name and value.
     4662However, an explicit assignment in the makefile, or with a command
     4663argument, overrides the environment.  (If the `-e' flag is specified,
     4664then values from the environment override assignments in the makefile.
     4665*Note Summary of Options: Options Summary.  But this is not recommended
    41604666practice.)
    41614667
     
    41644670you prefer.  This is safe for variables with standard or conventional
    41654671meanings because you know that no makefile will use them for other
    4166 things.  (But this is not totally reliable; some makefiles set `CFLAGS'
    4167 explicitly and therefore are not affected by the value in the
     4672things.  (Note this is not totally reliable; some makefiles set
     4673`CFLAGS' explicitly and therefore are not affected by the value in the
    41684674environment.)
    41694675
    4170    When `make' is invoked recursively, variables defined in the outer
    4171 invocation can be passed to inner invocations through the environment
    4172 (*note Recursive Use of `make': Recursion.).  By default, only
    4173 variables that came from the environment or the command line are passed
    4174 to recursive invocations.  You can use the `export' directive to pass
    4175 other variables.  *Note Communicating Variables to a Sub-`make':
    4176 Variables/Recursion, for full details.
     4676   When `make' runs a command script, variables defined in the makefile
     4677are placed into the environment of that command.  This allows you to
     4678pass values to sub-`make' invocations (*note Recursive Use of `make':
     4679Recursion.).  By default, only variables that came from the environment
     4680or the command line are passed to recursive invocations.  You can use
     4681the `export' directive to pass other variables.  *Note Communicating
     4682Variables to a Sub-`make': Variables/Recursion, for full details.
    41774683
    41784684   Other use of variables from the environment is not recommended.  It
     
    41854691which is normally present in the environment to specify the user's
    41864692choice of interactive shell.  It would be very undesirable for this
    4187 choice to affect `make'.  So `make' ignores the environment value of
    4188 `SHELL' (except on MS-DOS and MS-Windows, where `SHELL' is usually not
    4189 set.  *Note Special handling of SHELL on MS-DOS: Execution.)
     4693choice to affect `make'; so, `make' handles the `SHELL' environment
     4694variable in a special way; see *Note Choosing the Shell::.
    41904695
    41914696
    41924697File: make.info,  Node: Target-specific,  Next: Pattern-specific,  Prev: Environment,  Up: Using Variables
    41934698
    4194 Target-specific Variable Values
    4195 ===============================
     46996.10 Target-specific Variable Values
     4700====================================
    41964701
    41974702Variable values in `make' are usually global; that is, they are the
     
    42624767File: make.info,  Node: Pattern-specific,  Prev: Target-specific,  Up: Using Variables
    42634768
    4264 Pattern-specific Variable Values
    4265 ================================
     47696.11 Pattern-specific Variable Values
     4770=====================================
    42664771
    42674772In addition to target-specific variable values (*note Target-specific
     
    43004805File: make.info,  Node: Conditionals,  Next: Functions,  Prev: Using Variables,  Up: Top
    43014806
    4302 Conditional Parts of Makefiles
    4303 ******************************
     48077 Conditional Parts of Makefiles
     4808********************************
    43044809
    43054810A "conditional" causes part of a makefile to be obeyed or ignored
     
    43194824File: make.info,  Node: Conditional Example,  Next: Conditional Syntax,  Prev: Conditionals,  Up: Conditionals
    43204825
    4321 Example of a Conditional
    4322 ========================
     48267.1 Example of a Conditional
     4827============================
    43234828
    43244829The following example of a conditional tells `make' to use one set of
     
    43314836     libs_for_gcc = -lgnu
    43324837     normal_libs =
    4333      
     4838
    43344839     foo: $(objects)
    43354840     ifeq ($(CC),gcc)
     
    43814886     libs_for_gcc = -lgnu
    43824887     normal_libs =
    4383      
     4888
    43844889     ifeq ($(CC),gcc)
    43854890       libs=$(libs_for_gcc)
     
    43874892       libs=$(normal_libs)
    43884893     endif
    4389      
     4894
    43904895     foo: $(objects)
    43914896             $(CC) -o foo $(objects) $(libs)
     
    43944899File: make.info,  Node: Conditional Syntax,  Next: Testing Flags,  Prev: Conditional Example,  Up: Conditionals
    43954900
    4396 Syntax of Conditionals
    4397 ======================
     49017.2 Syntax of Conditionals
     4902==========================
    43984903
    43994904The syntax of a simple conditional with no `else' is as follows:
     
    44154920     endif
    44164921
    4417 If the condition is true, TEXT-IF-TRUE is used; otherwise,
    4418 TEXT-IF-FALSE is used instead.  The TEXT-IF-FALSE can be any number of
    4419 lines of text.
     4922   or:
     4923
     4924     CONDITIONAL-DIRECTIVE
     4925     TEXT-IF-ONE-IS-TRUE
     4926     else CONDITIONAL-DIRECTIVE
     4927     TEXT-IF-TRUE
     4928     else
     4929     TEXT-IF-FALSE
     4930     endif
     4931
     4932There can be as many "`else' CONDITIONAL-DIRECTIVE" clauses as
     4933necessary.  Once a given condition is true, TEXT-IF-TRUE is used and no
     4934other clause is used; if no condition is true then TEXT-IF-FALSE is
     4935used.  The TEXT-IF-TRUE and TEXT-IF-FALSE can be any number of lines of
     4936text.
    44204937
    44214938   The syntax of the CONDITIONAL-DIRECTIVE is the same whether the
    4422 conditional is simple or complex.  There are four different directives
    4423 that test different conditions.  Here is a table of them:
     4939conditional is simple or complex; after an `else' or not.  There are
     4940four different directives that test different conditions.  Here is a
     4941table of them:
    44244942
    44254943`ifeq (ARG1, ARG2)'
     
    44574975
    44584976`ifdef VARIABLE-NAME'
    4459      If the variable VARIABLE-NAME has a non-empty value, the
    4460      TEXT-IF-TRUE is effective; otherwise, the TEXT-IF-FALSE, if any,
    4461      is effective.  Variables that have never been defined have an
    4462      empty value.  The variable VARIABLE-NAME is itself expanded, so it
    4463      could be a variable or function that expands to the name of a
    4464      variable.
     4977     The `ifdef' form takes the _name_ of a variable as its argument,
     4978     not a reference to a variable.  The value of that variable has a
     4979     non-empty value, the TEXT-IF-TRUE is effective; otherwise, the
     4980     TEXT-IF-FALSE, if any, is effective.  Variables that have never
     4981     been defined have an empty value.  The text VARIABLE-NAME is
     4982     expanded, so it could be a variable or function that expands to
     4983     the name of a variable.  For example:
     4984
     4985          bar = true
     4986          foo = bar
     4987          ifdef $(foo)
     4988          frobozz = yes
     4989          endif
     4990
     4991     The variable reference `$(foo)' is expanded, yielding `bar', which
     4992     is considered to be the name of a variable.  The variable `bar' is
     4993     not expanded, but its value is examined to determine if it is
     4994     non-empty.
    44654995
    44664996     Note that `ifdef' only tests whether a variable has a value.  It
     
    44925022     If the variable VARIABLE-NAME has an empty value, the TEXT-IF-TRUE
    44935023     is effective; otherwise, the TEXT-IF-FALSE, if any, is effective.
     5024     The rules for expansion and testing of VARIABLE-NAME are identical
     5025     to the `ifdef' directive.
    44945026
    44955027   Extra spaces are allowed and ignored at the beginning of the
     
    45265058File: make.info,  Node: Testing Flags,  Prev: Conditional Syntax,  Up: Conditionals
    45275059
    4528 Conditionals that Test Flags
    4529 ============================
     50607.3 Conditionals that Test Flags
     5061================================
    45305062
    45315063You can write a conditional that tests `make' command flags such as
     
    45575089File: make.info,  Node: Functions,  Next: Running,  Prev: Conditionals,  Up: Top
    45585090
    4559 Functions for Transforming Text
    4560 *******************************
     50918 Functions for Transforming Text
     5092*********************************
    45615093
    45625094"Functions" allow you to do text processing in the makefile to compute
     
    45725104* Text Functions::              General-purpose text manipulation functions.
    45735105* File Name Functions::         Functions for manipulating file names.
     5106* Conditional Functions::       Functions that implement conditions.
    45745107* Foreach Function::            Repeat some text with controlled variation.
    4575 * If Function::                 Conditionally expand a value.
    45765108* Call Function::               Expand a user-defined function.
    45775109* Value Function::              Return the un-expanded value of a variable.
    45785110* Eval Function::               Evaluate the arguments as makefile syntax.
    45795111* Origin Function::             Find where a variable got its value.
     5112* Flavor Function::             Find out the flavor of a variable.
    45805113* Shell Function::              Substitute the output of a shell command.
    45815114* Make Control Functions::      Functions that control how make runs.
     
    45845117File: make.info,  Node: Syntax of Functions,  Next: Text Functions,  Prev: Functions,  Up: Functions
    45855118
    4586 Function Call Syntax
    4587 ====================
     51198.1 Function Call Syntax
     5120========================
    45885121
    45895122A function call resembles a variable reference.  It looks like this:
     
    46385171File: make.info,  Node: Text Functions,  Next: File Name Functions,  Prev: Syntax of Functions,  Up: Functions
    46395172
    4640 Functions for String Substitution and Analysis
    4641 ==============================================
     51738.2 Functions for String Substitution and Analysis
     5174==================================================
    46425175
    46435176Here are some functions that operate on strings:
     
    48045337`$(wordlist S,E,TEXT)'
    48055338     Returns the list of words in TEXT starting with word S and ending
    4806      with word E (inclusive).  The legitimate values of S and E start
    4807      from 1.  If S is bigger than the number of words in TEXT, the
    4808      value is empty.  If E is bigger than the number of words in TEXT,
    4809      words up to the end of TEXT are returned.  If S is greater than E,
    4810      nothing is returned.  For example,
     5339     with word E (inclusive).  The legitimate values of S start from 1;
     5340     E may start from 0.  If S is bigger than the number of words in
     5341     TEXT, the value is empty.  If E is bigger than the number of words
     5342     in TEXT, words up to the end of TEXT are returned.  If S is
     5343     greater than E, nothing is returned.  For example,
    48115344
    48125345          $(wordlist 2, 3, foo bar baz)
     
    48305363     same as `$(word 1,TEXT)', the `firstword' function is retained for
    48315364     its simplicity.
     5365
     5366`$(lastword NAMES...)'
     5367     The argument NAMES is regarded as a series of names, separated by
     5368     whitespace.  The value is the last name in the series.
     5369
     5370     For example,
     5371
     5372          $(lastword foo bar)
     5373
     5374     produces the result `bar'.  Although `$(lastword TEXT)' is the
     5375     same as `$(word $(words TEXT),TEXT)', the `lastword' function was
     5376     added for its simplicity and better performance.
    48325377
    48335378   Here is a realistic example of the use of `subst' and `patsubst'.
     
    48585403
    48595404
    4860 File: make.info,  Node: File Name Functions,  Next: Foreach Function,  Prev: Text Functions,  Up: Functions
    4861 
    4862 Functions for File Names
    4863 ========================
     5405File: make.info,  Node: File Name Functions,  Next: Conditional Functions,  Prev: Text Functions,  Up: Functions
     5406
     54078.3 Functions for File Names
     5408============================
    48645409
    48655410Several of the built-in expansion functions relate specifically to
     
    49705515     File Names: Wildcards.
    49715516
    4972 
    4973 File: make.info,  Node: Foreach Function,  Next: If Function,  Prev: File Name Functions,  Up: Functions
    4974 
    4975 The `foreach' Function
    4976 ======================
     5517`$(realpath NAMES...)'
     5518     For each file name in NAMES return the canonical absolute name.  A
     5519     canonical name does not contain any `.' or `..' components, nor
     5520     any repeated path separators (`/') or symlinks.  In case of a
     5521     failure the empty string is returned.  Consult the `realpath(3)'
     5522     documentation for a list of possible failure causes.
     5523
     5524`$(abspath NAMES...)'
     5525     For each file name in NAMES return an absolute name that does not
     5526     contain any `.' or `..' components, nor any repeated path
     5527     separators (`/').  Note that, in contrast to `realpath' function,
     5528     `abspath' does not resolve symlinks and does not require the file
     5529     names to refer to an existing file or directory.  Use the
     5530     `wildcard' function to test for existence.
     5531
     5532
     5533File: make.info,  Node: Conditional Functions,  Next: Foreach Function,  Prev: File Name Functions,  Up: Functions
     5534
     55358.4 Functions for Conditionals
     5536==============================
     5537
     5538There are three functions that provide conditional expansion.  A key
     5539aspect of these functions is that not all of the arguments are expanded
     5540initially.  Only those arguments which need to be expanded, will be
     5541expanded.
     5542
     5543`$(if CONDITION,THEN-PART[,ELSE-PART])'
     5544     The `if' function provides support for conditional expansion in a
     5545     functional context (as opposed to the GNU `make' makefile
     5546     conditionals such as `ifeq' (*note Syntax of Conditionals:
     5547     Conditional Syntax.).
     5548
     5549     The first argument, CONDITION, first has all preceding and
     5550     trailing whitespace stripped, then is expanded.  If it expands to
     5551     any non-empty string, then the condition is considered to be true.
     5552     If it expands to an empty string, the condition is considered to
     5553     be false.
     5554
     5555     If the condition is true then the second argument, THEN-PART, is
     5556     evaluated and this is used as the result of the evaluation of the
     5557     entire `if' function.
     5558
     5559     If the condition is false then the third argument, ELSE-PART, is
     5560     evaluated and this is the result of the `if' function.  If there is
     5561     no third argument, the `if' function evaluates to nothing (the
     5562     empty string).
     5563
     5564     Note that only one of the THEN-PART or the ELSE-PART will be
     5565     evaluated, never both.  Thus, either can contain side-effects
     5566     (such as `shell' function calls, etc.)
     5567
     5568`$(or CONDITION1[,CONDITION2[,CONDITION3...]])'
     5569     The `or' function provides a "short-circuiting" OR operation.
     5570     Each argument is expanded, in order.  If an argument expands to a
     5571     non-empty string the processing stops and the result of the
     5572     expansion is that string.  If, after all arguments are expanded,
     5573     all of them are false (empty), then the result of the expansion is
     5574     the empty string.
     5575
     5576`$(and CONDITION1[,CONDITION2[,CONDITION3...]])'
     5577     The `and' function provides a "short-circuiting" AND operation.
     5578     Each argument is expanded, in order.  If an argument expands to an
     5579     empty string the processing stops and the result of the expansion
     5580     is the empty string.  If all arguments expand to a non-empty
     5581     string then the result of the expansion is the expansion of the
     5582     last argument.
     5583
     5584
     5585
     5586File: make.info,  Node: Foreach Function,  Next: Call Function,  Prev: Conditional Functions,  Up: Functions
     5587
     55888.5 The `foreach' Function
     5589==========================
    49775590
    49785591The `foreach' function is very different from other functions.  It
     
    50465659
    50475660
    5048 File: make.info,  Node: If Function,  Next: Call Function,  Prev: Foreach Function,  Up: Functions
    5049 
    5050 The `if' Function
    5051 =================
    5052 
    5053 The `if' function provides support for conditional expansion in a
    5054 functional context (as opposed to the GNU `make' makefile conditionals
    5055 such as `ifeq' (*note Syntax of Conditionals: Conditional Syntax.).
    5056 
    5057    An `if' function call can contain either two or three arguments:
    5058 
    5059      $(if CONDITION,THEN-PART[,ELSE-PART])
    5060 
    5061    The first argument, CONDITION, first has all preceding and trailing
    5062 whitespace stripped, then is expanded.  If it expands to any non-empty
    5063 string, then the condition is considered to be true.  If it expands to
    5064 an empty string, the condition is considered to be false.
    5065 
    5066    If the condition is true then the second argument, THEN-PART, is
    5067 evaluated and this is used as the result of the evaluation of the entire
    5068 `if' function.
    5069 
    5070    If the condition is false then the third argument, ELSE-PART, is
    5071 evaluated and this is the result of the `if' function.  If there is no
    5072 third argument, the `if' function evaluates to nothing (the empty
    5073 string).
    5074 
    5075    Note that only one of the THEN-PART or the ELSE-PART will be
    5076 evaluated, never both.  Thus, either can contain side-effects (such as
    5077 `shell' function calls, etc.)
    5078 
    5079 
    5080 File: make.info,  Node: Call Function,  Next: Value Function,  Prev: If Function,  Up: Functions
    5081 
    5082 The `call' Function
    5083 ===================
     5661File: make.info,  Node: Call Function,  Next: Value Function,  Prev: Foreach Function,  Up: Functions
     5662
     56638.6 The `call' Function
     5664=======================
    50845665
    50855666The `call' function is unique in that it can be used to create new
     
    51205701
    51215702     reverse = $(2) $(1)
    5122      
     5703
    51235704     foo = $(call reverse,a,b)
    51245705
     
    51295710
    51305711     pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
    5131      
     5712
    51325713     LS := $(call pathsearch,ls)
    51335714
     
    51575738File: make.info,  Node: Value Function,  Next: Eval Function,  Prev: Call Function,  Up: Functions
    51585739
    5159 The `value' Function
    5160 ====================
     57408.7 The `value' Function
     5741========================
    51615742
    51625743The `value' function provides a way for you to use the value of a
     
    51815762
    51825763     FOO = $PATH
    5183      
     5764
    51845765     all:
    51855766             @echo $(FOO)
     
    51975778File: make.info,  Node: Eval Function,  Next: Origin Function,  Prev: Value Function,  Up: Functions
    51985779
    5199 The `eval' Function
    5200 ===================
     57808.8 The `eval' Function
     5781=======================
    52015782
    52025783The `eval' function is very special: it allows you to define new
     
    52295810
    52305811     PROGRAMS    = server client
    5231      
     5812
    52325813     server_OBJS = server.o server_priv.o server_access.o
    52335814     server_LIBS = priv protocol
    5234      
     5815
    52355816     client_OBJS = client.o client_api.o client_mem.o
    52365817     client_LIBS = protocol
    5237      
     5818
    52385819     # Everything after this is generic
    5239      
     5820
    52405821     .PHONY: all
    52415822     all: $(PROGRAMS)
    5242      
     5823
    52435824     define PROGRAM_template
    52445825      $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%)
    52455826      ALL_OBJS   += $$($(1)_OBJS)
    52465827     endef
    5247      
     5828
    52485829     $(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
    5249      
     5830
    52505831     $(PROGRAMS):
    52515832             $(LINK.o) $^ $(LDLIBS) -o $@
    5252      
     5833
    52535834     clean:
    52545835             rm -f $(ALL_OBJS) $(PROGRAMS)
    52555836
    52565837
    5257 File: make.info,  Node: Origin Function,  Next: Shell Function,  Prev: Eval Function,  Up: Functions
    5258 
    5259 The `origin' Function
    5260 =====================
     5838File: make.info,  Node: Origin Function,  Next: Flavor Function,  Prev: Eval Function,  Up: Functions
     5839
     58408.9 The `origin' Function
     5841=========================
    52615842
    52625843The `origin' function is unlike most other functions in that it does
     
    53415922
    53425923
    5343 File: make.info,  Node: Shell Function,  Next: Make Control Functions,  Prev: Origin Function,  Up: Functions
    5344 
    5345 The `shell' Function
    5346 ====================
     5924File: make.info,  Node: Flavor Function,  Next: Shell Function,  Prev: Origin Function,  Up: Functions
     5925
     59268.10 The `flavor' Function
     5927==========================
     5928
     5929The `flavor' function is unlike most other functions (and like `origin'
     5930function) in that it does not operate on the values of variables; it
     5931tells you something _about_ a variable.  Specifically, it tells you the
     5932flavor of a variable (*note The Two Flavors of Variables: Flavors.).
     5933
     5934   The syntax of the `flavor' function is:
     5935
     5936     $(flavor VARIABLE)
     5937
     5938   Note that VARIABLE is the _name_ of a variable to inquire about; not
     5939a _reference_ to that variable.  Therefore you would not normally use a
     5940`$' or parentheses when writing it.  (You can, however, use a variable
     5941reference in the name if you want the name not to be a constant.)
     5942
     5943   The result of this function is a string that identifies the flavor
     5944of the variable VARIABLE:
     5945
     5946`undefined'
     5947     if VARIABLE was never defined.
     5948
     5949`recursive'
     5950     if VARIABLE is a recursively expanded variable.
     5951
     5952`simple'
     5953     if VARIABLE is a simply expanded variable.
     5954
     5955
     5956
     5957File: make.info,  Node: Shell Function,  Next: Make Control Functions,  Prev: Flavor Function,  Up: Functions
     5958
     59598.11 The `shell' Function
     5960=========================
    53475961
    53485962The `shell' function is unlike any other function other than the
     
    53755989
    53765990sets `files' to the expansion of `*.c'.  Unless `make' is using a very
    5377 strange shell, this has the same result as `$(wildcard *.c)'.
     5991strange shell, this has the same result as `$(wildcard *.c)' (as long
     5992as at least one `.c' file exists).
    53785993
    53795994
    53805995File: make.info,  Node: Make Control Functions,  Prev: Shell Function,  Up: Functions
    53815996
    5382 Functions That Control Make
    5383 ===========================
     59978.12 Functions That Control Make
     5998================================
    53845999
    53856000These functions control the way make runs.  Generally, they are used to
     
    54046019
    54056020          ERR = $(error found an error!)
    5406          
     6021
    54076022          .PHONY: err
    54086023          err: ; $(ERR)
     
    54196034     The result of the expansion of this function is the empty string.
    54206035
     6036`$(info TEXT...)'
     6037     This function does nothing more than print its (expanded)
     6038     argument(s) to standard output.  No makefile name or line number
     6039     is added.  The result of the expansion of this function is the
     6040     empty string.
     6041
    54216042
    54226043File: make.info,  Node: Running,  Next: Implicit Rules,  Prev: Functions,  Up: Top
    54236044
    5424 How to Run `make'
    5425 *****************
     60459 How to Run `make'
     6046*******************
    54266047
    54276048A makefile that says how to recompile a program can be used in more
     
    54696090File: make.info,  Node: Makefile Arguments,  Next: Goals,  Prev: Running,  Up: Running
    54706091
    5471 Arguments to Specify the Makefile
    5472 =================================
     60929.1 Arguments to Specify the Makefile
     6093=====================================
    54736094
    54746095The way to specify the name of the makefile is with the `-f' or
     
    54876108File: make.info,  Node: Goals,  Next: Instead of Execution,  Prev: Makefile Arguments,  Up: Running
    54886109
    5489 Arguments to Specify the Goals
    5490 ==============================
     61109.2 Arguments to Specify the Goals
     6111==================================
    54916112
    54926113The "goals" are the targets that `make' should strive ultimately to
     
    54996120program or programs they describe.  If the first rule in the makefile
    55006121has several targets, only the first target in the rule becomes the
    5501 default goal, not the whole list.
    5502 
    5503    You can specify a different goal or goals with arguments to `make'.
    5504 Use the name of the goal as an argument.  If you specify several goals,
    5505 `make' processes each of them in turn, in the order you name them.
     6122default goal, not the whole list.  You can manage the selection of the
     6123default goal from within your makefile using the `.DEFAULT_GOAL'
     6124variable (*note Other Special Variables: Special Variables.).
     6125
     6126   You can also specify a different goal or goals with command-line
     6127arguments to `make'.  Use the name of the goal as an argument.  If you
     6128specify several goals, `make' processes each of them in turn, in the
     6129order you name them.
    55066130
    55076131   Any target in the makefile may be specified as a goal (unless it
     
    55216145
    55226146     sources = foo.c bar.c
    5523      
     6147
    55246148     ifneq ($(MAKECMDGOALS),clean)
    55256149     include $(sources:.c=.d)
     
    56016225File: make.info,  Node: Instead of Execution,  Next: Avoiding Compilation,  Prev: Goals,  Up: Running
    56026226
    5603 Instead of Executing the Commands
    5604 =================================
     62279.3 Instead of Executing the Commands
     6228=====================================
    56056229
    56066230The makefile tells `make' how to tell whether a target is up to date,
     
    56806304File: make.info,  Node: Avoiding Compilation,  Next: Overriding,  Prev: Instead of Execution,  Up: Running
    56816305
    5682 Avoiding Recompilation of Some Files
    5683 ====================================
     63069.4 Avoiding Recompilation of Some Files
     6307========================================
    56846308
    56856309Sometimes you may have changed a source file but you do not want to
     
    57236347File: make.info,  Node: Overriding,  Next: Testing,  Prev: Avoiding Compilation,  Up: Running
    57246348
    5725 Overriding Variables
    5726 ====================
     63499.5 Overriding Variables
     6350========================
    57276351
    57286352An argument that contains `=' specifies the value of a variable: `V=X'
     
    57756399File: make.info,  Node: Testing,  Next: Options Summary,  Prev: Overriding,  Up: Running
    57766400
    5777 Testing the Compilation of a Program
    5778 ====================================
     64019.6 Testing the Compilation of a Program
     6402========================================
    57796403
    57806404Normally, when an error happens in executing a shell command, `make'
     
    58116435File: make.info,  Node: Options Summary,  Prev: Testing,  Up: Running
    58126436
    5813 Summary of Options
    5814 ==================
     64379.7 Summary of Options
     6438======================
    58156439
    58166440Here is a table of all the options `make' understands:
     
    58256449     Consider all targets out-of-date.  GNU `make' proceeds to consider
    58266450     targets and their prerequisites using the normal algorithms;
    5827      however, all these targets are remade, regardless of the status of
    5828      their prerequisites.
     6451     however, all targets so considered are always remade regardless of
     6452     the status of their prerequisites.  To avoid infinite recursion, if
     6453     `MAKE_RESTARTS' (*note Other Special Variables: Special
     6454     Variables.) is set to a number greater than 0 this option is
     6455     disabled when considering whether to remake makefiles (*note How
     6456     Makefiles Are Remade: Remaking Makefiles.).
    58296457
    58306458`-C DIR'
     
    59316559     floating-point number).  With no argument, removes a previous load
    59326560     limit.  *Note Parallel Execution: Parallel.
     6561
     6562`-L'
     6563`--check-symlink-times'
     6564     On systems that support symbolic links, this option causes `make'
     6565     to consider the timestamps on any symbolic links in addition to the
     6566     timestamp on the file referenced by those links.  When this option
     6567     is provided, the most recent timestamp among the file and the
     6568     symbolic links is taken as the modification time for this target
     6569     file.
    59336570
    59346571`-n'
     
    60536690File: make.info,  Node: Implicit Rules,  Next: Archives,  Prev: Running,  Up: Top
    60546691
    6055 Using Implicit Rules
    6056 ********************
     669210 Using Implicit Rules
     6693***********************
    60576694
    60586695Certain standard ways of remaking target files are used very often.  For
     
    60916728* Chained Rules::               How to use a chain of implicit rules.
    60926729* Pattern Rules::               How to define new implicit rules.
    6093 * Last Resort::                 How to defining commands for rules
    6094                                   which cannot find any.
     6730* Last Resort::                 How to define commands for rules which
     6731                                  cannot find any.
    60956732* Suffix Rules::                The old-fashioned style of implicit rule.
    60966733* Implicit Rule Search::        The precise algorithm for applying
     
    61006737File: make.info,  Node: Using Implicit,  Next: Catalogue of Rules,  Prev: Implicit Rules,  Up: Implicit Rules
    61016738
    6102 Using Implicit Rules
    6103 ====================
     673910.1 Using Implicit Rules
     6740=========================
    61046741
    61056742To allow `make' to find a customary method for updating a target file,
     
    61746811File: make.info,  Node: Catalogue of Rules,  Next: Implicit Variables,  Prev: Using Implicit,  Up: Implicit Rules
    61756812
    6176 Catalogue of Implicit Rules
    6177 ===========================
     681310.2 Catalogue of Implicit Rules
     6814================================
    61786815
    61796816Here is a catalogue of predefined implicit rules which are always
     
    61836820`--no-builtin-rules' option cancels all predefined rules.
    61846821
     6822   This manual only documents the default rules available on POSIX-based
     6823operating systems.  Other operating systems, such as VMS, Windows,
     6824OS/2, etc. may have different sets of default rules.  To see the full
     6825list of default rules and variables available in your version of GNU
     6826`make', run `make -p' in a directory with no makefile.
     6827
    61856828   Not all of these rules will always be defined, even when the `-r'
    61866829option is not given.  Many of the predefined implicit rules are
     
    61886831depends on the "suffix list" (the list of prerequisites of the special
    61896832target `.SUFFIXES').  The default suffix list is: `.out', `.a', `.ln',
    6190 `.o', `.c', `.cc', `.C', `.p', `.f', `.F', `.r', `.y', `.l', `.s',
    6191 `.S', `.mod', `.sym', `.def', `.h', `.info', `.dvi', `.tex', `.texinfo',
    6192 `.texi', `.txinfo', `.w', `.ch' `.web', `.sh', `.elc', `.el'.  All of
    6193 the implicit rules described below whose prerequisites have one of
    6194 these suffixes are actually suffix rules.  If you modify the suffix
    6195 list, the only predefined suffix rules in effect will be those named by
    6196 one or two of the suffixes that are on the list you specify; rules
    6197 whose suffixes fail to be on the list are disabled.  *Note
    6198 Old-Fashioned Suffix Rules: Suffix Rules, for full details on suffix
    6199 rules.
     6833`.o', `.c', `.cc', `.C', `.cpp', `.p', `.f', `.F', `.r', `.y', `.l',
     6834`.s', `.S', `.mod', `.sym', `.def', `.h', `.info', `.dvi', `.tex',
     6835`.texinfo', `.texi', `.txinfo', `.w', `.ch' `.web', `.sh', `.elc',
     6836`.el'.  All of the implicit rules described below whose prerequisites
     6837have one of these suffixes are actually suffix rules.  If you modify
     6838the suffix list, the only predefined suffix rules in effect will be
     6839those named by one or two of the suffixes that are on the list you
     6840specify; rules whose suffixes fail to be on the list are disabled.
     6841*Note Old-Fashioned Suffix Rules: Suffix Rules, for full details on
     6842suffix rules.
    62006843
    62016844Compiling C programs
     
    62046847
    62056848Compiling C++ programs
    6206      `N.o' is made automatically from `N.cc' or `N.C' with a command of
    6207      the form `$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)'.  We encourage you to
    6208      use the suffix `.cc' for C++ source files instead of `.C'.
     6849     `N.o' is made automatically from `N.cc', `N.cpp', or `N.C' with a
     6850     command of the form `$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)'.  We
     6851     encourage you to use the suffix `.cc' for C++ source files instead
     6852     of `.C'.
    62096853
    62106854Compiling Pascal programs
     
    63807024File: make.info,  Node: Implicit Variables,  Next: Chained Rules,  Prev: Catalogue of Rules,  Up: Implicit Rules
    63817025
    6382 Variables Used by Implicit Rules
    6383 ================================
     702610.3 Variables Used by Implicit Rules
     7027=====================================
    63847028
    63857029The commands in built-in implicit rules make liberal use of certain
    6386 predefined variables.  You can alter these variables in the makefile,
    6387 with arguments to `make', or in the environment to alter how the
    6388 implicit rules work without redefining the rules themselves.  You can
    6389 cancel all variables used by implicit rules with the `-R' or
     7030predefined variables.  You can alter the values of these variables in
     7031the makefile, with arguments to `make', or in the environment to alter
     7032how the implicit rules work without redefining the rules themselves.
     7033You can cancel all variables used by implicit rules with the `-R' or
    63907034`--no-builtin-variables' option.
    63917035
     
    64077051argument, separate them with spaces.
    64087052
    6409    Here is a table of variables used as names of programs in built-in
    6410 rules:
     7053   The following tables describe of some of the more commonly-used
     7054predefined variables.  This list is not exhaustive, and the default
     7055values shown here may not be what are selected by `make' for your
     7056environment.  To see the complete list of predefined variables for your
     7057instance of GNU `make' you can run `make -p' in a directory with no
     7058makefiles.
     7059
     7060   Here is a table of some of the more common variables used as names of
     7061programs in built-in rules: makefiles.
    64117062
    64127063`AR'
    6413      Archive-maintaining program; default `ar'.
     7064     Archive-maintaining program; default `ar'. 
    64147065
    64157066`AS'
    6416      Program for doing assembly; default `as'.
     7067     Program for compiling assembly files; default `as'. 
    64177068
    64187069`CC'
    6419      Program for compiling C programs; default `cc'.
     7070     Program for compiling C programs; default `cc'. 
     7071
     7072`CO'
     7073     Program for checking out files from RCS; default `co'. 
    64207074
    64217075`CXX'
    6422      Program for compiling C++ programs; default `g++'.
     7076     Program for compiling C++ programs; default `g++'. 
    64237077
    64247078`CO'
    6425      Program for extracting a file from RCS; default `co'.
     7079     Program for extracting a file from RCS; default `co'. 
    64267080
    64277081`CPP'
     
    64317085`FC'
    64327086     Program for compiling or preprocessing Fortran and Ratfor programs;
    6433      default `f77'.
     7087     default `f77'. 
    64347088
    64357089`GET'
    6436      Program for extracting a file from SCCS; default `get'.
     7090     Program for extracting a file from SCCS; default `get'. 
    64377091
    64387092`LEX'
    6439      Program to use to turn Lex grammars into C programs or Ratfor
    6440      programs; default `lex'.
     7093     Program to use to turn Lex grammars into source code; default
     7094     `lex'. 
     7095
     7096`YACC'
     7097     Program to use to turn Yacc grammars into source code; default
     7098     `yacc'. 
     7099
     7100`LINT'
     7101     Program to use to run lint on source code; default `lint'. 
     7102
     7103`M2C'
     7104     Program to use to compile Modula-2 source code; default `m2c'. 
    64417105
    64427106`PC'
    6443      Program for compiling Pascal programs; default `pc'.
    6444 
    6445 `YACC'
    6446      Program to use to turn Yacc grammars into C programs; default
    6447      `yacc'.
    6448 
    6449 `YACCR'
    6450      Program to use to turn Yacc grammars into Ratfor programs; default
    6451      `yacc -r'.
     7107     Program for compiling Pascal programs; default `pc'. 
    64527108
    64537109`MAKEINFO'
    64547110     Program to convert a Texinfo source file into an Info file; default
    6455      `makeinfo'.
     7111     `makeinfo'. 
    64567112
    64577113`TEX'
    6458      Program to make TeX DVI files from TeX source; default `tex'.
     7114     Program to make TeX DVI files from TeX source; default `tex'. 
    64597115
    64607116`TEXI2DVI'
    64617117     Program to make TeX DVI files from Texinfo source; default
    6462      `texi2dvi'.
     7118     `texi2dvi'. 
    64637119
    64647120`WEAVE'
    6465      Program to translate Web into TeX; default `weave'.
     7121     Program to translate Web into TeX; default `weave'. 
    64667122
    64677123`CWEAVE'
    6468      Program to translate C Web into TeX; default `cweave'.
     7124     Program to translate C Web into TeX; default `cweave'. 
    64697125
    64707126`TANGLE'
    6471      Program to translate Web into Pascal; default `tangle'.
     7127     Program to translate Web into Pascal; default `tangle'. 
    64727128
    64737129`CTANGLE'
    6474      Program to translate C Web into C; default `ctangle'.
     7130     Program to translate C Web into C; default `ctangle'. 
    64757131
    64767132`RM'
    6477      Command to remove a file; default `rm -f'.
     7133     Command to remove a file; default `rm -f'. 
    64787134
    64797135   Here is a table of variables whose values are additional arguments
     
    65147170     Extra flags to give to Lex.
    65157171
     7172`YFLAGS'
     7173     Extra flags to give to Yacc.
     7174
    65167175`PFLAGS'
    65177176     Extra flags to give to the Pascal compiler.
     
    65207179     Extra flags to give to the Fortran compiler for Ratfor programs.
    65217180
    6522 `YFLAGS'
    6523      Extra flags to give to Yacc.
     7181`LINTFLAGS'
     7182     Extra flags to give to lint.
    65247183
    65257184
    65267185File: make.info,  Node: Chained Rules,  Next: Pattern Rules,  Prev: Implicit Variables,  Up: Implicit Rules
    65277186
    6528 Chains of Implicit Rules
    6529 ========================
     718710.4 Chains of Implicit Rules
     7188=============================
    65307189
    65317190Sometimes a file can be made by a sequence of implicit rules.  For
     
    65797238as a prerequisite of the special target `.PRECIOUS' to preserve
    65807239intermediate files made by implicit rules whose target patterns match
    6581 that file's name; see *Note Interrupts::.
     7240that file's name; see *Note Interrupts::. 
    65827241
    65837242   A chain can involve more than two implicit rules.  For example, it is
     
    66017260earlier in the ordering of rules.
    66027261
    6603 
    6604 File: make.info,  Node: Pattern Rules,  Next: Last Resort,  Prev: Chained Rules,  Up: Implicit Rules
    6605 
    6606 Defining and Redefining Pattern Rules
    6607 =====================================
    6608 
    6609 You define an implicit rule by writing a "pattern rule".  A pattern
    6610 rule looks like an ordinary rule, except that its target contains the
    6611 character `%' (exactly one of them).  The target is considered a
    6612 pattern for matching file names; the `%' can match any nonempty
    6613 substring, while other characters match only themselves.  The
    6614 prerequisites likewise use `%' to show how their names relate to the
    6615 target name.
    6616 
    6617    Thus, a pattern rule `%.o : %.c' says how to make any file `STEM.o'
    6618 from another file `STEM.c'.
    6619 
    6620    Note that expansion using `%' in pattern rules occurs *after* any
    6621 variable or function expansions, which take place when the makefile is
    6622 read.  *Note How to Use Variables: Using Variables, and *Note Functions
    6623 for Transforming Text: Functions.
    6624 
    6625 * Menu:
    6626 
    6627 * Pattern Intro::               An introduction to pattern rules.
    6628 * Pattern Examples::            Examples of pattern rules.
    6629 * Automatic Variables::         How to use automatic variables in the
    6630                                   commands of implicit rules.
    6631 * Pattern Match::               How patterns match.
    6632 * Match-Anything Rules::        Precautions you should take prior to
    6633                                   defining rules that can match any
    6634                                   target file whatever.
    6635 * Canceling Rules::             How to override or cancel built-in rules.
    6636 
    6637 
    6638 File: make.info,  Node: Pattern Intro,  Next: Pattern Examples,  Prev: Pattern Rules,  Up: Pattern Rules
    6639 
    6640 Introduction to Pattern Rules
    6641 -----------------------------
    6642 
    6643 A pattern rule contains the character `%' (exactly one of them) in the
    6644 target; otherwise, it looks exactly like an ordinary rule.  The target
    6645 is a pattern for matching file names; the `%' matches any nonempty
    6646 substring, while other characters match only themselves.
    6647 
    6648    For example, `%.c' as a pattern matches any file name that ends in
    6649 `.c'.  `s.%.c' as a pattern matches any file name that starts with
    6650 `s.', ends in `.c' and is at least five characters long.  (There must
    6651 be at least one character to match the `%'.)  The substring that the
    6652 `%' matches is called the "stem".
    6653 
    6654    `%' in a prerequisite of a pattern rule stands for the same stem
    6655 that was matched by the `%' in the target.  In order for the pattern
    6656 rule to apply, its target pattern must match the file name under
    6657 consideration, and its prerequisite patterns must name files that exist
    6658 or can be made.  These files become prerequisites of the target.
    6659 
    6660    Thus, a rule of the form
    6661 
    6662      %.o : %.c ; COMMAND...
    6663 
    6664 specifies how to make a file `N.o', with another file `N.c' as its
    6665 prerequisite, provided that `N.c' exists or can be made.
    6666 
    6667    There may also be prerequisites that do not use `%'; such a
    6668 prerequisite attaches to every file made by this pattern rule.  These
    6669 unvarying prerequisites are useful occasionally.
    6670 
    6671    A pattern rule need not have any prerequisites that contain `%', or
    6672 in fact any prerequisites at all.  Such a rule is effectively a general
    6673 wildcard.  It provides a way to make any file that matches the target
    6674 pattern.  *Note Last Resort::.
    6675 
    6676    Pattern rules may have more than one target.  Unlike normal rules,
    6677 this does not act as many different rules with the same prerequisites
    6678 and commands.  If a pattern rule has multiple targets, `make' knows that
    6679 the rule's commands are responsible for making all of the targets.  The
    6680 commands are executed only once to make all the targets.  When searching
    6681 for a pattern rule to match a target, the target patterns of a rule
    6682 other than the one that matches the target in need of a rule are
    6683 incidental: `make' worries only about giving commands and prerequisites
    6684 to the file presently in question.  However, when this file's commands
    6685 are run, the other targets are marked as having been updated themselves.
    6686 
    6687    The order in which pattern rules appear in the makefile is important
    6688 since this is the order in which they are considered.  Of equally
    6689 applicable rules, only the first one found is used.  The rules you
    6690 write take precedence over those that are built in.  Note however, that
    6691 a rule whose prerequisites actually exist or are mentioned always takes
    6692 priority over a rule with prerequisites that must be made by chaining
    6693 other implicit rules.
    6694 
    6695 
    6696 File: make.info,  Node: Pattern Examples,  Next: Automatic Variables,  Prev: Pattern Intro,  Up: Pattern Rules
    6697 
    6698 Pattern Rule Examples
    6699 ---------------------
    6700 
    6701 Here are some examples of pattern rules actually predefined in `make'.
    6702 First, the rule that compiles `.c' files into `.o' files:
    6703 
    6704      %.o : %.c
    6705              $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
    6706 
    6707 defines a rule that can make any file `X.o' from `X.c'.  The command
    6708 uses the automatic variables `$@' and `$<' to substitute the names of
    6709 the target file and the source file in each case where the rule applies
    6710 (*note Automatic Variables::).
    6711 
    6712    Here is a second built-in rule:
    6713 
    6714      % :: RCS/%,v
    6715              $(CO) $(COFLAGS) $<
    6716 
    6717 defines a rule that can make any file `X' whatsoever from a
    6718 corresponding file `X,v' in the subdirectory `RCS'.  Since the target
    6719 is `%', this rule will apply to any file whatever, provided the
    6720 appropriate prerequisite file exists.  The double colon makes the rule
    6721 "terminal", which means that its prerequisite may not be an intermediate
    6722 file (*note Match-Anything Pattern Rules: Match-Anything Rules.).
    6723 
    6724    This pattern rule has two targets:
    6725 
    6726      %.tab.c %.tab.h: %.y
    6727              bison -d $<
    6728 
    6729 This tells `make' that the command `bison -d X.y' will make both
    6730 `X.tab.c' and `X.tab.h'.  If the file `foo' depends on the files
    6731 `parse.tab.o' and `scan.o' and the file `scan.o' depends on the file
    6732 `parse.tab.h', when `parse.y' is changed, the command `bison -d parse.y'
    6733 will be executed only once, and the prerequisites of both `parse.tab.o'
    6734 and `scan.o' will be satisfied.  (Presumably the file `parse.tab.o'
    6735 will be recompiled from `parse.tab.c' and the file `scan.o' from
    6736 `scan.c', while `foo' is linked from `parse.tab.o', `scan.o', and its
    6737 other prerequisites, and it will execute happily ever after.)
    6738 
    6739 
    6740 File: make.info,  Node: Automatic Variables,  Next: Pattern Match,  Prev: Pattern Examples,  Up: Pattern Rules
    6741 
    6742 Automatic Variables
    6743 -------------------
    6744 
    6745 Suppose you are writing a pattern rule to compile a `.c' file into a
    6746 `.o' file: how do you write the `cc' command so that it operates on the
    6747 right source file name?  You cannot write the name in the command,
    6748 because the name is different each time the implicit rule is applied.
    6749 
    6750    What you do is use a special feature of `make', the "automatic
    6751 variables".  These variables have values computed afresh for each rule
    6752 that is executed, based on the target and prerequisites of the rule.
    6753 In this example, you would use `$@' for the object file name and `$<'
    6754 for the source file name.
    6755 
    6756    It's very important that you recognize the limited scope in which
    6757 automatic variable values are available: they only have values within
    6758 the command script.  In particular, you cannot use them anywhere within
    6759 the target or prerequisite lists of a rule; they have no value there
    6760 and will expand to the empty string.  A common mistake is attempting to
    6761 use `$@' within the prerequisites list in a rule; this will not work.
    6762 However, see below for information on the SysV-style `$$@' variables.
    6763 
    6764    Here is a table of automatic variables:
    6765 
    6766 `$@'
    6767      The file name of the target of the rule.  If the target is an
    6768      archive member, then `$@' is the name of the archive file.  In a
    6769      pattern rule that has multiple targets (*note Introduction to
    6770      Pattern Rules: Pattern Intro.), `$@' is the name of whichever
    6771      target caused the rule's commands to be run.
    6772 
    6773 `$%'
    6774      The target member name, when the target is an archive member.
    6775      *Note Archives::.  For example, if the target is `foo.a(bar.o)'
    6776      then `$%' is `bar.o' and `$@' is `foo.a'.  `$%' is empty when the
    6777      target is not an archive member.
    6778 
    6779 `$<'
    6780      The name of the first prerequisite.  If the target got its
    6781      commands from an implicit rule, this will be the first
    6782      prerequisite added by the implicit rule (*note Implicit Rules::).
    6783 
    6784 `$?'
    6785      The names of all the prerequisites that are newer than the target,
    6786      with spaces between them.  For prerequisites which are archive
    6787      members, only the member named is used (*note Archives::).
    6788 
    6789 `$^'
    6790      The names of all the prerequisites, with spaces between them.  For
    6791      prerequisites which are archive members, only the member named is
    6792      used (*note Archives::).  A target has only one prerequisite on
    6793      each other file it depends on, no matter how many times each file
    6794      is listed as a prerequisite.  So if you list a prerequisite more
    6795      than once for a target, the value of `$^' contains just one copy
    6796      of the name.
    6797 
    6798 `$+'
    6799      This is like `$^', but prerequisites listed more than once are
    6800      duplicated in the order they were listed in the makefile.  This is
    6801      primarily useful for use in linking commands where it is
    6802      meaningful to repeat library file names in a particular order.
    6803 
    6804 `$*'
    6805      The stem with which an implicit rule matches (*note How Patterns
    6806      Match: Pattern Match.).  If the target is `dir/a.foo.b' and the
    6807      target pattern is `a.%.b' then the stem is `dir/foo'.  The stem is
    6808      useful for constructing names of related files.
    6809 
    6810      In a static pattern rule, the stem is part of the file name that
    6811      matched the `%' in the target pattern.
    6812 
    6813      In an explicit rule, there is no stem; so `$*' cannot be determined
    6814      in that way.  Instead, if the target name ends with a recognized
    6815      suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is
    6816      set to the target name minus the suffix.  For example, if the
    6817      target name is `foo.c', then `$*' is set to `foo', since `.c' is a
    6818      suffix.  GNU `make' does this bizarre thing only for compatibility
    6819      with other implementations of `make'.  You should generally avoid
    6820      using `$*' except in implicit rules or static pattern rules.
    6821 
    6822      If the target name in an explicit rule does not end with a
    6823      recognized suffix, `$*' is set to the empty string for that rule.
    6824 
    6825    `$?' is useful even in explicit rules when you wish to operate on
    6826 only the prerequisites that have changed.  For example, suppose that an
    6827 archive named `lib' is supposed to contain copies of several object
    6828 files.  This rule copies just the changed object files into the archive:
    6829 
    6830      lib: foo.o bar.o lose.o win.o
    6831              ar r lib $?
    6832 
    6833    Of the variables listed above, four have values that are single file
    6834 names, and three have values that are lists of file names.  These seven
    6835 have variants that get just the file's directory name or just the file
    6836 name within the directory.  The variant variables' names are formed by
    6837 appending `D' or `F', respectively.  These variants are semi-obsolete
    6838 in GNU `make' since the functions `dir' and `notdir' can be used to get
    6839 a similar effect (*note Functions for File Names: File Name
    6840 Functions.).  Note, however, that the `D' variants all omit the
    6841 trailing slash which always appears in the output of the `dir'
    6842 function.  Here is a table of the variants:
    6843 
    6844 `$(@D)'
    6845      The directory part of the file name of the target, with the
    6846      trailing slash removed.  If the value of `$@' is `dir/foo.o' then
    6847      `$(@D)' is `dir'.  This value is `.' if `$@' does not contain a
    6848      slash.
    6849 
    6850 `$(@F)'
    6851      The file-within-directory part of the file name of the target.  If
    6852      the value of `$@' is `dir/foo.o' then `$(@F)' is `foo.o'.  `$(@F)'
    6853      is equivalent to `$(notdir $@)'.
    6854 
    6855 `$(*D)'
    6856 `$(*F)'
    6857      The directory part and the file-within-directory part of the stem;
    6858      `dir' and `foo' in this example.
    6859 
    6860 `$(%D)'
    6861 `$(%F)'
    6862      The directory part and the file-within-directory part of the target
    6863      archive member name.  This makes sense only for archive member
    6864      targets of the form `ARCHIVE(MEMBER)' and is useful only when
    6865      MEMBER may contain a directory name.  (*Note Archive Members as
    6866      Targets: Archive Members.)
    6867 
    6868 `$(<D)'
    6869 `$(<F)'
    6870      The directory part and the file-within-directory part of the first
    6871      prerequisite.
    6872 
    6873 `$(^D)'
    6874 `$(^F)'
    6875      Lists of the directory parts and the file-within-directory parts
    6876      of all prerequisites.
    6877 
    6878 `$(+D)'
    6879 `$(+F)'
    6880      Lists of the directory parts and the file-within-directory parts
    6881      of all prerequisites, including multiple instances of duplicated
    6882      prerequisites.
    6883 
    6884 `$(?D)'
    6885 `$(?F)'
    6886      Lists of the directory parts and the file-within-directory parts of
    6887      all prerequisites that are newer than the target.
    6888 
    6889    Note that we use a special stylistic convention when we talk about
    6890 these automatic variables; we write "the value of `$<'", rather than
    6891 "the variable `<'" as we would write for ordinary variables such as
    6892 `objects' and `CFLAGS'.  We think this convention looks more natural in
    6893 this special case.  Please do not assume it has a deep significance;
    6894 `$<' refers to the variable named `<' just as `$(CFLAGS)' refers to the
    6895 variable named `CFLAGS'.  You could just as well use `$(<)' in place of
    6896 `$<'.
    6897 
    6898    GNU `make' provides support for the SysV `make' feature that allows
    6899 special variable references `$$@', `$$(@D)', and `$$(@F)' (note the
    6900 required double-"$"!) to appear with the _prerequisites list_ (normal
    6901 automatic variables are available only within a command script).  When
    6902 appearing in a prerequisites list, these variables are expanded to the
    6903 name of the target, the directory component of the target, and the file
    6904 component of the target, respectively.
    6905 
    6906    Note that these variables are available only within explicit and
    6907 static pattern (*note Static Pattern Rules: Static Pattern.) rules;
    6908 they have no special significance within implicit (suffix or pattern)
    6909 rules.  Also note that while SysV `make' actually expands its entire
    6910 prerequisite list _twice_, GNU `make' does not behave this way: instead
    6911 it simply expands these special variables without re-expanding any
    6912 other part of the prerequisites list.
    6913 
    6914    This somewhat bizarre feature is included only to provide some
    6915 compatibility with SysV makefiles.  In a native GNU `make' file there
    6916 are other ways to accomplish the same results.  This feature is
    6917 disabled if the special pseudo target `.POSIX' is defined.
    6918 
    6919 
    6920 File: make.info,  Node: Pattern Match,  Next: Match-Anything Rules,  Prev: Automatic Variables,  Up: Pattern Rules
    6921 
    6922 How Patterns Match
    6923 ------------------
    6924 
    6925 A target pattern is composed of a `%' between a prefix and a suffix,
    6926 either or both of which may be empty.  The pattern matches a file name
    6927 only if the file name starts with the prefix and ends with the suffix,
    6928 without overlap.  The text between the prefix and the suffix is called
    6929 the "stem".  Thus, when the pattern `%.o' matches the file name
    6930 `test.o', the stem is `test'.  The pattern rule prerequisites are
    6931 turned into actual file names by substituting the stem for the character
    6932 `%'.  Thus, if in the same example one of the prerequisites is written
    6933 as `%.c', it expands to `test.c'.
    6934 
    6935    When the target pattern does not contain a slash (and it usually does
    6936 not), directory names in the file names are removed from the file name
    6937 before it is compared with the target prefix and suffix.  After the
    6938 comparison of the file name to the target pattern, the directory names,
    6939 along with the slash that ends them, are added on to the prerequisite
    6940 file names generated from the pattern rule's prerequisite patterns and
    6941 the file name. The directories are ignored only for the purpose of
    6942 finding an implicit rule to use, not in the application of that rule.
    6943 Thus, `e%t' matches the file name `src/eat', with `src/a' as the stem.
    6944 When prerequisites are turned into file names, the directories from the
    6945 stem are added at the front, while the rest of the stem is substituted
    6946 for the `%'.  The stem `src/a' with a prerequisite pattern `c%r' gives
    6947 the file name `src/car'.
    6948 
    6949 
    6950 File: make.info,  Node: Match-Anything Rules,  Next: Canceling Rules,  Prev: Pattern Match,  Up: Pattern Rules
    6951 
    6952 Match-Anything Pattern Rules
    6953 ----------------------------
    6954 
    6955 When a pattern rule's target is just `%', it matches any file name
    6956 whatever.  We call these rules "match-anything" rules.  They are very
    6957 useful, but it can take a lot of time for `make' to think about them,
    6958 because it must consider every such rule for each file name listed
    6959 either as a target or as a prerequisite.
    6960 
    6961    Suppose the makefile mentions `foo.c'.  For this target, `make'
    6962 would have to consider making it by linking an object file `foo.c.o',
    6963 or by C compilation-and-linking in one step from `foo.c.c', or by
    6964 Pascal compilation-and-linking from `foo.c.p', and many other
    6965 possibilities.
    6966 
    6967    We know these possibilities are ridiculous since `foo.c' is a C
    6968 source file, not an executable.  If `make' did consider these
    6969 possibilities, it would ultimately reject them, because files such as
    6970 `foo.c.o' and `foo.c.p' would not exist.  But these possibilities are so
    6971 numerous that `make' would run very slowly if it had to consider them.
    6972 
    6973    To gain speed, we have put various constraints on the way `make'
    6974 considers match-anything rules.  There are two different constraints
    6975 that can be applied, and each time you define a match-anything rule you
    6976 must choose one or the other for that rule.
    6977 
    6978    One choice is to mark the match-anything rule as "terminal" by
    6979 defining it with a double colon.  When a rule is terminal, it does not
    6980 apply unless its prerequisites actually exist.  Prerequisites that
    6981 could be made with other implicit rules are not good enough.  In other
    6982 words, no further chaining is allowed beyond a terminal rule.
    6983 
    6984    For example, the built-in implicit rules for extracting sources from
    6985 RCS and SCCS files are terminal; as a result, if the file `foo.c,v' does
    6986 not exist, `make' will not even consider trying to make it as an
    6987 intermediate file from `foo.c,v.o' or from `RCS/SCCS/s.foo.c,v'.  RCS
    6988 and SCCS files are generally ultimate source files, which should not be
    6989 remade from any other files; therefore, `make' can save time by not
    6990 looking for ways to remake them.
    6991 
    6992    If you do not mark the match-anything rule as terminal, then it is
    6993 nonterminal.  A nonterminal match-anything rule cannot apply to a file
    6994 name that indicates a specific type of data.  A file name indicates a
    6995 specific type of data if some non-match-anything implicit rule target
    6996 matches it.
    6997 
    6998    For example, the file name `foo.c' matches the target for the pattern
    6999 rule `%.c : %.y' (the rule to run Yacc).  Regardless of whether this
    7000 rule is actually applicable (which happens only if there is a file
    7001 `foo.y'), the fact that its target matches is enough to prevent
    7002 consideration of any nonterminal match-anything rules for the file
    7003 `foo.c'.  Thus, `make' will not even consider trying to make `foo.c' as
    7004 an executable file from `foo.c.o', `foo.c.c', `foo.c.p', etc.
    7005 
    7006    The motivation for this constraint is that nonterminal match-anything
    7007 rules are used for making files containing specific types of data (such
    7008 as executable files) and a file name with a recognized suffix indicates
    7009 some other specific type of data (such as a C source file).
    7010 
    7011    Special built-in dummy pattern rules are provided solely to recognize
    7012 certain file names so that nonterminal match-anything rules will not be
    7013 considered.  These dummy rules have no prerequisites and no commands,
    7014 and they are ignored for all other purposes.  For example, the built-in
    7015 implicit rule
    7016 
    7017      %.p :
    7018 
    7019 exists to make sure that Pascal source files such as `foo.p' match a
    7020 specific target pattern and thereby prevent time from being wasted
    7021 looking for `foo.p.o' or `foo.p.c'.
    7022 
    7023    Dummy pattern rules such as the one for `%.p' are made for every
    7024 suffix listed as valid for use in suffix rules (*note Old-Fashioned
    7025 Suffix Rules: Suffix Rules.).
    7026 
    7027 
    7028 File: make.info,  Node: Canceling Rules,  Prev: Match-Anything Rules,  Up: Pattern Rules
    7029 
    7030 Canceling Implicit Rules
    7031 ------------------------
    7032 
    7033 You can override a built-in implicit rule (or one you have defined
    7034 yourself) by defining a new pattern rule with the same target and
    7035 prerequisites, but different commands.  When the new rule is defined,
    7036 the built-in one is replaced.  The new rule's position in the sequence
    7037 of implicit rules is determined by where you write the new rule.
    7038 
    7039    You can cancel a built-in implicit rule by defining a pattern rule
    7040 with the same target and prerequisites, but no commands.  For example,
    7041 the following would cancel the rule that runs the assembler:
    7042 
    7043      %.o : %.s
    7044 
    7045 
    7046 File: make.info,  Node: Last Resort,  Next: Suffix Rules,  Prev: Pattern Rules,  Up: Implicit Rules
    7047 
    7048 Defining Last-Resort Default Rules
    7049 ==================================
    7050 
    7051 You can define a last-resort implicit rule by writing a terminal
    7052 match-anything pattern rule with no prerequisites (*note Match-Anything
    7053 Rules::).  This is just like any other pattern rule; the only thing
    7054 special about it is that it will match any target.  So such a rule's
    7055 commands are used for all targets and prerequisites that have no
    7056 commands of their own and for which no other implicit rule applies.
    7057 
    7058    For example, when testing a makefile, you might not care if the
    7059 source files contain real data, only that they exist.  Then you might
    7060 do this:
    7061 
    7062      %::
    7063              touch $@
    7064 
    7065 to cause all the source files needed (as prerequisites) to be created
    7066 automatically.
    7067 
    7068    You can instead define commands to be used for targets for which
    7069 there are no rules at all, even ones which don't specify commands.  You
    7070 do this by writing a rule for the target `.DEFAULT'.  Such a rule's
    7071 commands are used for all prerequisites which do not appear as targets
    7072 in any explicit rule, and for which no implicit rule applies.
    7073 Naturally, there is no `.DEFAULT' rule unless you write one.
    7074 
    7075    If you use `.DEFAULT' with no commands or prerequisites:
    7076 
    7077      .DEFAULT:
    7078 
    7079 the commands previously stored for `.DEFAULT' are cleared.  Then `make'
    7080 acts as if you had never defined `.DEFAULT' at all.
    7081 
    7082    If you do not want a target to get the commands from a match-anything
    7083 pattern rule or `.DEFAULT', but you also do not want any commands to be
    7084 run for the target, you can give it empty commands (*note Defining
    7085 Empty Commands: Empty Commands.).
    7086 
    7087    You can use a last-resort rule to override part of another makefile.
    7088 *Note Overriding Part of Another Makefile: Overriding Makefiles.
    7089 
    7090 
    7091 File: make.info,  Node: Suffix Rules,  Next: Implicit Rule Search,  Prev: Last Resort,  Up: Implicit Rules
    7092 
    7093 Old-Fashioned Suffix Rules
    7094 ==========================
    7095 
    7096 "Suffix rules" are the old-fashioned way of defining implicit rules for
    7097 `make'.  Suffix rules are obsolete because pattern rules are more
    7098 general and clearer.  They are supported in GNU `make' for
    7099 compatibility with old makefiles.  They come in two kinds:
    7100 "double-suffix" and "single-suffix".
    7101 
    7102    A double-suffix rule is defined by a pair of suffixes: the target
    7103 suffix and the source suffix.  It matches any file whose name ends with
    7104 the target suffix.  The corresponding implicit prerequisite is made by
    7105 replacing the target suffix with the source suffix in the file name.  A
    7106 two-suffix rule whose target and source suffixes are `.o' and `.c' is
    7107 equivalent to the pattern rule `%.o : %.c'.
    7108 
    7109    A single-suffix rule is defined by a single suffix, which is the
    7110 source suffix.  It matches any file name, and the corresponding implicit
    7111 prerequisite name is made by appending the source suffix.  A
    7112 single-suffix rule whose source suffix is `.c' is equivalent to the
    7113 pattern rule `% : %.c'.
    7114 
    7115    Suffix rule definitions are recognized by comparing each rule's
    7116 target against a defined list of known suffixes.  When `make' sees a
    7117 rule whose target is a known suffix, this rule is considered a
    7118 single-suffix rule.  When `make' sees a rule whose target is two known
    7119 suffixes concatenated, this rule is taken as a double-suffix rule.
    7120 
    7121    For example, `.c' and `.o' are both on the default list of known
    7122 suffixes.  Therefore, if you define a rule whose target is `.c.o',
    7123 `make' takes it to be a double-suffix rule with source suffix `.c' and
    7124 target suffix `.o'.  Here is the old-fashioned way to define the rule
    7125 for compiling a C source file:
    7126 
    7127      .c.o:
    7128              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    7129 
    7130    Suffix rules cannot have any prerequisites of their own.  If they
    7131 have any, they are treated as normal files with funny names, not as
    7132 suffix rules.  Thus, the rule:
    7133 
    7134      .c.o: foo.h
    7135              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    7136 
    7137 tells how to make the file `.c.o' from the prerequisite file `foo.h',
    7138 and is not at all like the pattern rule:
    7139 
    7140      %.o: %.c foo.h
    7141              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    7142 
    7143 which tells how to make `.o' files from `.c' files, and makes all `.o'
    7144 files using this pattern rule also depend on `foo.h'.
    7145 
    7146    Suffix rules with no commands are also meaningless.  They do not
    7147 remove previous rules as do pattern rules with no commands (*note
    7148 Canceling Implicit Rules: Canceling Rules.).  They simply enter the
    7149 suffix or pair of suffixes concatenated as a target in the data base.
    7150 
    7151    The known suffixes are simply the names of the prerequisites of the
    7152 special target `.SUFFIXES'.  You can add your own suffixes by writing a
    7153 rule for `.SUFFIXES' that adds more prerequisites, as in:
    7154 
    7155      .SUFFIXES: .hack .win
    7156 
    7157 which adds `.hack' and `.win' to the end of the list of suffixes.
    7158 
    7159    If you wish to eliminate the default known suffixes instead of just
    7160 adding to them, write a rule for `.SUFFIXES' with no prerequisites.  By
    7161 special dispensation, this eliminates all existing prerequisites of
    7162 `.SUFFIXES'.  You can then write another rule to add the suffixes you
    7163 want.  For example,
    7164 
    7165      .SUFFIXES:            # Delete the default suffixes
    7166      .SUFFIXES: .c .o .h   # Define our suffix list
    7167 
    7168    The `-r' or `--no-builtin-rules' flag causes the default list of
    7169 suffixes to be empty.
    7170 
    7171    The variable `SUFFIXES' is defined to the default list of suffixes
    7172 before `make' reads any makefiles.  You can change the list of suffixes
    7173 with a rule for the special target `.SUFFIXES', but that does not alter
    7174 this variable.
    7175 
  • trunk/src/gmake/doc/make.info-2

    r200 r503  
    1 This is ../../doc/make.info, produced by makeinfo version 4.6 from
    2 ../../doc/make.texi.
     1This is make.info, produced by makeinfo version 4.8 from make.texi.
     2
     3   This file documents the GNU `make' utility, which determines
     4automatically which pieces of a large program need to be recompiled,
     5and issues the commands to recompile them.
     6
     7   This is Edition 0.70, last updated 1 April 2006, of `The GNU Make
     8Manual', for GNU `make' version 3.81.
     9
     10   Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
     111997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
     12Foundation, Inc.
     13
     14     Permission is granted to copy, distribute and/or modify this
     15     document under the terms of the GNU Free Documentation License,
     16     Version 1.2 or any later version published by the Free Software
     17     Foundation; with no Invariant Sections, with the Front-Cover Texts
     18     being "A GNU Manual," and with the Back-Cover Texts as in (a)
     19     below.  A copy of the license is included in the section entitled
     20     "GNU Free Documentation License."
     21
     22     (a) The FSF's Back-Cover Text is: "You have freedom to copy and
     23     modify this GNU Manual, like GNU software.  Copies published by
     24     the Free Software Foundation raise funds for GNU development."
    325
    426INFO-DIR-SECTION GNU Packages
     
    729END-INFO-DIR-ENTRY
    830
    9    This file documents the GNU Make utility, which determines
    10 automatically which pieces of a large program need to be recompiled,
    11 and issues the commands to recompile them.
    12 
    13    This is Edition 0.61, last updated 02 May 2003, of `The GNU Make
    14 Manual', for `make', Version 3.81.
    15 
    16    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    17 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    18 
    19    Permission is granted to copy, distribute and/or modify this document
    20 under the terms of the GNU Free Documentation License, Version 1.1 or
    21 any later version published by the Free Software Foundation; with no
    22 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    23 Texts.  A copy of the license is included in the section entitled "GNU
    24 Free Documentation License".
     31
     32File: make.info,  Node: Pattern Rules,  Next: Last Resort,  Prev: Chained Rules,  Up: Implicit Rules
     33
     3410.5 Defining and Redefining Pattern Rules
     35==========================================
     36
     37You define an implicit rule by writing a "pattern rule".  A pattern
     38rule looks like an ordinary rule, except that its target contains the
     39character `%' (exactly one of them).  The target is considered a
     40pattern for matching file names; the `%' can match any nonempty
     41substring, while other characters match only themselves.  The
     42prerequisites likewise use `%' to show how their names relate to the
     43target name.
     44
     45   Thus, a pattern rule `%.o : %.c' says how to make any file `STEM.o'
     46from another file `STEM.c'.
     47
     48   Note that expansion using `%' in pattern rules occurs *after* any
     49variable or function expansions, which take place when the makefile is
     50read.  *Note How to Use Variables: Using Variables, and *Note Functions
     51for Transforming Text: Functions.
     52
     53* Menu:
     54
     55* Pattern Intro::               An introduction to pattern rules.
     56* Pattern Examples::            Examples of pattern rules.
     57* Automatic Variables::         How to use automatic variables in the
     58                                  commands of implicit rules.
     59* Pattern Match::               How patterns match.
     60* Match-Anything Rules::        Precautions you should take prior to
     61                                  defining rules that can match any
     62                                  target file whatever.
     63* Canceling Rules::             How to override or cancel built-in rules.
     64
     65
     66File: make.info,  Node: Pattern Intro,  Next: Pattern Examples,  Prev: Pattern Rules,  Up: Pattern Rules
     67
     6810.5.1 Introduction to Pattern Rules
     69------------------------------------
     70
     71A pattern rule contains the character `%' (exactly one of them) in the
     72target; otherwise, it looks exactly like an ordinary rule.  The target
     73is a pattern for matching file names; the `%' matches any nonempty
     74substring, while other characters match only themselves. 
     75
     76   For example, `%.c' as a pattern matches any file name that ends in
     77`.c'.  `s.%.c' as a pattern matches any file name that starts with
     78`s.', ends in `.c' and is at least five characters long.  (There must
     79be at least one character to match the `%'.)  The substring that the
     80`%' matches is called the "stem".
     81
     82   `%' in a prerequisite of a pattern rule stands for the same stem
     83that was matched by the `%' in the target.  In order for the pattern
     84rule to apply, its target pattern must match the file name under
     85consideration and all of its prerequisites (after pattern substitution)
     86must name files that exist or can be made.  These files become
     87prerequisites of the target. 
     88
     89   Thus, a rule of the form
     90
     91     %.o : %.c ; COMMAND...
     92
     93specifies how to make a file `N.o', with another file `N.c' as its
     94prerequisite, provided that `N.c' exists or can be made.
     95
     96   There may also be prerequisites that do not use `%'; such a
     97prerequisite attaches to every file made by this pattern rule.  These
     98unvarying prerequisites are useful occasionally.
     99
     100   A pattern rule need not have any prerequisites that contain `%', or
     101in fact any prerequisites at all.  Such a rule is effectively a general
     102wildcard.  It provides a way to make any file that matches the target
     103pattern.  *Note Last Resort::.
     104
     105   Pattern rules may have more than one target.  Unlike normal rules,
     106this does not act as many different rules with the same prerequisites
     107and commands.  If a pattern rule has multiple targets, `make' knows that
     108the rule's commands are responsible for making all of the targets.  The
     109commands are executed only once to make all the targets.  When searching
     110for a pattern rule to match a target, the target patterns of a rule
     111other than the one that matches the target in need of a rule are
     112incidental: `make' worries only about giving commands and prerequisites
     113to the file presently in question.  However, when this file's commands
     114are run, the other targets are marked as having been updated themselves. 
     115
     116   The order in which pattern rules appear in the makefile is important
     117since this is the order in which they are considered.  Of equally
     118applicable rules, only the first one found is used.  The rules you
     119write take precedence over those that are built in.  Note however, that
     120a rule whose prerequisites actually exist or are mentioned always takes
     121priority over a rule with prerequisites that must be made by chaining
     122other implicit rules. 
     123
     124
     125File: make.info,  Node: Pattern Examples,  Next: Automatic Variables,  Prev: Pattern Intro,  Up: Pattern Rules
     126
     12710.5.2 Pattern Rule Examples
     128----------------------------
     129
     130Here are some examples of pattern rules actually predefined in `make'.
     131First, the rule that compiles `.c' files into `.o' files:
     132
     133     %.o : %.c
     134             $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
     135
     136defines a rule that can make any file `X.o' from `X.c'.  The command
     137uses the automatic variables `$@' and `$<' to substitute the names of
     138the target file and the source file in each case where the rule applies
     139(*note Automatic Variables::).
     140
     141   Here is a second built-in rule:
     142
     143     % :: RCS/%,v
     144             $(CO) $(COFLAGS) $<
     145
     146defines a rule that can make any file `X' whatsoever from a
     147corresponding file `X,v' in the subdirectory `RCS'.  Since the target
     148is `%', this rule will apply to any file whatever, provided the
     149appropriate prerequisite file exists.  The double colon makes the rule
     150"terminal", which means that its prerequisite may not be an intermediate
     151file (*note Match-Anything Pattern Rules: Match-Anything Rules.).
     152
     153   This pattern rule has two targets:
     154
     155     %.tab.c %.tab.h: %.y
     156             bison -d $<
     157
     158This tells `make' that the command `bison -d X.y' will make both
     159`X.tab.c' and `X.tab.h'.  If the file `foo' depends on the files
     160`parse.tab.o' and `scan.o' and the file `scan.o' depends on the file
     161`parse.tab.h', when `parse.y' is changed, the command `bison -d parse.y'
     162will be executed only once, and the prerequisites of both `parse.tab.o'
     163and `scan.o' will be satisfied.  (Presumably the file `parse.tab.o'
     164will be recompiled from `parse.tab.c' and the file `scan.o' from
     165`scan.c', while `foo' is linked from `parse.tab.o', `scan.o', and its
     166other prerequisites, and it will execute happily ever after.)
     167
     168
     169File: make.info,  Node: Automatic Variables,  Next: Pattern Match,  Prev: Pattern Examples,  Up: Pattern Rules
     170
     17110.5.3 Automatic Variables
     172--------------------------
     173
     174Suppose you are writing a pattern rule to compile a `.c' file into a
     175`.o' file: how do you write the `cc' command so that it operates on the
     176right source file name?  You cannot write the name in the command,
     177because the name is different each time the implicit rule is applied.
     178
     179   What you do is use a special feature of `make', the "automatic
     180variables".  These variables have values computed afresh for each rule
     181that is executed, based on the target and prerequisites of the rule.
     182In this example, you would use `$@' for the object file name and `$<'
     183for the source file name.
     184
     185   It's very important that you recognize the limited scope in which
     186automatic variable values are available: they only have values within
     187the command script.  In particular, you cannot use them anywhere within
     188the target list of a rule; they have no value there and will expand to
     189the empty string.  Also, they cannot be accessed directly within the
     190prerequisite list of a rule.  A common mistake is attempting to use
     191`$@' within the prerequisites list; this will not work.  However, there
     192is a special feature of GNU `make', secondary expansion (*note
     193Secondary Expansion::), which will allow automatic variable values to
     194be used in prerequisite lists.
     195
     196   Here is a table of automatic variables:
     197
     198`$@'
     199     The file name of the target of the rule.  If the target is an
     200     archive member, then `$@' is the name of the archive file.  In a
     201     pattern rule that has multiple targets (*note Introduction to
     202     Pattern Rules: Pattern Intro.), `$@' is the name of whichever
     203     target caused the rule's commands to be run.
     204
     205`$%'
     206     The target member name, when the target is an archive member.
     207     *Note Archives::.  For example, if the target is `foo.a(bar.o)'
     208     then `$%' is `bar.o' and `$@' is `foo.a'.  `$%' is empty when the
     209     target is not an archive member.
     210
     211`$<'
     212     The name of the first prerequisite.  If the target got its
     213     commands from an implicit rule, this will be the first
     214     prerequisite added by the implicit rule (*note Implicit Rules::).
     215
     216`$?'
     217     The names of all the prerequisites that are newer than the target,
     218     with spaces between them.  For prerequisites which are archive
     219     members, only the member named is used (*note Archives::). 
     220
     221`$^'
     222     The names of all the prerequisites, with spaces between them.  For
     223     prerequisites which are archive members, only the member named is
     224     used (*note Archives::).  A target has only one prerequisite on
     225     each other file it depends on, no matter how many times each file
     226     is listed as a prerequisite.  So if you list a prerequisite more
     227     than once for a target, the value of `$^' contains just one copy
     228     of the name.  This list does *not* contain any of the order-only
     229     prerequisites; for those see the `$|' variable, below. 
     230
     231`$+'
     232     This is like `$^', but prerequisites listed more than once are
     233     duplicated in the order they were listed in the makefile.  This is
     234     primarily useful for use in linking commands where it is
     235     meaningful to repeat library file names in a particular order.
     236
     237`$|'
     238     The names of all the order-only prerequisites, with spaces between
     239     them.
     240
     241`$*'
     242     The stem with which an implicit rule matches (*note How Patterns
     243     Match: Pattern Match.).  If the target is `dir/a.foo.b' and the
     244     target pattern is `a.%.b' then the stem is `dir/foo'.  The stem is
     245     useful for constructing names of related files. 
     246
     247     In a static pattern rule, the stem is part of the file name that
     248     matched the `%' in the target pattern.
     249
     250     In an explicit rule, there is no stem; so `$*' cannot be determined
     251     in that way.  Instead, if the target name ends with a recognized
     252     suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is
     253     set to the target name minus the suffix.  For example, if the
     254     target name is `foo.c', then `$*' is set to `foo', since `.c' is a
     255     suffix.  GNU `make' does this bizarre thing only for compatibility
     256     with other implementations of `make'.  You should generally avoid
     257     using `$*' except in implicit rules or static pattern rules.
     258
     259     If the target name in an explicit rule does not end with a
     260     recognized suffix, `$*' is set to the empty string for that rule.
     261
     262   `$?' is useful even in explicit rules when you wish to operate on
     263only the prerequisites that have changed.  For example, suppose that an
     264archive named `lib' is supposed to contain copies of several object
     265files.  This rule copies just the changed object files into the archive:
     266
     267     lib: foo.o bar.o lose.o win.o
     268             ar r lib $?
     269
     270   Of the variables listed above, four have values that are single file
     271names, and three have values that are lists of file names.  These seven
     272have variants that get just the file's directory name or just the file
     273name within the directory.  The variant variables' names are formed by
     274appending `D' or `F', respectively.  These variants are semi-obsolete
     275in GNU `make' since the functions `dir' and `notdir' can be used to get
     276a similar effect (*note Functions for File Names: File Name
     277Functions.).  Note, however, that the `D' variants all omit the
     278trailing slash which always appears in the output of the `dir'
     279function.  Here is a table of the variants:
     280
     281`$(@D)'
     282     The directory part of the file name of the target, with the
     283     trailing slash removed.  If the value of `$@' is `dir/foo.o' then
     284     `$(@D)' is `dir'.  This value is `.' if `$@' does not contain a
     285     slash.
     286
     287`$(@F)'
     288     The file-within-directory part of the file name of the target.  If
     289     the value of `$@' is `dir/foo.o' then `$(@F)' is `foo.o'.  `$(@F)'
     290     is equivalent to `$(notdir $@)'.
     291
     292`$(*D)'
     293`$(*F)'
     294     The directory part and the file-within-directory part of the stem;
     295     `dir' and `foo' in this example.
     296
     297`$(%D)'
     298`$(%F)'
     299     The directory part and the file-within-directory part of the target
     300     archive member name.  This makes sense only for archive member
     301     targets of the form `ARCHIVE(MEMBER)' and is useful only when
     302     MEMBER may contain a directory name.  (*Note Archive Members as
     303     Targets: Archive Members.)
     304
     305`$(<D)'
     306`$(<F)'
     307     The directory part and the file-within-directory part of the first
     308     prerequisite.
     309
     310`$(^D)'
     311`$(^F)'
     312     Lists of the directory parts and the file-within-directory parts
     313     of all prerequisites.
     314
     315`$(+D)'
     316`$(+F)'
     317     Lists of the directory parts and the file-within-directory parts
     318     of all prerequisites, including multiple instances of duplicated
     319     prerequisites.
     320
     321`$(?D)'
     322`$(?F)'
     323     Lists of the directory parts and the file-within-directory parts of
     324     all prerequisites that are newer than the target.
     325
     326   Note that we use a special stylistic convention when we talk about
     327these automatic variables; we write "the value of `$<'", rather than
     328"the variable `<'" as we would write for ordinary variables such as
     329`objects' and `CFLAGS'.  We think this convention looks more natural in
     330this special case.  Please do not assume it has a deep significance;
     331`$<' refers to the variable named `<' just as `$(CFLAGS)' refers to the
     332variable named `CFLAGS'.  You could just as well use `$(<)' in place of
     333`$<'.
     334
     335
     336File: make.info,  Node: Pattern Match,  Next: Match-Anything Rules,  Prev: Automatic Variables,  Up: Pattern Rules
     337
     33810.5.4 How Patterns Match
     339-------------------------
     340
     341A target pattern is composed of a `%' between a prefix and a suffix,
     342either or both of which may be empty.  The pattern matches a file name
     343only if the file name starts with the prefix and ends with the suffix,
     344without overlap.  The text between the prefix and the suffix is called
     345the "stem".  Thus, when the pattern `%.o' matches the file name
     346`test.o', the stem is `test'.  The pattern rule prerequisites are
     347turned into actual file names by substituting the stem for the character
     348`%'.  Thus, if in the same example one of the prerequisites is written
     349as `%.c', it expands to `test.c'.
     350
     351   When the target pattern does not contain a slash (and it usually does
     352not), directory names in the file names are removed from the file name
     353before it is compared with the target prefix and suffix.  After the
     354comparison of the file name to the target pattern, the directory names,
     355along with the slash that ends them, are added on to the prerequisite
     356file names generated from the pattern rule's prerequisite patterns and
     357the file name.  The directories are ignored only for the purpose of
     358finding an implicit rule to use, not in the application of that rule.
     359Thus, `e%t' matches the file name `src/eat', with `src/a' as the stem.
     360When prerequisites are turned into file names, the directories from the
     361stem are added at the front, while the rest of the stem is substituted
     362for the `%'.  The stem `src/a' with a prerequisite pattern `c%r' gives
     363the file name `src/car'.
     364
     365
     366File: make.info,  Node: Match-Anything Rules,  Next: Canceling Rules,  Prev: Pattern Match,  Up: Pattern Rules
     367
     36810.5.5 Match-Anything Pattern Rules
     369-----------------------------------
     370
     371When a pattern rule's target is just `%', it matches any file name
     372whatever.  We call these rules "match-anything" rules.  They are very
     373useful, but it can take a lot of time for `make' to think about them,
     374because it must consider every such rule for each file name listed
     375either as a target or as a prerequisite.
     376
     377   Suppose the makefile mentions `foo.c'.  For this target, `make'
     378would have to consider making it by linking an object file `foo.c.o',
     379or by C compilation-and-linking in one step from `foo.c.c', or by
     380Pascal compilation-and-linking from `foo.c.p', and many other
     381possibilities.
     382
     383   We know these possibilities are ridiculous since `foo.c' is a C
     384source file, not an executable.  If `make' did consider these
     385possibilities, it would ultimately reject them, because files such as
     386`foo.c.o' and `foo.c.p' would not exist.  But these possibilities are so
     387numerous that `make' would run very slowly if it had to consider them.
     388
     389   To gain speed, we have put various constraints on the way `make'
     390considers match-anything rules.  There are two different constraints
     391that can be applied, and each time you define a match-anything rule you
     392must choose one or the other for that rule.
     393
     394   One choice is to mark the match-anything rule as "terminal" by
     395defining it with a double colon.  When a rule is terminal, it does not
     396apply unless its prerequisites actually exist.  Prerequisites that
     397could be made with other implicit rules are not good enough.  In other
     398words, no further chaining is allowed beyond a terminal rule.
     399
     400   For example, the built-in implicit rules for extracting sources from
     401RCS and SCCS files are terminal; as a result, if the file `foo.c,v' does
     402not exist, `make' will not even consider trying to make it as an
     403intermediate file from `foo.c,v.o' or from `RCS/SCCS/s.foo.c,v'.  RCS
     404and SCCS files are generally ultimate source files, which should not be
     405remade from any other files; therefore, `make' can save time by not
     406looking for ways to remake them.
     407
     408   If you do not mark the match-anything rule as terminal, then it is
     409nonterminal.  A nonterminal match-anything rule cannot apply to a file
     410name that indicates a specific type of data.  A file name indicates a
     411specific type of data if some non-match-anything implicit rule target
     412matches it.
     413
     414   For example, the file name `foo.c' matches the target for the pattern
     415rule `%.c : %.y' (the rule to run Yacc).  Regardless of whether this
     416rule is actually applicable (which happens only if there is a file
     417`foo.y'), the fact that its target matches is enough to prevent
     418consideration of any nonterminal match-anything rules for the file
     419`foo.c'.  Thus, `make' will not even consider trying to make `foo.c' as
     420an executable file from `foo.c.o', `foo.c.c', `foo.c.p', etc.
     421
     422   The motivation for this constraint is that nonterminal match-anything
     423rules are used for making files containing specific types of data (such
     424as executable files) and a file name with a recognized suffix indicates
     425some other specific type of data (such as a C source file).
     426
     427   Special built-in dummy pattern rules are provided solely to recognize
     428certain file names so that nonterminal match-anything rules will not be
     429considered.  These dummy rules have no prerequisites and no commands,
     430and they are ignored for all other purposes.  For example, the built-in
     431implicit rule
     432
     433     %.p :
     434
     435exists to make sure that Pascal source files such as `foo.p' match a
     436specific target pattern and thereby prevent time from being wasted
     437looking for `foo.p.o' or `foo.p.c'.
     438
     439   Dummy pattern rules such as the one for `%.p' are made for every
     440suffix listed as valid for use in suffix rules (*note Old-Fashioned
     441Suffix Rules: Suffix Rules.).
     442
     443
     444File: make.info,  Node: Canceling Rules,  Prev: Match-Anything Rules,  Up: Pattern Rules
     445
     44610.5.6 Canceling Implicit Rules
     447-------------------------------
     448
     449You can override a built-in implicit rule (or one you have defined
     450yourself) by defining a new pattern rule with the same target and
     451prerequisites, but different commands.  When the new rule is defined,
     452the built-in one is replaced.  The new rule's position in the sequence
     453of implicit rules is determined by where you write the new rule.
     454
     455   You can cancel a built-in implicit rule by defining a pattern rule
     456with the same target and prerequisites, but no commands.  For example,
     457the following would cancel the rule that runs the assembler:
     458
     459     %.o : %.s
     460
     461
     462File: make.info,  Node: Last Resort,  Next: Suffix Rules,  Prev: Pattern Rules,  Up: Implicit Rules
     463
     46410.6 Defining Last-Resort Default Rules
     465=======================================
     466
     467You can define a last-resort implicit rule by writing a terminal
     468match-anything pattern rule with no prerequisites (*note Match-Anything
     469Rules::).  This is just like any other pattern rule; the only thing
     470special about it is that it will match any target.  So such a rule's
     471commands are used for all targets and prerequisites that have no
     472commands of their own and for which no other implicit rule applies.
     473
     474   For example, when testing a makefile, you might not care if the
     475source files contain real data, only that they exist.  Then you might
     476do this:
     477
     478     %::
     479             touch $@
     480
     481to cause all the source files needed (as prerequisites) to be created
     482automatically.
     483
     484   You can instead define commands to be used for targets for which
     485there are no rules at all, even ones which don't specify commands.  You
     486do this by writing a rule for the target `.DEFAULT'.  Such a rule's
     487commands are used for all prerequisites which do not appear as targets
     488in any explicit rule, and for which no implicit rule applies.
     489Naturally, there is no `.DEFAULT' rule unless you write one.
     490
     491   If you use `.DEFAULT' with no commands or prerequisites:
     492
     493     .DEFAULT:
     494
     495the commands previously stored for `.DEFAULT' are cleared.  Then `make'
     496acts as if you had never defined `.DEFAULT' at all.
     497
     498   If you do not want a target to get the commands from a match-anything
     499pattern rule or `.DEFAULT', but you also do not want any commands to be
     500run for the target, you can give it empty commands (*note Defining
     501Empty Commands: Empty Commands.).
     502
     503   You can use a last-resort rule to override part of another makefile.
     504*Note Overriding Part of Another Makefile: Overriding Makefiles.
     505
     506
     507File: make.info,  Node: Suffix Rules,  Next: Implicit Rule Search,  Prev: Last Resort,  Up: Implicit Rules
     508
     50910.7 Old-Fashioned Suffix Rules
     510===============================
     511
     512"Suffix rules" are the old-fashioned way of defining implicit rules for
     513`make'.  Suffix rules are obsolete because pattern rules are more
     514general and clearer.  They are supported in GNU `make' for
     515compatibility with old makefiles.  They come in two kinds:
     516"double-suffix" and "single-suffix".
     517
     518   A double-suffix rule is defined by a pair of suffixes: the target
     519suffix and the source suffix.  It matches any file whose name ends with
     520the target suffix.  The corresponding implicit prerequisite is made by
     521replacing the target suffix with the source suffix in the file name.  A
     522two-suffix rule whose target and source suffixes are `.o' and `.c' is
     523equivalent to the pattern rule `%.o : %.c'.
     524
     525   A single-suffix rule is defined by a single suffix, which is the
     526source suffix.  It matches any file name, and the corresponding implicit
     527prerequisite name is made by appending the source suffix.  A
     528single-suffix rule whose source suffix is `.c' is equivalent to the
     529pattern rule `% : %.c'.
     530
     531   Suffix rule definitions are recognized by comparing each rule's
     532target against a defined list of known suffixes.  When `make' sees a
     533rule whose target is a known suffix, this rule is considered a
     534single-suffix rule.  When `make' sees a rule whose target is two known
     535suffixes concatenated, this rule is taken as a double-suffix rule.
     536
     537   For example, `.c' and `.o' are both on the default list of known
     538suffixes.  Therefore, if you define a rule whose target is `.c.o',
     539`make' takes it to be a double-suffix rule with source suffix `.c' and
     540target suffix `.o'.  Here is the old-fashioned way to define the rule
     541for compiling a C source file:
     542
     543     .c.o:
     544             $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
     545
     546   Suffix rules cannot have any prerequisites of their own.  If they
     547have any, they are treated as normal files with funny names, not as
     548suffix rules.  Thus, the rule:
     549
     550     .c.o: foo.h
     551             $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
     552
     553tells how to make the file `.c.o' from the prerequisite file `foo.h',
     554and is not at all like the pattern rule:
     555
     556     %.o: %.c foo.h
     557             $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
     558
     559which tells how to make `.o' files from `.c' files, and makes all `.o'
     560files using this pattern rule also depend on `foo.h'.
     561
     562   Suffix rules with no commands are also meaningless.  They do not
     563remove previous rules as do pattern rules with no commands (*note
     564Canceling Implicit Rules: Canceling Rules.).  They simply enter the
     565suffix or pair of suffixes concatenated as a target in the data base.
     566
     567   The known suffixes are simply the names of the prerequisites of the
     568special target `.SUFFIXES'.  You can add your own suffixes by writing a
     569rule for `.SUFFIXES' that adds more prerequisites, as in:
     570
     571     .SUFFIXES: .hack .win
     572
     573which adds `.hack' and `.win' to the end of the list of suffixes.
     574
     575   If you wish to eliminate the default known suffixes instead of just
     576adding to them, write a rule for `.SUFFIXES' with no prerequisites.  By
     577special dispensation, this eliminates all existing prerequisites of
     578`.SUFFIXES'.  You can then write another rule to add the suffixes you
     579want.  For example,
     580
     581     .SUFFIXES:            # Delete the default suffixes
     582     .SUFFIXES: .c .o .h   # Define our suffix list
     583
     584   The `-r' or `--no-builtin-rules' flag causes the default list of
     585suffixes to be empty.
     586
     587   The variable `SUFFIXES' is defined to the default list of suffixes
     588before `make' reads any makefiles.  You can change the list of suffixes
     589with a rule for the special target `.SUFFIXES', but that does not alter
     590this variable.
    25591
    26592
    27593File: make.info,  Node: Implicit Rule Search,  Prev: Suffix Rules,  Up: Implicit Rules
    28594
    29 Implicit Rule Search Algorithm
    30 ==============================
     59510.8 Implicit Rule Search Algorithm
     596===================================
    31597
    32598Here is the procedure `make' uses for searching for an implicit rule
     
    110676File: make.info,  Node: Archives,  Next: Features,  Prev: Implicit Rules,  Up: Top
    111677
    112 Using `make' to Update Archive Files
    113 ************************************
     67811 Using `make' to Update Archive Files
     679***************************************
    114680
    115681"Archive files" are files containing named subfiles called "members";
     
    128694File: make.info,  Node: Archive Members,  Next: Archive Update,  Prev: Archives,  Up: Archives
    129695
    130 Archive Members as Targets
    131 ==========================
     69611.1 Archive Members as Targets
     697===============================
    132698
    133699An individual member of an archive file can be used as a target or
     
    149715
    150716   In fact, nearly all archive member targets are updated in just this
    151 way and there is an implicit rule to do it for you.  *Note:* The `c'
    152 flag to `ar' is required if the archive file does not already exist.
     717way and there is an implicit rule to do it for you.  *Please note:* The
     718`c' flag to `ar' is required if the archive file does not already exist.
    153719
    154720   To specify several members in the same archive, you can write all the
     
    170736File: make.info,  Node: Archive Update,  Next: Archive Pitfalls,  Prev: Archive Members,  Up: Archives
    171737
    172 Implicit Rule for Archive Member Targets
    173 ========================================
     73811.2 Implicit Rule for Archive Member Targets
     739=============================================
    174740
    175741Recall that a target that looks like `A(M)' stands for the member named
     
    220786File: make.info,  Node: Archive Symbols,  Prev: Archive Update,  Up: Archive Update
    221787
    222 Updating Archive Symbol Directories
    223 -----------------------------------
     78811.2.1 Updating Archive Symbol Directories
     789------------------------------------------
    224790
    225791An archive file that is used as a library usually contains a special
     
    251817File: make.info,  Node: Archive Pitfalls,  Next: Archive Suffix Rules,  Prev: Archive Update,  Up: Archives
    252818
    253 Dangers When Using Archives
    254 ===========================
     81911.3 Dangers When Using Archives
     820================================
    255821
    256822It is important to be careful when using parallel execution (the `-j'
     
    267833File: make.info,  Node: Archive Suffix Rules,  Prev: Archive Pitfalls,  Up: Archives
    268834
    269 Suffix Rules for Archive Files
    270 ==============================
     83511.4 Suffix Rules for Archive Files
     836===================================
    271837
    272838You can write a special kind of suffix rule for dealing with archive
     
    306872File: make.info,  Node: Features,  Next: Missing,  Prev: Archives,  Up: Top
    307873
    308 Features of GNU `make'
    309 **********************
     87412 Features of GNU `make'
     875*************************
    310876
    311877Here is a summary of the features of GNU `make', for comparison with
     
    5001066
    5011067   * The built-in variable `MAKE_VERSION' gives the version number of
    502      `make'.
     1068     `make'. 
    5031069
    5041070
    5051071File: make.info,  Node: Missing,  Next: Makefile Conventions,  Prev: Features,  Up: Top
    5061072
    507 Incompatibilities and Missing Features
    508 **************************************
     107313 Incompatibilities and Missing Features
     1074*****************************************
    5091075
    5101076The `make' programs in various other systems support a few features
     
    5461112     imagine what went on in the minds of Unix `make' developers to do
    5471113     this; it is utterly inconsistent with the normal definition of
    548      `$*'.
     1114     `$*'. 
    5491115
    5501116   * In some Unix `make's, implicit rule search (*note Using Implicit
     
    5901156File: make.info,  Node: Makefile Conventions,  Next: Quick Reference,  Prev: Missing,  Up: Top
    5911157
    592 Makefile Conventions
    593 ********************
     115814 Makefile Conventions
     1159***********************
    5941160
    5951161This node describes conventions for writing the Makefiles for GNU
     
    6101176File: make.info,  Node: Makefile Basics,  Next: Utilities in Makefiles,  Up: Makefile Conventions
    6111177
    612 General Conventions for Makefiles
    613 =================================
     117814.1 General Conventions for Makefiles
     1179======================================
    6141180
    6151181Every Makefile should contain this line:
     
    6901256File: make.info,  Node: Utilities in Makefiles,  Next: Command Variables,  Prev: Makefile Basics,  Up: Makefile Conventions
    6911257
    692 Utilities in Makefiles
    693 ======================
     125814.2 Utilities in Makefiles
     1259===========================
    6941260
    6951261Write the Makefile commands (and any shell scripts, such as
     
    7451311File: make.info,  Node: Command Variables,  Next: Directory Variables,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
    7461312
    747 Variables for Specifying Commands
    748 =================================
     131314.3 Variables for Specifying Commands
     1314======================================
    7491315
    7501316Makefiles should provide variables for overriding certain commands,
     
    8251391File: make.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: Command Variables,  Up: Makefile Conventions
    8261392
    827 Variables for Installation Directories
    828 ======================================
     139314.4 Variables for Installation Directories
     1394===========================================
    8291395
    8301396Installation directories should always be named by variables, so it is
    8311397easy to install in a nonstandard place.  The standard names for these
    832 variables are described below.  They are based on a standard filesystem
    833 layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4,
    834 and other modern operating systems.
     1398variables and the values they should have in GNU packages are described
     1399below.  They are based on a standard filesystem layout; variants of it
     1400are used in GNU/Linux and other modern operating systems.
     1401
     1402   Installers are expected to override these values when calling `make'
     1403(e.g., `make prefix=/usr install' or `configure' (e.g., `configure
     1404--prefix=/usr').  GNU packages should not try to guess which value
     1405should be appropriate for these variables on the system they are being
     1406installed onto: use the default settings specified here so that all GNU
     1407packages behave identically, allowing the installer to achieve any
     1408desired layout.
    8351409
    8361410   These two variables set the root for the installation.  All the other
     
    8851459     (If you are using Autoconf, write it as `@libexecdir@'.)
    8861460
     1461     The definition of `libexecdir' is the same for all packages, so
     1462     you should install your data in a subdirectory thereof.  Most
     1463     packages install their data under `$(libexecdir)/PACKAGE-NAME/',
     1464     possibly within additional subdirectories thereof, such as
     1465     `$(libexecdir)/PACKAGE-NAME/MACHINE/VERSION'.
     1466
    8871467   Data files used by the program during its execution are divided into
    8881468categories in two ways.
     
    9011481architecture-independent, and it is generally not hard.
    9021482
    903    Therefore, here are the variables Makefiles should use to specify
    904 directories:
     1483   Here are the variables Makefiles should use to specify directories
     1484to put these various kinds of files in:
     1485
     1486`datarootdir'
     1487     The root of the directory tree for read-only
     1488     architecture-independent data files.  This should normally be
     1489     `/usr/local/share', but write it as `$(prefix)/share'.  (If you
     1490     are using Autoconf, write it as `@datarootdir@'.)  `datadir''s
     1491     default value is based on this variable; so are `infodir',
     1492     `mandir', and others.
    9051493
    9061494`datadir'
    907      The directory for installing read-only architecture independent
    908      data files.  This should normally be `/usr/local/share', but write
    909      it as `$(prefix)/share'.  (If you are using Autoconf, write it as
    910      `@datadir@'.)  As a special exception, see `$(infodir)' and
    911      `$(includedir)' below.
     1495     The directory for installing idiosyncratic read-only
     1496     architecture-independent data files for this program.  This is
     1497     usually the same place as `datarootdir', but we use the two
     1498     separate variables so that you can move these program-specific
     1499     files without altering the location for Info files, man pages, etc.
     1500
     1501     This should normally be `/usr/local/share', but write it as
     1502     `$(datarootdir)'.  (If you are using Autoconf, write it as
     1503     `@datadir@'.)
     1504
     1505     The definition of `datadir' is the same for all packages, so you
     1506     should install your data in a subdirectory thereof.  Most packages
     1507     install their data under `$(datadir)/PACKAGE-NAME/'.
    9121508
    9131509`sysconfdir'
     
    9421538     `@localstatedir@'.)
    9431539
    944 `libdir'
    945      The directory for object files and libraries of object code.  Do
    946      not install executables here, they probably ought to go in
    947      `$(libexecdir)' instead.  The value of `libdir' should normally be
    948      `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
    949      are using Autoconf, write it as `@libdir@'.)
    950 
    951 `infodir'
    952      The directory for installing the Info files for this package.  By
    953      default, it should be `/usr/local/info', but it should be written
    954      as `$(prefix)/info'.  (If you are using Autoconf, write it as
    955      `@infodir@'.)
    956 
    957 `lispdir'
    958      The directory for installing any Emacs Lisp files in this package.
    959      By default, it should be `/usr/local/share/emacs/site-lisp', but
    960      it should be written as `$(prefix)/share/emacs/site-lisp'.
    961 
    962      If you are using Autoconf, write the default as `@lispdir@'.  In
    963      order to make `@lispdir@' work, you need the following lines in
    964      your `configure.in' file:
    965 
    966           lispdir='${datadir}/emacs/site-lisp'
    967           AC_SUBST(lispdir)
     1540   These variables specify the directory for installing certain specific
     1541types of files, if your program has them.  Every GNU package should
     1542have Info files, so every program needs `infodir', but not all need
     1543`libdir' or `lispdir'.
    9681544
    9691545`includedir'
     
    10011577     string in the file--part of a comment--and `grep' for that string.
    10021578
     1579`docdir'
     1580     The directory for installing documentation files (other than Info)
     1581     for this package.  By default, it should be
     1582     `/usr/local/share/doc/YOURPKG', but it should be written as
     1583     `$(datarootdir)/doc/YOURPKG'.  (If you are using Autoconf, write
     1584     it as `@docdir@'.)  The YOURPKG subdirectory, which may include a
     1585     version number, prevents collisions among files with common names,
     1586     such as `README'.
     1587
     1588`infodir'
     1589     The directory for installing the Info files for this package.  By
     1590     default, it should be `/usr/local/share/info', but it should be
     1591     written as `$(datarootdir)/info'.  (If you are using Autoconf,
     1592     write it as `@infodir@'.)  `infodir' is separate from `docdir' for
     1593     compatibility with existing practice.
     1594
     1595`htmldir'
     1596`dvidir'
     1597`pdfdir'
     1598`psdir'
     1599     Directories for installing documentation files in the particular
     1600     format.  (It is not required to support documentation in all these
     1601     formats.)  They should all be set to `$(docdir)' by default.  (If
     1602     you are using Autoconf, write them as `@htmldir@', `@dvidir@',
     1603     etc.)  Packages which supply several translations of their
     1604     documentation should install them in `$(htmldir)/'LL,
     1605     `$(pdfdir)/'LL, etc. where LL is a locale abbreviation such as
     1606     `en' or `pt_BR'.
     1607
     1608`libdir'
     1609     The directory for object files and libraries of object code.  Do
     1610     not install executables here, they probably ought to go in
     1611     `$(libexecdir)' instead.  The value of `libdir' should normally be
     1612     `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
     1613     are using Autoconf, write it as `@libdir@'.)
     1614
     1615`lispdir'
     1616     The directory for installing any Emacs Lisp files in this package.
     1617     By default, it should be `/usr/local/share/emacs/site-lisp', but
     1618     it should be written as `$(datarootdir)/emacs/site-lisp'.
     1619
     1620     If you are using Autoconf, write the default as `@lispdir@'.  In
     1621     order to make `@lispdir@' work, you need the following lines in
     1622     your `configure.in' file:
     1623
     1624          lispdir='${datarootdir}/emacs/site-lisp'
     1625          AC_SUBST(lispdir)
     1626
     1627`localedir'
     1628     The directory for installing locale-specific message catalogs for
     1629     this package.  By default, it should be `/usr/local/share/locale',
     1630     but it should be written as `$(datarootdir)/locale'.  (If you are
     1631     using Autoconf, write it as `@localedir@'.)  This directory
     1632     usually has a subdirectory per locale.
     1633
    10031634   Unix-style man pages are installed in one of the following:
    10041635
    10051636`mandir'
    10061637     The top-level directory for installing the man pages (if any) for
    1007      this package.  It will normally be `/usr/local/man', but you should
    1008      write it as `$(prefix)/man'.  (If you are using Autoconf, write it
    1009      as `@mandir@'.)
     1638     this package.  It will normally be `/usr/local/share/man', but you
     1639     should write it as `$(datarootdir)/man'.  (If you are using
     1640     Autoconf, write it as `@mandir@'.)
    10101641
    10111642`man1dir'
     
    10501681     # NOTE: This directory must exist when you start the install.
    10511682     prefix = /usr/local
     1683     datarootdir = $(prefix)/share
     1684     datadir = $(datarootdir)
    10521685     exec_prefix = $(prefix)
    10531686     # Where to put the executable for the command `gcc'.
     
    10561689     libexecdir = $(exec_prefix)/libexec
    10571690     # Where to put the Info files.
    1058      infodir = $(prefix)/info
     1691     infodir = $(datarootdir)/info
    10591692
    10601693   If your program installs a large number of files into one of the
     
    10731706File: make.info,  Node: Standard Targets,  Next: Install Command Categories,  Prev: Directory Variables,  Up: Makefile Conventions
    10741707
    1075 Standard Targets for Users
    1076 ==========================
     170814.5 Standard Targets for Users
     1709===============================
    10771710
    10781711All GNU programs should have the following targets in their Makefiles:
     
    11431776     Categories::.
    11441777
     1778`install-html'
     1779`install-dvi'
     1780`install-pdf'
     1781`install-ps'
     1782     These targets install documentation in formats other than Info;
     1783     they're intended to be called explicitly by the person installing
     1784     the package, if that format is desired.  GNU prefers Info files,
     1785     so these must be installed by the `install' target.
     1786
     1787     When you have many documentation files to install, we recommend
     1788     that you avoid collisions and clutter by arranging for these
     1789     targets to install in subdirectories of the appropriate
     1790     installation directory, such as `htmldir'.  As one example, if
     1791     your package has multiple manuals, and you wish to install HTML
     1792     documentation with many files (such as the "split" mode output by
     1793     `makeinfo --html'), you'll certainly want to use subdirectories,
     1794     or two nodes with the same name in different manuals will
     1795     overwrite each other.
     1796
    11451797`uninstall'
    1146      Delete all the installed files--the copies that the `install'
    1147      target creates.
     1798     Delete all the installed files--the copies that the `install' and
     1799     `install-*' targets create.
    11481800
    11491801     This rule should not modify the directories where compilation is
     
    11771829
    11781830`clean'
    1179      Delete all files from the current directory that are normally
    1180      created by building the program.  Don't delete the files that
    1181      record the configuration.  Also preserve files that could be made
    1182      by building, but normally aren't because the distribution comes
    1183      with them.
     1831     Delete all files in the current directory that are normally
     1832     created by building the program.  Also delete files in other
     1833     directories if they are created by this makefile.  However, don't
     1834     delete the files that record the configuration.  Also preserve
     1835     files that could be made by building, but normally aren't because
     1836     the distribution comes with them.  There is no need to delete
     1837     parent directories that were created with `mkdir -p', since they
     1838     could have existed anyway.
    11841839
    11851840     Delete `.dvi' files here if they are not part of the distribution.
    11861841
    11871842`distclean'
    1188      Delete all files from the current directory that are created by
    1189      configuring or building the program.  If you have unpacked the
    1190      source and built the program without creating any other files,
    1191      `make distclean' should leave only the files that were in the
    1192      distribution.
     1843     Delete all files in the current directory (or created by this
     1844     makefile) that are created by configuring or building the program.
     1845     If you have unpacked the source and built the program without
     1846     creating any other files, `make distclean' should leave only the
     1847     files that were in the distribution.  However, there is no need to
     1848     delete parent directories that were created with `mkdir -p', since
     1849     they could have existed anyway.
    11931850
    11941851`mostlyclean'
     
    11991856
    12001857`maintainer-clean'
    1201      Delete almost everything from the current directory that can be
    1202      reconstructed with this Makefile.  This typically includes
    1203      everything deleted by `distclean', plus more: C source files
    1204      produced by Bison, tags tables, Info files, and so on.
     1858     Delete almost everything that can be reconstructed with this
     1859     Makefile.  This typically includes everything deleted by
     1860     `distclean', plus more: C source files produced by Bison, tags
     1861     tables, Info files, and so on.
    12051862
    12061863     The reason we say "almost everything" is that running the command
     
    12091866     generally, `make maintainer-clean' should not delete anything that
    12101867     needs to exist in order to run `configure' and then begin to build
    1211      the program.  This is the only exception; `maintainer-clean' should
     1868     the program.  Also, there is no need to delete parent directories
     1869     that were created with `mkdir -p', since they could have existed
     1870     anyway.  These are the only exceptions; `maintainer-clean' should
    12121871     delete everything else that can be rebuilt.
    12131872
     
    12341893
    12351894          info: foo.info
    1236          
     1895
    12371896          foo.info: foo.texi chap1.texi chap2.texi
    12381897                  $(MAKEINFO) $(srcdir)/foo.texi
     
    12491908
    12501909`dvi'
    1251      Generate DVI files for all Texinfo documentation.  For example:
     1910`html'
     1911`pdf'
     1912`ps'
     1913     Generate documentation files in the given format, if possible.
     1914     Here's an example rule for generating DVI files from Texinfo:
    12521915
    12531916          dvi: foo.dvi
    1254          
     1917
    12551918          foo.dvi: foo.texi chap1.texi chap2.texi
    12561919                  $(TEXI2DVI) $(srcdir)/foo.texi
     
    12601923     distribution.(1)  Alternatively, write just the dependencies, and
    12611924     allow GNU `make' to provide the command.
     1925
     1926     Here's another example, this one for generating HTML from Texinfo:
     1927
     1928          html: foo.html
     1929
     1930          foo.html: foo.texi chap1.texi chap2.texi
     1931                  $(TEXI2HTML) $(srcdir)/foo.texi
     1932
     1933     Again, you would define the variable `TEXI2HTML' in the Makefile;
     1934     for example, it might run `makeinfo --no-split --html' (`makeinfo'
     1935     is part of the Texinfo distribution).
    12621936
    12631937`dist'
     
    13302004File: make.info,  Node: Install Command Categories,  Prev: Standard Targets,  Up: Makefile Conventions
    13312005
    1332 Install Command Categories
    1333 ==========================
     200614.6 Install Command Categories
     2007===============================
    13342008
    13352009When writing the `install' target, you must classify all the commands
     
    14162090   Programs to build binary packages work by extracting the
    14172091pre-installation and post-installation commands.  Here is one way of
    1418 extracting the pre-installation commands:
    1419 
    1420      make -n install -o all \
     2092extracting the pre-installation commands (the `-s' option to `make' is
     2093needed to silence messages about entering subdirectories):
     2094
     2095     make -s -n install -o all \
    14212096           PRE_INSTALL=pre-install \
    14222097           POST_INSTALL=post-install \
     
    14262101where the file `pre-install.awk' could contain this:
    14272102
    1428      $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0}
     2103     $0 ~ /^(normal-install|post-install)[ \t]*$/ {on = 0}
    14292104     on {print $0}
    1430      $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1}
    1431 
    1432    The resulting file of pre-installation commands is executed as a
    1433 shell script as part of installing the binary package.
     2105     $0 ~ /^pre-install[ \t]*$/ {on = 1}
    14342106
    14352107
    14362108File: make.info,  Node: Quick Reference,  Next: Error Messages,  Prev: Makefile Conventions,  Up: Top
    14372109
    1438 Quick Reference
    1439 ***************
     2110Appendix A Quick Reference
     2111**************************
    14402112
    14412113This appendix summarizes the directives, text manipulation functions,
     
    15052177     directive.
    15062178
    1507    Here is a summary of the text manipulation functions (*note
    1508 Functions::):
     2179   Here is a summary of the built-in functions (*note Functions::):
    15092180
    15102181`$(subst FROM,TO,TEXT)'
     
    15432214     Functions.
    15442215
     2216`$(word N,TEXT)'
     2217     Extract the Nth word (one-origin) of TEXT.
     2218     *Note Functions for String Substitution and Analysis: Text
     2219     Functions.
     2220
     2221`$(words TEXT)'
     2222     Count the number of words in TEXT.
     2223     *Note Functions for String Substitution and Analysis: Text
     2224     Functions.
     2225
     2226`$(wordlist S,E,TEXT)'
     2227     Returns the list of words in TEXT from S to E.
     2228     *Note Functions for String Substitution and Analysis: Text
     2229     Functions.
     2230
     2231`$(firstword NAMES...)'
     2232     Extract the first word of NAMES.
     2233     *Note Functions for String Substitution and Analysis: Text
     2234     Functions.
     2235
     2236`$(lastword NAMES...)'
     2237     Extract the last word of NAMES.
     2238     *Note Functions for String Substitution and Analysis: Text
     2239     Functions.
     2240
    15452241`$(dir NAMES...)'
    15462242     Extract the directory part of each file name.
     
    15722268     *Note Functions for File Names: File Name Functions.
    15732269
    1574 `$(word N,TEXT)'
    1575      Extract the Nth word (one-origin) of TEXT.
    1576      *Note Functions for File Names: File Name Functions.
    1577 
    1578 `$(words TEXT)'
    1579      Count the number of words in TEXT.
    1580      *Note Functions for File Names: File Name Functions.
    1581 
    1582 `$(wordlist S,E,TEXT)'
    1583      Returns the list of words in TEXT from S to E.
    1584      *Note Functions for File Names: File Name Functions.
    1585 
    1586 `$(firstword NAMES...)'
    1587      Extract the first word of NAMES.
    1588      *Note Functions for File Names: File Name Functions.
    1589 
    15902270`$(wildcard PATTERN...)'
    15912271     Find file names matching a shell file name pattern (_not_ a `%'
     
    15932273     *Note The Function `wildcard': Wildcard Function.
    15942274
     2275`$(realpath NAMES...)'
     2276     For each file name in NAMES, expand to an absolute name that does
     2277     not contain any `.', `..', nor symlinks.
     2278     *Note Functions for File Names: File Name Functions.
     2279
     2280`$(abspath NAMES...)'
     2281     For each file name in NAMES, expand to an absolute name that does
     2282     not contain any `.' or `..' components, but preserves symlinks.
     2283     *Note Functions for File Names: File Name Functions.
     2284
    15952285`$(error TEXT...)'
    15962286     When this function is evaluated, `make' generates a fatal error
     
    16112301     defined.
    16122302     *Note The `origin' Function: Origin Function.
     2303
     2304`$(flavor VARIABLE)'
     2305     Return a string describing the flavor of the `make' variable
     2306     VARIABLE.
     2307     *Note The `flavor' Function: Flavor Function.
    16132308
    16142309`$(foreach VAR,WORDS,TEXT)'
     
    17022397     `/bin/sh'.  You can set `SHELL' in the makefile to change the
    17032398     shell used to run commands.  *Note Command Execution: Execution.
     2399     The `SHELL' variable is handled specially when importing from and
     2400     exporting to the environment.  *Note Choosing the Shell::.
    17042401
    17052402`MAKESHELL'
    17062403     On MS-DOS only, the name of the command interpreter that is to be
    1707      used by `make'. This value takes precedence over the value of
     2404     used by `make'.  This value takes precedence over the value of
    17082405     `SHELL'.  *Note MAKESHELL variable: Execution.
    17092406
     
    17492446File: make.info,  Node: Error Messages,  Next: Complex Makefile,  Prev: Quick Reference,  Up: Top
    17502447
    1751 Errors Generated by Make
    1752 ************************
     2448Appendix B Errors Generated by Make
     2449***********************************
    17532450
    17542451Here is a list of the more common errors you might see generated by
     
    18232520     on the command line, and `make' couldn't find any makefiles to
    18242521     read in.  The latter means that some makefile was found, but it
    1825      didn't contain any default target and none was given on the
    1826      command line.  GNU `make' has nothing to do in these situations.
    1827      *Note Arguments to Specify the Makefile: Makefile Arguments.
     2522     didn't contain any default goal and none was given on the command
     2523     line.  GNU `make' has nothing to do in these situations.  *Note
     2524     Arguments to Specify the Makefile: Makefile Arguments.
    18282525
    18292526`Makefile `XXX' was not found.'
     
    19022599File: make.info,  Node: Complex Makefile,  Next: GNU Free Documentation License,  Prev: Error Messages,  Up: Top
    19032600
    1904 Complex Makefile Example
    1905 ************************
     2601Appendix C Complex Makefile Example
     2602***********************************
    19062603
    19072604Here is the makefile for the GNU `tar' program.  This is a moderately
     
    19392636     # Un*x Makefile for GNU tar program.
    19402637     # Copyright (C) 1991 Free Software Foundation, Inc.
    1941      
     2638
    19422639     # This program is free software; you can redistribute
    19432640     # it and/or modify it under the terms of the GNU
     
    19452642     ...
    19462643     ...
    1947      
     2644
    19482645     SHELL = /bin/sh
    1949      
     2646
    19502647     #### Start of system configuration section. ####
    1951      
     2648
    19522649     srcdir = .
    1953      
     2650
    19542651     # If you use gcc, you should either run the
    19552652     # fixincludes script that comes with it or else use
     
    19602657     INSTALL = /usr/local/bin/install -c
    19612658     INSTALLDATA = /usr/local/bin/install -c -m 644
    1962      
     2659
    19632660     # Things you might add to DEFS:
    19642661     # -DSTDC_HEADERS        If you have ANSI C headers and
     
    20112708     # -DXENIX               If you have sys/inode.h
    20122709     #                       and need it 94 to be included.
    2013      
     2710
    20142711     DEFS =  -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
    20152712             -DVPRINTF_MISSING -DBSD42
     
    20202717     DEF_AR_FILE = /dev/rmt8
    20212718     DEFBLOCKING = 20
    2022      
     2719
    20232720     CDEBUG = -g
    20242721     CFLAGS = $(CDEBUG) -I. -I$(srcdir) $(DEFS) \
     
    20262723             -DDEFBLOCKING=$(DEFBLOCKING)
    20272724     LDFLAGS = -g
    2028      
     2725
    20292726     prefix = /usr/local
    20302727     # Prefix for each installed program,
    20312728     # normally empty or `g'.
    20322729     binprefix =
    2033      
     2730
    20342731     # The directory to install tar in.
    20352732     bindir = $(prefix)/bin
    2036      
     2733
    20372734     # The directory to install the info files in.
    20382735     infodir = $(prefix)/info
    2039      
     2736
    20402737     #### End of system configuration section. ####
    2041      
     2738
    20422739     SRC1 =  tar.c create.c extract.c buffer.c \
    20432740             getoldopt.c update.c gnu.c mangle.c
     
    20592756             msd_dir.h msd_dir.c tcexparg.c \
    20602757             level-0 level-1 backup-specs testpad.c
    2061      
     2758
     2759     .PHONY: all
    20622760     all:    tar rmt tar.info
    2063      
     2761
     2762     .PHONY: tar
    20642763     tar:    $(OBJS)
    20652764             $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
    2066      
     2765
    20672766     rmt:    rmt.c
    20682767             $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rmt.c
    2069      
     2768
    20702769     tar.info: tar.texinfo
    20712770             makeinfo tar.texinfo
    2072      
     2771
     2772     .PHONY: install
    20732773     install: all
    20742774             $(INSTALL) tar $(bindir)/$(binprefix)tar
    20752775             -test ! -f rmt || $(INSTALL) rmt /etc/rmt
    20762776             $(INSTALLDATA) $(srcdir)/tar.info* $(infodir)
    2077      
     2777
    20782778     $(OBJS): tar.h port.h testpad.h
    20792779     regex.o buffer.o tar.o: regex.h
    20802780     # getdate.y has 8 shift/reduce conflicts.
    2081      
     2781
    20822782     testpad.h: testpad
    20832783             ./testpad
    2084      
     2784
    20852785     testpad: testpad.o
    20862786             $(CC) -o $@ testpad.o
    2087      
     2787
    20882788     TAGS:   $(SRCS)
    20892789             etags $(SRCS)
    2090      
     2790
     2791     .PHONY: clean
    20912792     clean:
    20922793             rm -f *.o tar rmt testpad testpad.h core
    2093      
     2794
     2795     .PHONY: distclean
    20942796     distclean: clean
    20952797             rm -f TAGS Makefile config.status
    2096      
     2798
     2799     .PHONY: realclean
    20972800     realclean: distclean
    20982801             rm -f tar.info*
    2099      
     2802
     2803     .PHONY: shar
    21002804     shar: $(SRCS) $(AUX)
    21012805             shar $(SRCS) $(AUX) | compress \
     
    21042808                          -e q
    21052809                          version.c`.shar.Z
    2106      
     2810
     2811     .PHONY: dist
    21072812     dist: $(SRCS) $(AUX)
    21082813             echo tar-`sed \
     
    21162821             tar chZf `cat .fname`.tar.Z `cat .fname`
    21172822             -rm -rf `cat .fname` .fname
    2118      
     2823
    21192824     tar.zoo: $(SRCS) $(AUX)
    21202825             -rm -rf tmp.dir
     
    21312836File: make.info,  Node: GNU Free Documentation License,  Next: Concept Index,  Prev: Complex Makefile,  Up: Top
    21322837
    2133 GNU Free Documentation License
    2134 ******************************
    2135 
    2136                         Version 1.1, March 2000
    2137      Copyright (C) 2000 Free Software Foundation, Inc.
    2138      59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
    2139      
     2838Appendix D GNU Free Documentation License
     2839*****************************************
     2840
     2841                      Version 1.2, November 2002
     2842
     2843     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
     2844     51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
     2845
    21402846     Everyone is permitted to copy and distribute verbatim copies
    21412847     of this license document, but changing it is not allowed.
     
    21442850
    21452851     The purpose of this License is to make a manual, textbook, or other
    2146      written document "free" in the sense of freedom: to assure everyone
    2147      the effective freedom to copy and redistribute it, with or without
    2148      modifying it, either commercially or noncommercially.  Secondarily,
    2149      this License preserves for the author and publisher a way to get
    2150      credit for their work, while not being considered responsible for
    2151      modifications made by others.
     2852     functional and useful document "free" in the sense of freedom: to
     2853     assure everyone the effective freedom to copy and redistribute it,
     2854     with or without modifying it, either commercially or
     2855     noncommercially.  Secondarily, this License preserves for the
     2856     author and publisher a way to get credit for their work, while not
     2857     being considered responsible for modifications made by others.
    21522858
    21532859     This License is a kind of "copyleft", which means that derivative
     
    21672873  1. APPLICABILITY AND DEFINITIONS
    21682874
    2169      This License applies to any manual or other work that contains a
    2170      notice placed by the copyright holder saying it can be distributed
    2171      under the terms of this License.  The "Document", below, refers to
    2172      any such manual or work.  Any member of the public is a licensee,
    2173      and is addressed as "you".
     2875     This License applies to any manual or other work, in any medium,
     2876     that contains a notice placed by the copyright holder saying it
     2877     can be distributed under the terms of this License.  Such a notice
     2878     grants a world-wide, royalty-free license, unlimited in duration,
     2879     to use that work under the conditions stated herein.  The
     2880     "Document", below, refers to any such manual or work.  Any member
     2881     of the public is a licensee, and is addressed as "you".  You
     2882     accept the license if you copy, modify or distribute the work in a
     2883     way requiring permission under copyright law.
    21742884
    21752885     A "Modified Version" of the Document means any work containing the
     
    21772887     modifications and/or translated into another language.
    21782888
    2179      A "Secondary Section" is a named appendix or a front-matter
    2180      section of the Document that deals exclusively with the
    2181      relationship of the publishers or authors of the Document to the
    2182      Document's overall subject (or to related matters) and contains
    2183      nothing that could fall directly within that overall subject.
    2184      (For example, if the Document is in part a textbook of
    2185      mathematics, a Secondary Section may not explain any mathematics.)
    2186      The relationship could be a matter of historical connection with
    2187      the subject or with related matters, or of legal, commercial,
    2188      philosophical, ethical or political position regarding them.
     2889     A "Secondary Section" is a named appendix or a front-matter section
     2890     of the Document that deals exclusively with the relationship of the
     2891     publishers or authors of the Document to the Document's overall
     2892     subject (or to related matters) and contains nothing that could
     2893     fall directly within that overall subject.  (Thus, if the Document
     2894     is in part a textbook of mathematics, a Secondary Section may not
     2895     explain any mathematics.)  The relationship could be a matter of
     2896     historical connection with the subject or with related matters, or
     2897     of legal, commercial, philosophical, ethical or political position
     2898     regarding them.
    21892899
    21902900     The "Invariant Sections" are certain Secondary Sections whose
    21912901     titles are designated, as being those of Invariant Sections, in
    21922902     the notice that says that the Document is released under this
    2193      License.
     2903     License.  If a section does not fit the above definition of
     2904     Secondary then it is not allowed to be designated as Invariant.
     2905     The Document may contain zero Invariant Sections.  If the Document
     2906     does not identify any Invariant Sections then there are none.
    21942907
    21952908     The "Cover Texts" are certain short passages of text that are
    21962909     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
    2197      that says that the Document is released under this License.
     2910     that says that the Document is released under this License.  A
     2911     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     2912     be at most 25 words.
    21982913
    21992914     A "Transparent" copy of the Document means a machine-readable copy,
    22002915     represented in a format whose specification is available to the
    2201      general public, whose contents can be viewed and edited directly
    2202      and straightforwardly with generic text editors or (for images
     2916     general public, that is suitable for revising the document
     2917     straightforwardly with generic text editors or (for images
    22032918     composed of pixels) generic paint programs or (for drawings) some
    22042919     widely available drawing editor, and that is suitable for input to
    22052920     text formatters or for automatic translation to a variety of
    22062921     formats suitable for input to text formatters.  A copy made in an
    2207      otherwise Transparent file format whose markup has been designed
    2208      to thwart or discourage subsequent modification by readers is not
    2209      Transparent.  A copy that is not "Transparent" is called "Opaque".
     2922     otherwise Transparent file format whose markup, or absence of
     2923     markup, has been arranged to thwart or discourage subsequent
     2924     modification by readers is not Transparent.  An image format is
     2925     not Transparent if used for any substantial amount of text.  A
     2926     copy that is not "Transparent" is called "Opaque".
    22102927
    22112928     Examples of suitable formats for Transparent copies include plain
    22122929     ASCII without markup, Texinfo input format, LaTeX input format,
    22132930     SGML or XML using a publicly available DTD, and
    2214      standard-conforming simple HTML designed for human modification.
    2215      Opaque formats include PostScript, PDF, proprietary formats that
    2216      can be read and edited only by proprietary word processors, SGML
    2217      or XML for which the DTD and/or processing tools are not generally
    2218      available, and the machine-generated HTML produced by some word
    2219      processors for output purposes only.
     2931     standard-conforming simple HTML, PostScript or PDF designed for
     2932     human modification.  Examples of transparent image formats include
     2933     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     2934     can be read and edited only by proprietary word processors, SGML or
     2935     XML for which the DTD and/or processing tools are not generally
     2936     available, and the machine-generated HTML, PostScript or PDF
     2937     produced by some word processors for output purposes only.
    22202938
    22212939     The "Title Page" means, for a printed book, the title page itself,
     
    22252943     Page" means the text near the most prominent appearance of the
    22262944     work's title, preceding the beginning of the body of the text.
     2945
     2946     A section "Entitled XYZ" means a named subunit of the Document
     2947     whose title either is precisely XYZ or contains XYZ in parentheses
     2948     following text that translates XYZ in another language.  (Here XYZ
     2949     stands for a specific section name mentioned below, such as
     2950     "Acknowledgements", "Dedications", "Endorsements", or "History".)
     2951     To "Preserve the Title" of such a section when you modify the
     2952     Document means that it remains a section "Entitled XYZ" according
     2953     to this definition.
     2954
     2955     The Document may include Warranty Disclaimers next to the notice
     2956     which states that this License applies to the Document.  These
     2957     Warranty Disclaimers are considered to be included by reference in
     2958     this License, but only as regards disclaiming warranties: any other
     2959     implication that these Warranty Disclaimers may have is void and
     2960     has no effect on the meaning of this License.
    22272961
    22282962  2. VERBATIM COPYING
     
    22442978  3. COPYING IN QUANTITY
    22452979
    2246      If you publish printed copies of the Document numbering more than
    2247      100, and the Document's license notice requires Cover Texts, you
    2248      must enclose the copies in covers that carry, clearly and legibly,
    2249      all these Cover Texts: Front-Cover Texts on the front cover, and
     2980     If you publish printed copies (or copies in media that commonly
     2981     have printed covers) of the Document, numbering more than 100, and
     2982     the Document's license notice requires Cover Texts, you must
     2983     enclose the copies in covers that carry, clearly and legibly, all
     2984     these Cover Texts: Front-Cover Texts on the front cover, and
    22502985     Back-Cover Texts on the back cover.  Both covers must also clearly
    22512986     and legibly identify you as the publisher of these copies.  The
     
    22653000     numbering more than 100, you must either include a
    22663001     machine-readable Transparent copy along with each Opaque copy, or
    2267      state in or with each Opaque copy a publicly-accessible
    2268      computer-network location containing a complete Transparent copy
    2269      of the Document, free of added material, which the general
    2270      network-using public has access to download anonymously at no
    2271      charge using public-standard network protocols.  If you use the
     3002     state in or with each Opaque copy a computer-network location from
     3003     which the general network-using public has access to download
     3004     using public-standard network protocols a complete Transparent
     3005     copy of the Document, free of added material.  If you use the
    22723006     latter option, you must take reasonably prudent steps, when you
    22733007     begin distribution of Opaque copies in quantity, to ensure that
     
    23033037          the Modified Version, together with at least five of the
    23043038          principal authors of the Document (all of its principal
    2305           authors, if it has less than five).
     3039          authors, if it has fewer than five), unless they release you
     3040          from this requirement.
    23063041
    23073042       C. State on the Title page the name of the publisher of the
     
    23243059       H. Include an unaltered copy of this License.
    23253060
    2326        I. Preserve the section entitled "History", and its title, and
    2327           add to it an item stating at least the title, year, new
     3061       I. Preserve the section Entitled "History", Preserve its Title,
     3062          and add to it an item stating at least the title, year, new
    23283063          authors, and publisher of the Modified Version as given on
    2329           the Title Page.  If there is no section entitled "History" in
     3064          the Title Page.  If there is no section Entitled "History" in
    23303065          the Document, create one stating the title, year, authors,
    23313066          and publisher of the Document as given on its Title Page,
     
    23423077          it refers to gives permission.
    23433078
    2344        K. In any section entitled "Acknowledgments" or "Dedications",
    2345           preserve the section's title, and preserve in the section all
    2346           the substance and tone of each of the contributor
    2347           acknowledgments and/or dedications given therein.
     3079       K. For any section Entitled "Acknowledgements" or "Dedications",
     3080          Preserve the Title of the section, and preserve in the
     3081          section all the substance and tone of each of the contributor
     3082          acknowledgements and/or dedications given therein.
    23483083
    23493084       L. Preserve all the Invariant Sections of the Document,
     
    23523087          titles.
    23533088
    2354        M. Delete any section entitled "Endorsements".  Such a section
     3089       M. Delete any section Entitled "Endorsements".  Such a section
    23553090          may not be included in the Modified Version.
    23563091
    2357        N. Do not retitle any existing section as "Endorsements" or to
    2358           conflict in title with any Invariant Section.
     3092       N. Do not retitle any existing section to be Entitled
     3093          "Endorsements" or to conflict in title with any Invariant
     3094          Section.
     3095
     3096       O. Preserve any Warranty Disclaimers.
    23593097
    23603098     If the Modified Version includes new front-matter sections or
     
    23663104     other section titles.
    23673105
    2368      You may add a section entitled "Endorsements", provided it contains
     3106     You may add a section Entitled "Endorsements", provided it contains
    23693107     nothing but endorsements of your Modified Version by various
    23703108     parties--for example, statements of peer review or that the text
     
    23943132     all of the Invariant Sections of all of the original documents,
    23953133     unmodified, and list them all as Invariant Sections of your
    2396      combined work in its license notice.
     3134     combined work in its license notice, and that you preserve all
     3135     their Warranty Disclaimers.
    23973136
    23983137     The combined work need only contain one copy of this License, and
     
    24063145     combined work.
    24073146
    2408      In the combination, you must combine any sections entitled
     3147     In the combination, you must combine any sections Entitled
    24093148     "History" in the various original documents, forming one section
    2410      entitled "History"; likewise combine any sections entitled
    2411      "Acknowledgments", and any sections entitled "Dedications".  You
    2412      must delete all sections entitled "Endorsements."
     3149     Entitled "History"; likewise combine any sections Entitled
     3150     "Acknowledgements", and any sections Entitled "Dedications".  You
     3151     must delete all sections Entitled "Endorsements."
    24133152
    24143153  6. COLLECTIONS OF DOCUMENTS
     
    24313170     A compilation of the Document or its derivatives with other
    24323171     separate and independent documents or works, in or on a volume of
    2433      a storage or distribution medium, does not as a whole count as a
    2434      Modified Version of the Document, provided no compilation
    2435      copyright is claimed for the compilation.  Such a compilation is
    2436      called an "aggregate", and this License does not apply to the
    2437      other self-contained works thus compiled with the Document, on
    2438      account of their being thus compiled, if they are not themselves
    2439      derivative works of the Document.
     3172     a storage or distribution medium, is called an "aggregate" if the
     3173     copyright resulting from the compilation is not used to limit the
     3174     legal rights of the compilation's users beyond what the individual
     3175     works permit.  When the Document is included in an aggregate, this
     3176     License does not apply to the other works in the aggregate which
     3177     are not themselves derivative works of the Document.
    24403178
    24413179     If the Cover Text requirement of section 3 is applicable to these
    2442      copies of the Document, then if the Document is less than one
    2443      quarter of the entire aggregate, the Document's Cover Texts may be
    2444      placed on covers that surround only the Document within the
    2445      aggregate.  Otherwise they must appear on covers around the whole
    2446      aggregate.
     3180     copies of the Document, then if the Document is less than one half
     3181     of the entire aggregate, the Document's Cover Texts may be placed
     3182     on covers that bracket the Document within the aggregate, or the
     3183     electronic equivalent of covers if the Document is in electronic
     3184     form.  Otherwise they must appear on printed covers that bracket
     3185     the whole aggregate.
    24473186
    24483187  8. TRANSLATION
     
    24543193     translations of some or all Invariant Sections in addition to the
    24553194     original versions of these Invariant Sections.  You may include a
    2456      translation of this License provided that you also include the
    2457      original English version of this License.  In case of a
    2458      disagreement between the translation and the original English
    2459      version of this License, the original English version will prevail.
     3195     translation of this License, and all the license notices in the
     3196     Document, and any Warranty Disclaimers, provided that you also
     3197     include the original English version of this License and the
     3198     original versions of those notices and disclaimers.  In case of a
     3199     disagreement between the translation and the original version of
     3200     this License or a notice or disclaimer, the original version will
     3201     prevail.
     3202
     3203     If a section in the Document is Entitled "Acknowledgements",
     3204     "Dedications", or "History", the requirement (section 4) to
     3205     Preserve its Title (section 1) will typically require changing the
     3206     actual title.
    24603207
    24613208  9. TERMINATION
     
    24873234     Free Software Foundation.
    24883235
    2489 ADDENDUM: How to use this License for your documents
    2490 ====================================================
     3236D.1 ADDENDUM: How to use this License for your documents
     3237========================================================
    24913238
    24923239To use this License in a document you have written, include a copy of
     
    24963243       Copyright (C)  YEAR  YOUR NAME.
    24973244       Permission is granted to copy, distribute and/or modify this document
    2498        under the terms of the GNU Free Documentation License, Version 1.1
     3245       under the terms of the GNU Free Documentation License, Version 1.2
    24993246       or any later version published by the Free Software Foundation;
    2500        with the Invariant Sections being LIST THEIR TITLES, with the
    2501        Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    2502        A copy of the license is included in the section entitled ``GNU
     3247       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
     3248       Texts.  A copy of the license is included in the section entitled ``GNU
    25033249       Free Documentation License''.
    25043250
    2505    If you have no Invariant Sections, write "with no Invariant Sections"
    2506 instead of saying which ones are invariant.  If you have no Front-Cover
    2507 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
    2508 LIST"; likewise for Back-Cover Texts.
     3251   If you have Invariant Sections, Front-Cover Texts and Back-Cover
     3252Texts, replace the "with...Texts." line with this:
     3253
     3254         with the Invariant Sections being LIST THEIR TITLES, with
     3255         the Front-Cover Texts being LIST, and with the Back-Cover Texts
     3256         being LIST.
     3257
     3258   If you have Invariant Sections without Cover Texts, or some other
     3259combination of the three, merge those two alternatives to suit the
     3260situation.
    25093261
    25103262   If your document contains nontrivial examples of program code, we
     
    25193271*****************
    25203272
     3273[index]
    25213274* Menu:
    25223275
    2523 * # (comments), in commands:             Commands.
    2524 * # (comments), in makefile:             Makefile Contents.
     3276* # (comments), in commands:             Command Syntax.      (line  27)
     3277* # (comments), in makefile:             Makefile Contents.   (line  41)
    25253278* #include:                              Automatic Prerequisites.
    2526 * $$@, support for:                      Automatic Variables.
    2527 * $, in function call:                   Syntax of Functions.
    2528 * $, in rules:                           Rule Syntax.
    2529 * $, in variable name:                   Computed Names.
    2530 * $, in variable reference:              Reference.
    2531 * %, in pattern rules:                   Pattern Intro.
    2532 * %, quoting in patsubst:                Text Functions.
    2533 * %, quoting in static pattern:          Static Usage.
    2534 * %, quoting in vpath:                   Selective Search.
    2535 * %, quoting with \ (backslash) <1>:     Text Functions.
    2536 * %, quoting with \ (backslash) <2>:     Static Usage.
    2537 * %, quoting with \ (backslash):         Selective Search.
    2538 * * (wildcard character):                Wildcards.
     3279                                                              (line  16)
     3280* $, in function call:                   Syntax of Functions. (line   6)
     3281* $, in rules:                           Rule Syntax.         (line  32)
     3282* $, in variable name:                   Computed Names.      (line   6)
     3283* $, in variable reference:              Reference.           (line   6)
     3284* %, in pattern rules:                   Pattern Intro.       (line   9)
     3285* %, quoting in patsubst:                Text Functions.      (line  26)
     3286* %, quoting in static pattern:          Static Usage.        (line  37)
     3287* %, quoting in vpath:                   Selective Search.    (line  38)
     3288* %, quoting with \ (backslash) <1>:     Text Functions.      (line  26)
     3289* %, quoting with \ (backslash) <2>:     Static Usage.        (line  37)
     3290* %, quoting with \ (backslash):         Selective Search.    (line  38)
     3291* * (wildcard character):                Wildcards.           (line   6)
    25393292* +, and command execution:              Instead of Execution.
    2540 * +, and commands:                       MAKE Variable.
    2541 * +, and define:                         Sequences.
    2542 * +=:                                    Appending.
    2543 * +=, expansion:                         Reading Makefiles.
    2544 * ,v (RCS file extension):               Catalogue of Rules.
    2545 * - (in commands):                       Errors.
    2546 * -, and define:                         Sequences.
    2547 * --always-make:                         Options Summary.
    2548 * --assume-new <1>:                      Options Summary.
     3293                                                              (line  58)
     3294* +, and commands:                       MAKE Variable.       (line  18)
     3295* +, and define:                         Sequences.           (line  50)
     3296* +=:                                    Appending.           (line   6)
     3297* +=, expansion:                         Reading Makefiles.   (line  33)
     3298* ,v (RCS file extension):               Catalogue of Rules.  (line 164)
     3299* - (in commands):                       Errors.              (line  19)
     3300* -, and define:                         Sequences.           (line  50)
     3301* --always-make:                         Options Summary.     (line  15)
     3302* --assume-new <1>:                      Options Summary.     (line 242)
    25493303* --assume-new:                          Instead of Execution.
    2550 * --assume-new, and recursion:           Options/Recursion.
    2551 * --assume-old <1>:                      Options Summary.
     3304                                                              (line  33)
     3305* --assume-new, and recursion:           Options/Recursion.   (line  22)
     3306* --assume-old <1>:                      Options Summary.     (line 147)
    25523307* --assume-old:                          Avoiding Compilation.
    2553 * --assume-old, and recursion:           Options/Recursion.
    2554 * --debug:                               Options Summary.
    2555 * --directory <1>:                       Options Summary.
    2556 * --directory:                           Recursion.
    2557 * --directory, and --print-directory:    -w Option.
    2558 * --directory, and recursion:            Options/Recursion.
    2559 * --dry-run <1>:                         Options Summary.
     3308                                                              (line   6)
     3309* --assume-old, and recursion:           Options/Recursion.   (line  22)
     3310* --check-symlink-times:                 Options Summary.     (line 130)
     3311* --debug:                               Options Summary.     (line  42)
     3312* --directory <1>:                       Options Summary.     (line  26)
     3313* --directory:                           Recursion.           (line  20)
     3314* --directory, and --print-directory:    -w Option.           (line  20)
     3315* --directory, and recursion:            Options/Recursion.   (line  22)
     3316* --dry-run <1>:                         Options Summary.     (line 140)
    25603317* --dry-run <2>:                         Instead of Execution.
    2561 * --dry-run:                             Echoing.
    2562 * --environment-overrides:               Options Summary.
    2563 * --file <1>:                            Options Summary.
    2564 * --file <2>:                            Makefile Arguments.
    2565 * --file:                                Makefile Names.
    2566 * --file, and recursion:                 Options/Recursion.
    2567 * --help:                                Options Summary.
    2568 * --ignore-errors <1>:                   Options Summary.
    2569 * --ignore-errors:                       Errors.
    2570 * --include-dir <1>:                     Options Summary.
    2571 * --include-dir:                         Include.
    2572 * --jobs <1>:                            Options Summary.
    2573 * --jobs:                                Parallel.
    2574 * --jobs, and recursion:                 Options/Recursion.
    2575 * --just-print <1>:                      Options Summary.
     3318                                                              (line  14)
     3319* --dry-run:                             Echoing.             (line  18)
     3320* --environment-overrides:               Options Summary.     (line  78)
     3321* --file <1>:                            Options Summary.     (line  84)
     3322* --file <2>:                            Makefile Arguments.  (line   6)
     3323* --file:                                Makefile Names.      (line  23)
     3324* --file, and recursion:                 Options/Recursion.   (line  22)
     3325* --help:                                Options Summary.     (line  90)
     3326* --ignore-errors <1>:                   Options Summary.     (line  94)
     3327* --ignore-errors:                       Errors.              (line  30)
     3328* --include-dir <1>:                     Options Summary.     (line  99)
     3329* --include-dir:                         Include.             (line  52)
     3330* --jobs <1>:                            Options Summary.     (line 106)
     3331* --jobs:                                Parallel.            (line   6)
     3332* --jobs, and recursion:                 Options/Recursion.   (line  25)
     3333* --just-print <1>:                      Options Summary.     (line 139)
    25763334* --just-print <2>:                      Instead of Execution.
    2577 * --just-print:                          Echoing.
    2578 * --keep-going <1>:                      Options Summary.
    2579 * --keep-going <2>:                      Testing.
    2580 * --keep-going:                          Errors.
    2581 * --load-average <1>:                    Options Summary.
    2582 * --load-average:                        Parallel.
    2583 * --makefile <1>:                        Options Summary.
    2584 * --makefile <2>:                        Makefile Arguments.
    2585 * --makefile:                            Makefile Names.
    2586 * --max-load <1>:                        Options Summary.
    2587 * --max-load:                            Parallel.
    2588 * --new-file <1>:                        Options Summary.
     3335                                                              (line  14)
     3336* --just-print:                          Echoing.             (line  18)
     3337* --keep-going <1>:                      Options Summary.     (line 115)
     3338* --keep-going <2>:                      Testing.             (line  16)
     3339* --keep-going:                          Errors.              (line  47)
     3340* --load-average <1>:                    Options Summary.     (line 122)
     3341* --load-average:                        Parallel.            (line  57)
     3342* --makefile <1>:                        Options Summary.     (line  85)
     3343* --makefile <2>:                        Makefile Arguments.  (line   6)
     3344* --makefile:                            Makefile Names.      (line  23)
     3345* --max-load <1>:                        Options Summary.     (line 123)
     3346* --max-load:                            Parallel.            (line  57)
     3347* --new-file <1>:                        Options Summary.     (line 241)
    25893348* --new-file:                            Instead of Execution.
    2590 * --new-file, and recursion:             Options/Recursion.
    2591 * --no-builtin-rules:                    Options Summary.
    2592 * --no-builtin-variables:                Options Summary.
    2593 * --no-keep-going:                       Options Summary.
    2594 * --no-print-directory <1>:              Options Summary.
    2595 * --no-print-directory:                  -w Option.
    2596 * --old-file <1>:                        Options Summary.
     3349                                                              (line  33)
     3350* --new-file, and recursion:             Options/Recursion.   (line  22)
     3351* --no-builtin-rules:                    Options Summary.     (line 175)
     3352* --no-builtin-variables:                Options Summary.     (line 188)
     3353* --no-keep-going:                       Options Summary.     (line 203)
     3354* --no-print-directory <1>:              Options Summary.     (line 233)
     3355* --no-print-directory:                  -w Option.           (line  20)
     3356* --old-file <1>:                        Options Summary.     (line 146)
    25973357* --old-file:                            Avoiding Compilation.
    2598 * --old-file, and recursion:             Options/Recursion.
    2599 * --print-data-base:                     Options Summary.
    2600 * --print-directory:                     Options Summary.
    2601 * --print-directory, and --directory:    -w Option.
    2602 * --print-directory, and recursion:      -w Option.
    2603 * --print-directory, disabling:          -w Option.
    2604 * --question <1>:                        Options Summary.
     3358                                                              (line   6)
     3359* --old-file, and recursion:             Options/Recursion.   (line  22)
     3360* --print-data-base:                     Options Summary.     (line 155)
     3361* --print-directory:                     Options Summary.     (line 225)
     3362* --print-directory, and --directory:    -w Option.           (line  20)
     3363* --print-directory, and recursion:      -w Option.           (line  20)
     3364* --print-directory, disabling:          -w Option.           (line  20)
     3365* --question <1>:                        Options Summary.     (line 167)
    26053366* --question:                            Instead of Execution.
    2606 * --quiet <1>:                           Options Summary.
    2607 * --quiet:                               Echoing.
    2608 * --recon <1>:                           Options Summary.
     3367                                                              (line  25)
     3368* --quiet <1>:                           Options Summary.     (line 198)
     3369* --quiet:                               Echoing.             (line  24)
     3370* --recon <1>:                           Options Summary.     (line 141)
    26093371* --recon <2>:                           Instead of Execution.
    2610 * --recon:                               Echoing.
    2611 * --silent <1>:                          Options Summary.
    2612 * --silent:                              Echoing.
    2613 * --stop:                                Options Summary.
    2614 * --touch <1>:                           Options Summary.
     3372                                                              (line  14)
     3373* --recon:                               Echoing.             (line  18)
     3374* --silent <1>:                          Options Summary.     (line 197)
     3375* --silent:                              Echoing.             (line  24)
     3376* --stop:                                Options Summary.     (line 204)
     3377* --touch <1>:                           Options Summary.     (line 212)
    26153378* --touch:                               Instead of Execution.
    2616 * --touch, and recursion:                MAKE Variable.
    2617 * --version:                             Options Summary.
    2618 * --warn-undefined-variables:            Options Summary.
    2619 * --what-if <1>:                         Options Summary.
     3379                                                              (line  19)
     3380* --touch, and recursion:                MAKE Variable.       (line  34)
     3381* --version:                             Options Summary.     (line 220)
     3382* --warn-undefined-variables:            Options Summary.     (line 251)
     3383* --what-if <1>:                         Options Summary.     (line 240)
    26203384* --what-if:                             Instead of Execution.
    2621 * -B:                                    Options Summary.
    2622 * -b:                                    Options Summary.
    2623 * -C <1>:                                Options Summary.
    2624 * -C:                                    Recursion.
    2625 * -C, and -w:                            -w Option.
    2626 * -C, and recursion:                     Options/Recursion.
    2627 * -d:                                    Options Summary.
    2628 * -e:                                    Options Summary.
     3385                                                              (line  33)
     3386* -B:                                    Options Summary.     (line  14)
     3387* -b:                                    Options Summary.     (line   9)
     3388* -C <1>:                                Options Summary.     (line  25)
     3389* -C:                                    Recursion.           (line  20)
     3390* -C, and -w:                            -w Option.           (line  20)
     3391* -C, and recursion:                     Options/Recursion.   (line  22)
     3392* -d:                                    Options Summary.     (line  33)
     3393* -e:                                    Options Summary.     (line  77)
    26293394* -e (shell flag):                       Automatic Prerequisites.
    2630 * -f <1>:                                Options Summary.
    2631 * -f <2>:                                Makefile Arguments.
    2632 * -f:                                    Makefile Names.
    2633 * -f, and recursion:                     Options/Recursion.
    2634 * -h:                                    Options Summary.
    2635 * -I:                                    Options Summary.
    2636 * -i <1>:                                Options Summary.
    2637 * -i:                                    Errors.
    2638 * -I:                                    Include.
    2639 * -j <1>:                                Options Summary.
    2640 * -j:                                    Parallel.
    2641 * -j, and archive update:                Archive Pitfalls.
    2642 * -j, and recursion:                     Options/Recursion.
    2643 * -k <1>:                                Options Summary.
    2644 * -k <2>:                                Testing.
    2645 * -k:                                    Errors.
    2646 * -l:                                    Options Summary.
    2647 * -l (library search):                   Libraries/Search.
    2648 * -l (load average):                     Parallel.
    2649 * -m:                                    Options Summary.
     3395                                                              (line  66)
     3396* -f <1>:                                Options Summary.     (line  83)
     3397* -f <2>:                                Makefile Arguments.  (line   6)
     3398* -f:                                    Makefile Names.      (line  23)
     3399* -f, and recursion:                     Options/Recursion.   (line  22)
     3400* -h:                                    Options Summary.     (line  89)
     3401* -I:                                    Options Summary.     (line  98)
     3402* -i <1>:                                Options Summary.     (line  93)
     3403* -i:                                    Errors.              (line  30)
     3404* -I:                                    Include.             (line  52)
     3405* -j <1>:                                Options Summary.     (line 105)
     3406* -j:                                    Parallel.            (line   6)
     3407* -j, and archive update:                Archive Pitfalls.    (line   6)
     3408* -j, and recursion:                     Options/Recursion.   (line  25)
     3409* -k <1>:                                Options Summary.     (line 114)
     3410* -k <2>:                                Testing.             (line  16)
     3411* -k:                                    Errors.              (line  47)
     3412* -L:                                    Options Summary.     (line 129)
     3413* -l:                                    Options Summary.     (line 121)
     3414* -l (library search):                   Libraries/Search.    (line   6)
     3415* -l (load average):                     Parallel.            (line  57)
     3416* -m:                                    Options Summary.     (line  10)
    26503417* -M (to compiler):                      Automatic Prerequisites.
     3418                                                              (line  18)
    26513419* -MM (to GNU compiler):                 Automatic Prerequisites.
    2652 * -n <1>:                                Options Summary.
     3420                                                              (line  68)
     3421* -n <1>:                                Options Summary.     (line 138)
    26533422* -n <2>:                                Instead of Execution.
    2654 * -n:                                    Echoing.
    2655 * -o <1>:                                Options Summary.
     3423                                                              (line  14)
     3424* -n:                                    Echoing.             (line  18)
     3425* -o <1>:                                Options Summary.     (line 145)
    26563426* -o:                                    Avoiding Compilation.
    2657 * -o, and recursion:                     Options/Recursion.
    2658 * -p:                                    Options Summary.
    2659 * -q <1>:                                Options Summary.
     3427                                                              (line   6)
     3428* -o, and recursion:                     Options/Recursion.   (line  22)
     3429* -p:                                    Options Summary.     (line 154)
     3430* -q <1>:                                Options Summary.     (line 166)
    26603431* -q:                                    Instead of Execution.
    2661 * -R:                                    Options Summary.
    2662 * -r:                                    Options Summary.
    2663 * -S:                                    Options Summary.
    2664 * -s <1>:                                Options Summary.
    2665 * -s:                                    Echoing.
    2666 * -t <1>:                                Options Summary.
     3432                                                              (line  25)
     3433* -R:                                    Options Summary.     (line 187)
     3434* -r:                                    Options Summary.     (line 174)
     3435* -S:                                    Options Summary.     (line 202)
     3436* -s <1>:                                Options Summary.     (line 196)
     3437* -s:                                    Echoing.             (line  24)
     3438* -t <1>:                                Options Summary.     (line 211)
    26673439* -t:                                    Instead of Execution.
    2668 * -t, and recursion:                     MAKE Variable.
    2669 * -v:                                    Options Summary.
    2670 * -W:                                    Options Summary.
    2671 * -w:                                    Options Summary.
     3440                                                              (line  19)
     3441* -t, and recursion:                     MAKE Variable.       (line  34)
     3442* -v:                                    Options Summary.     (line 219)
     3443* -W:                                    Options Summary.     (line 239)
     3444* -w:                                    Options Summary.     (line 224)
    26723445* -W:                                    Instead of Execution.
    2673 * -w, and -C:                            -w Option.
    2674 * -w, and recursion:                     -w Option.
    2675 * -W, and recursion:                     Options/Recursion.
    2676 * -w, disabling:                         -w Option.
     3446                                                              (line  33)
     3447* -w, and -C:                            -w Option.           (line  20)
     3448* -w, and recursion:                     -w Option.           (line  20)
     3449* -W, and recursion:                     Options/Recursion.   (line  22)
     3450* -w, disabling:                         -w Option.           (line  20)
    26773451* .a (archives):                         Archive Suffix Rules.
    2678 * .C:                                    Catalogue of Rules.
    2679 * .c:                                    Catalogue of Rules.
    2680 * .cc:                                   Catalogue of Rules.
    2681 * .ch:                                   Catalogue of Rules.
     3452                                                              (line   6)
     3453* .C:                                    Catalogue of Rules.  (line  39)
     3454* .c:                                    Catalogue of Rules.  (line  35)
     3455* .cc:                                   Catalogue of Rules.  (line  39)
     3456* .ch:                                   Catalogue of Rules.  (line 151)
     3457* .cpp:                                  Catalogue of Rules.  (line  39)
    26823458* .d:                                    Automatic Prerequisites.
    2683 * .def:                                  Catalogue of Rules.
    2684 * .dvi:                                  Catalogue of Rules.
    2685 * .F:                                    Catalogue of Rules.
    2686 * .f:                                    Catalogue of Rules.
    2687 * .info:                                 Catalogue of Rules.
    2688 * .l:                                    Catalogue of Rules.
    2689 * .LIBPATTERNS, and link libraries:      Libraries/Search.
    2690 * .ln:                                   Catalogue of Rules.
    2691 * .mod:                                  Catalogue of Rules.
    2692 * .o:                                    Catalogue of Rules.
    2693 * .p:                                    Catalogue of Rules.
    2694 * .PRECIOUS intermediate files:          Chained Rules.
    2695 * .r:                                    Catalogue of Rules.
    2696 * .S:                                    Catalogue of Rules.
    2697 * .s:                                    Catalogue of Rules.
    2698 * .sh:                                   Catalogue of Rules.
    2699 * .sym:                                  Catalogue of Rules.
    2700 * .tex:                                  Catalogue of Rules.
    2701 * .texi:                                 Catalogue of Rules.
    2702 * .texinfo:                              Catalogue of Rules.
    2703 * .txinfo:                               Catalogue of Rules.
    2704 * .w:                                    Catalogue of Rules.
    2705 * .web:                                  Catalogue of Rules.
    2706 * .y:                                    Catalogue of Rules.
    2707 * :: rules (double-colon):               Double-Colon.
    2708 * := <1>:                                Setting.
    2709 * :=:                                    Flavors.
    2710 * = <1>:                                 Setting.
    2711 * =:                                     Flavors.
    2712 * =, expansion:                          Reading Makefiles.
    2713 * ? (wildcard character):                Wildcards.
    2714 * ?= <1>:                                Setting.
    2715 * ?=:                                    Flavors.
    2716 * ?=, expansion:                         Reading Makefiles.
    2717 * @ (in commands):                       Echoing.
    2718 * @, and define:                         Sequences.
    2719 * [...] (wildcard characters):           Wildcards.
    2720 * \ (backslash), for continuation lines: Simple Makefile.
    2721 * \ (backslash), in commands:            Execution.
    2722 * \ (backslash), to quote % <1>:         Text Functions.
    2723 * \ (backslash), to quote % <2>:         Static Usage.
    2724 * \ (backslash), to quote %:             Selective Search.
    2725 * __.SYMDEF:                             Archive Symbols.
    2726 * algorithm for directory search:        Search Algorithm.
    2727 * all (standard target):                 Goals.
    2728 * appending to variables:                Appending.
    2729 * ar:                                    Implicit Variables.
    2730 * archive:                               Archives.
    2731 * archive member targets:                Archive Members.
    2732 * archive symbol directory updating:     Archive Symbols.
    2733 * archive, and -j:                       Archive Pitfalls.
    2734 * archive, and parallel execution:       Archive Pitfalls.
     3459                                                              (line  81)
     3460* .def:                                  Catalogue of Rules.  (line  74)
     3461* .dvi:                                  Catalogue of Rules.  (line 151)
     3462* .F:                                    Catalogue of Rules.  (line  49)
     3463* .f:                                    Catalogue of Rules.  (line  49)
     3464* .info:                                 Catalogue of Rules.  (line 158)
     3465* .l:                                    Catalogue of Rules.  (line 124)
     3466* .LIBPATTERNS, and link libraries:      Libraries/Search.    (line   6)
     3467* .ln:                                   Catalogue of Rules.  (line 146)
     3468* .mod:                                  Catalogue of Rules.  (line  74)
     3469* .o:                                    Catalogue of Rules.  (line  35)
     3470* .p:                                    Catalogue of Rules.  (line  45)
     3471* .PRECIOUS intermediate files:          Chained Rules.       (line  56)
     3472* .r:                                    Catalogue of Rules.  (line  49)
     3473* .S:                                    Catalogue of Rules.  (line  82)
     3474* .s:                                    Catalogue of Rules.  (line  79)
     3475* .sh:                                   Catalogue of Rules.  (line 180)
     3476* .sym:                                  Catalogue of Rules.  (line  74)
     3477* .tex:                                  Catalogue of Rules.  (line 151)
     3478* .texi:                                 Catalogue of Rules.  (line 158)
     3479* .texinfo:                              Catalogue of Rules.  (line 158)
     3480* .txinfo:                               Catalogue of Rules.  (line 158)
     3481* .w:                                    Catalogue of Rules.  (line 151)
     3482* .web:                                  Catalogue of Rules.  (line 151)
     3483* .y:                                    Catalogue of Rules.  (line 120)
     3484* :: rules (double-colon):               Double-Colon.        (line   6)
     3485* := <1>:                                Setting.             (line   6)
     3486* :=:                                    Flavors.             (line  56)
     3487* = <1>:                                 Setting.             (line   6)
     3488* =:                                     Flavors.             (line  10)
     3489* =, expansion:                          Reading Makefiles.   (line  33)
     3490* ? (wildcard character):                Wildcards.           (line   6)
     3491* ?= <1>:                                Setting.             (line   6)
     3492* ?=:                                    Flavors.             (line 129)
     3493* ?=, expansion:                         Reading Makefiles.   (line  33)
     3494* @ (in commands):                       Echoing.             (line   6)
     3495* @, and define:                         Sequences.           (line  50)
     3496* [...] (wildcard characters):           Wildcards.           (line   6)
     3497* \ (backslash), for continuation lines: Simple Makefile.     (line  40)
     3498* \ (backslash), in commands:            Splitting Lines.     (line   6)
     3499* \ (backslash), to quote % <1>:         Text Functions.      (line  26)
     3500* \ (backslash), to quote % <2>:         Static Usage.        (line  37)
     3501* \ (backslash), to quote %:             Selective Search.    (line  38)
     3502* __.SYMDEF:                             Archive Symbols.     (line   6)
     3503* abspath:                               File Name Functions. (line 121)
     3504* algorithm for directory search:        Search Algorithm.    (line   6)
     3505* all (standard target):                 Goals.               (line  72)
     3506* appending to variables:                Appending.           (line   6)
     3507* ar:                                    Implicit Variables.  (line  41)
     3508* archive:                               Archives.            (line   6)
     3509* archive member targets:                Archive Members.     (line   6)
     3510* archive symbol directory updating:     Archive Symbols.     (line   6)
     3511* archive, and -j:                       Archive Pitfalls.    (line   6)
     3512* archive, and parallel execution:       Archive Pitfalls.    (line   6)
    27353513* archive, suffix rule for:              Archive Suffix Rules.
    2736 * Arg list too long:                     Options/Recursion.
    2737 * arguments of functions:                Syntax of Functions.
    2738 * as <1>:                                Implicit Variables.
    2739 * as:                                    Catalogue of Rules.
    2740 * assembly, rule to compile:             Catalogue of Rules.
     3514                                                              (line   6)
     3515* Arg list too long:                     Options/Recursion.   (line  57)
     3516* arguments of functions:                Syntax of Functions. (line   6)
     3517* as <1>:                                Implicit Variables.  (line  44)
     3518* as:                                    Catalogue of Rules.  (line  79)
     3519* assembly, rule to compile:             Catalogue of Rules.  (line  79)
    27413520* automatic generation of prerequisites <1>: Automatic Prerequisites.
    2742 * automatic generation of prerequisites: Include.
    2743 * automatic variables:                   Automatic Variables.
    2744 * automatic variables in prerequisites:  Automatic Variables.
    2745 * backquotes:                            Shell Function.
    2746 * backslash (\), for continuation lines: Simple Makefile.
    2747 * backslash (\), in commands:            Execution.
    2748 * backslash (\), to quote % <1>:         Text Functions.
    2749 * backslash (\), to quote % <2>:         Static Usage.
    2750 * backslash (\), to quote %:             Selective Search.
     3521                                                              (line   6)
     3522* automatic generation of prerequisites: Include.             (line  50)
     3523* automatic variables:                   Automatic Variables. (line   6)
     3524* automatic variables in prerequisites:  Automatic Variables. (line  17)
     3525* backquotes:                            Shell Function.      (line   6)
     3526* backslash (\), for continuation lines: Simple Makefile.     (line  40)
     3527* backslash (\), in commands:            Splitting Lines.     (line   6)
     3528* backslash (\), to quote % <1>:         Text Functions.      (line  26)
     3529* backslash (\), to quote % <2>:         Static Usage.        (line  37)
     3530* backslash (\), to quote %:             Selective Search.    (line  38)
    27513531* backslashes in pathnames and wildcard expansion: Wildcard Pitfall.
    2752 * basename:                              File Name Functions.
     3532                                                              (line  31)
     3533* basename:                              File Name Functions. (line  57)
    27533534* binary packages:                       Install Command Categories.
    2754 * broken pipe:                           Parallel.
    2755 * bugs, reporting:                       Bugs.
    2756 * built-in special targets:              Special Targets.
    2757 * C++, rule to compile:                  Catalogue of Rules.
    2758 * C, rule to compile:                    Catalogue of Rules.
    2759 * cc <1>:                                Implicit Variables.
    2760 * cc:                                    Catalogue of Rules.
    2761 * cd (shell command) <1>:                MAKE Variable.
    2762 * cd (shell command):                    Execution.
    2763 * chains of rules:                       Chained Rules.
    2764 * check (standard target):               Goals.
    2765 * clean (standard target):               Goals.
    2766 * clean target <1>:                      Cleanup.
    2767 * clean target:                          Simple Makefile.
    2768 * cleaning up:                           Cleanup.
    2769 * clobber (standard target):             Goals.
    2770 * co <1>:                                Implicit Variables.
    2771 * co:                                    Catalogue of Rules.
     3535                                                              (line  80)
     3536* broken pipe:                           Parallel.            (line  30)
     3537* bugs, reporting:                       Bugs.                (line   6)
     3538* built-in special targets:              Special Targets.     (line   6)
     3539* C++, rule to compile:                  Catalogue of Rules.  (line  39)
     3540* C, rule to compile:                    Catalogue of Rules.  (line  35)
     3541* cc <1>:                                Implicit Variables.  (line  47)
     3542* cc:                                    Catalogue of Rules.  (line  35)
     3543* cd (shell command) <1>:                MAKE Variable.       (line  16)
     3544* cd (shell command):                    Execution.           (line  10)
     3545* chains of rules:                       Chained Rules.       (line   6)
     3546* check (standard target):               Goals.               (line 114)
     3547* clean (standard target):               Goals.               (line  75)
     3548* clean target <1>:                      Cleanup.             (line  11)
     3549* clean target:                          Simple Makefile.     (line  83)
     3550* cleaning up:                           Cleanup.             (line   6)
     3551* clobber (standard target):             Goals.               (line  86)
     3552* co <1>:                                Implicit Variables.  (line  56)
     3553* co:                                    Catalogue of Rules.  (line 164)
    27723554* combining rules by prerequisite:       Combine By Prerequisite.
     3555                                                              (line   6)
    27733556* command line variable definitions, and recursion: Options/Recursion.
    2774 * command line variables:                Overriding.
    2775 * commands:                              Rule Syntax.
    2776 * commands, backslash (\) in:            Execution.
    2777 * commands, comments in:                 Commands.
    2778 * commands, echoing:                     Echoing.
    2779 * commands, empty:                       Empty Commands.
    2780 * commands, errors in:                   Errors.
    2781 * commands, execution:                   Execution.
    2782 * commands, execution in parallel:       Parallel.
    2783 * commands, expansion:                   Shell Function.
    2784 * commands, how to write:                Commands.
     3557                                                              (line  17)
     3558* command line variables:                Overriding.          (line   6)
     3559* command syntax:                        Command Syntax.      (line   6)
     3560* commands:                              Rule Syntax.         (line  26)
     3561* commands setting shell variables:      Execution.           (line  10)
     3562* commands, backslash (\) in:            Splitting Lines.     (line   6)
     3563* commands, comments in:                 Command Syntax.      (line  27)
     3564* commands, echoing:                     Echoing.             (line   6)
     3565* commands, empty:                       Empty Commands.      (line   6)
     3566* commands, errors in:                   Errors.              (line   6)
     3567* commands, execution:                   Execution.           (line   6)
     3568* commands, execution in parallel:       Parallel.            (line   6)
     3569* commands, expansion:                   Shell Function.      (line   6)
     3570* commands, how to write:                Commands.            (line   6)
    27853571* commands, instead of executing:        Instead of Execution.
    2786 * commands, introduction to:             Rule Introduction.
    2787 * commands, quoting newlines in:         Execution.
    2788 * commands, sequences of:                Sequences.
    2789 * comments, in commands:                 Commands.
    2790 * comments, in makefile:                 Makefile Contents.
    2791 * compatibility:                         Features.
    2792 * compatibility in exporting:            Variables/Recursion.
    2793 * compilation, testing:                  Testing.
    2794 * computed variable name:                Computed Names.
    2795 * conditional expansion:                 If Function.
    2796 * conditional variable assignment:       Flavors.
    2797 * conditionals:                          Conditionals.
    2798 * continuation lines:                    Simple Makefile.
     3572                                                              (line   6)
     3573* commands, introduction to:             Rule Introduction.   (line   8)
     3574* commands, quoting newlines in:         Splitting Lines.     (line   6)
     3575* commands, sequences of:                Sequences.           (line   6)
     3576* commands, splitting:                   Splitting Lines.     (line   6)
     3577* commands, using variables in:          Variables in Commands.
     3578                                                              (line   6)
     3579* comments, in commands:                 Command Syntax.      (line  27)
     3580* comments, in makefile:                 Makefile Contents.   (line  41)
     3581* compatibility:                         Features.            (line   6)
     3582* compatibility in exporting:            Variables/Recursion. (line 105)
     3583* compilation, testing:                  Testing.             (line   6)
     3584* computed variable name:                Computed Names.      (line   6)
     3585* conditional expansion:                 Conditional Functions.
     3586                                                              (line   6)
     3587* conditional variable assignment:       Flavors.             (line 129)
     3588* conditionals:                          Conditionals.        (line   6)
     3589* continuation lines:                    Simple Makefile.     (line  40)
    27993590* controlling make:                      Make Control Functions.
     3591                                                              (line   6)
    28003592* conventions for makefiles:             Makefile Conventions.
    2801 * ctangle <1>:                           Implicit Variables.
    2802 * ctangle:                               Catalogue of Rules.
    2803 * cweave <1>:                            Implicit Variables.
    2804 * cweave:                                Catalogue of Rules.
    2805 * data base of make rules:               Options Summary.
    2806 * deducing commands (implicit rules):    make Deduces.
    2807 * default directories for included makefiles: Include.
    2808 * default goal <1>:                      Rules.
    2809 * default goal:                          How Make Works.
    2810 * default makefile name:                 Makefile Names.
    2811 * default rules, last-resort:            Last Resort.
    2812 * define, expansion:                     Reading Makefiles.
    2813 * defining variables verbatim:           Defining.
    2814 * deletion of target files <1>:          Interrupts.
    2815 * deletion of target files:              Errors.
    2816 * directive:                             Makefile Contents.
    2817 * directories, printing them:            -w Option.
    2818 * directories, updating archive symbol:  Archive Symbols.
    2819 * directory part:                        File Name Functions.
    2820 * directory search (VPATH):              Directory Search.
     3593                                                              (line   6)
     3594* ctangle <1>:                           Implicit Variables.  (line 107)
     3595* ctangle:                               Catalogue of Rules.  (line 151)
     3596* cweave <1>:                            Implicit Variables.  (line 101)
     3597* cweave:                                Catalogue of Rules.  (line 151)
     3598* data base of make rules:               Options Summary.     (line 155)
     3599* deducing commands (implicit rules):    make Deduces.        (line   6)
     3600* default directories for included makefiles: Include.        (line  52)
     3601* default goal <1>:                      Rules.               (line  11)
     3602* default goal:                          How Make Works.      (line  11)
     3603* default makefile name:                 Makefile Names.      (line   6)
     3604* default rules, last-resort:            Last Resort.         (line   6)
     3605* define, expansion:                     Reading Makefiles.   (line  33)
     3606* defining variables verbatim:           Defining.            (line   6)
     3607* deletion of target files <1>:          Interrupts.          (line   6)
     3608* deletion of target files:              Errors.              (line  64)
     3609* directive:                             Makefile Contents.   (line  28)
     3610* directories, printing them:            -w Option.           (line   6)
     3611* directories, updating archive symbol:  Archive Symbols.     (line   6)
     3612* directory part:                        File Name Functions. (line  17)
     3613* directory search (VPATH):              Directory Search.    (line   6)
    28213614* directory search (VPATH), and implicit rules: Implicit/Search.
     3615                                                              (line   6)
    28223616* directory search (VPATH), and link libraries: Libraries/Search.
     3617                                                              (line   6)
    28233618* directory search (VPATH), and shell commands: Commands/Search.
    2824 * directory search algorithm:            Search Algorithm.
    2825 * directory search, traditional (GPATH): Search Algorithm.
    2826 * dist (standard target):                Goals.
    2827 * distclean (standard target):           Goals.
    2828 * dollar sign ($), in function call:     Syntax of Functions.
    2829 * dollar sign ($), in rules:             Rule Syntax.
    2830 * dollar sign ($), in variable name:     Computed Names.
    2831 * dollar sign ($), in variable reference: Reference.
    2832 * double-colon rules:                    Double-Colon.
    2833 * duplicate words, removing:             Text Functions.
    2834 * E2BIG:                                 Options/Recursion.
    2835 * echoing of commands:                   Echoing.
    2836 * editor:                                Introduction.
    2837 * Emacs (M-x compile):                   Errors.
    2838 * empty commands:                        Empty Commands.
    2839 * empty targets:                         Empty Targets.
    2840 * environment:                           Environment.
    2841 * environment, and recursion:            Variables/Recursion.
    2842 * environment, SHELL in:                 Execution.
     3619                                                              (line   6)
     3620* directory search algorithm:            Search Algorithm.    (line   6)
     3621* directory search, traditional (GPATH): Search Algorithm.    (line  42)
     3622* dist (standard target):                Goals.               (line 106)
     3623* distclean (standard target):           Goals.               (line  84)
     3624* dollar sign ($), in function call:     Syntax of Functions. (line   6)
     3625* dollar sign ($), in rules:             Rule Syntax.         (line  32)
     3626* dollar sign ($), in variable name:     Computed Names.      (line   6)
     3627* dollar sign ($), in variable reference: Reference.          (line   6)
     3628* DOS, choosing a shell in:              Choosing the Shell.  (line  36)
     3629* double-colon rules:                    Double-Colon.        (line   6)
     3630* duplicate words, removing:             Text Functions.      (line 155)
     3631* E2BIG:                                 Options/Recursion.   (line  57)
     3632* echoing of commands:                   Echoing.             (line   6)
     3633* editor:                                Introduction.        (line  22)
     3634* Emacs (M-x compile):                   Errors.              (line  62)
     3635* empty commands:                        Empty Commands.      (line   6)
     3636* empty targets:                         Empty Targets.       (line   6)
     3637* environment:                           Environment.         (line   6)
     3638* environment, and recursion:            Variables/Recursion. (line   6)
     3639* environment, SHELL in:                 Choosing the Shell.  (line  10)
    28433640* error, stopping on:                    Make Control Functions.
    2844 * errors (in commands):                  Errors.
    2845 * errors with wildcards:                 Wildcard Pitfall.
    2846 * evaluating makefile syntax:            Eval Function.
    2847 * execution, in parallel:                Parallel.
     3641                                                              (line  11)
     3642* errors (in commands):                  Errors.              (line   6)
     3643* errors with wildcards:                 Wildcard Pitfall.    (line   6)
     3644* evaluating makefile syntax:            Eval Function.       (line   6)
     3645* execution, in parallel:                Parallel.            (line   6)
    28483646* execution, instead of:                 Instead of Execution.
    2849 * execution, of commands:                Execution.
    2850 * exit status (errors):                  Errors.
    2851 * explicit rule, definition of:          Makefile Contents.
    2852 * explicit rule, expansion:              Reading Makefiles.
    2853 * exporting variables:                   Variables/Recursion.
    2854 * f77 <1>:                               Implicit Variables.
    2855 * f77:                                   Catalogue of Rules.
     3647                                                              (line   6)
     3648* execution, of commands:                Execution.           (line   6)
     3649* exit status (errors):                  Errors.              (line   6)
     3650* exit status of make:                   Running.             (line  18)
     3651* expansion, secondary:                  Secondary Expansion. (line   6)
     3652* explicit rule, definition of:          Makefile Contents.   (line  10)
     3653* explicit rule, expansion:              Reading Makefiles.   (line  62)
     3654* explicit rules, secondary expansion of: Secondary Expansion.
     3655                                                              (line 106)
     3656* exporting variables:                   Variables/Recursion. (line   6)
     3657* f77 <1>:                               Implicit Variables.  (line  64)
     3658* f77:                                   Catalogue of Rules.  (line  49)
    28563659* FDL, GNU Free Documentation License:   GNU Free Documentation License.
    2857 * features of GNU make:                  Features.
    2858 * features, missing:                     Missing.
    2859 * file name functions:                   File Name Functions.
    2860 * file name of makefile:                 Makefile Names.
    2861 * file name of makefile, how to specify: Makefile Names.
    2862 * file name prefix, adding:              File Name Functions.
    2863 * file name suffix:                      File Name Functions.
    2864 * file name suffix, adding:              File Name Functions.
    2865 * file name with wildcards:              Wildcards.
    2866 * file name, basename of:                File Name Functions.
    2867 * file name, directory part:             File Name Functions.
    2868 * file name, nondirectory part:          File Name Functions.
     3660                                                              (line   6)
     3661* features of GNU make:                  Features.            (line   6)
     3662* features, missing:                     Missing.             (line   6)
     3663* file name functions:                   File Name Functions. (line   6)
     3664* file name of makefile:                 Makefile Names.      (line   6)
     3665* file name of makefile, how to specify: Makefile Names.      (line  30)
     3666* file name prefix, adding:              File Name Functions. (line  79)
     3667* file name suffix:                      File Name Functions. (line  43)
     3668* file name suffix, adding:              File Name Functions. (line  68)
     3669* file name with wildcards:              Wildcards.           (line   6)
     3670* file name, abspath of:                 File Name Functions. (line 121)
     3671* file name, basename of:                File Name Functions. (line  57)
     3672* file name, directory part:             File Name Functions. (line  17)
     3673* file name, nondirectory part:          File Name Functions. (line  27)
     3674* file name, realpath of:                File Name Functions. (line 114)
    28693675* files, assuming new:                   Instead of Execution.
     3676                                                              (line  33)
    28703677* files, assuming old:                   Avoiding Compilation.
     3678                                                              (line   6)
    28713679* files, avoiding recompilation of:      Avoiding Compilation.
    2872 * files, intermediate:                   Chained Rules.
    2873 * filtering out words:                   Text Functions.
    2874 * filtering words:                       Text Functions.
    2875 * finding strings:                       Text Functions.
    2876 * flags:                                 Options Summary.
    2877 * flags for compilers:                   Implicit Variables.
    2878 * flavors of variables:                  Flavors.
    2879 * FORCE:                                 Force Targets.
    2880 * force targets:                         Force Targets.
    2881 * Fortran, rule to compile:              Catalogue of Rules.
    2882 * functions:                             Functions.
     3680                                                              (line   6)
     3681* files, intermediate:                   Chained Rules.       (line  16)
     3682* filtering out words:                   Text Functions.      (line 132)
     3683* filtering words:                       Text Functions.      (line 114)
     3684* finding strings:                       Text Functions.      (line 103)
     3685* flags:                                 Options Summary.     (line   6)
     3686* flags for compilers:                   Implicit Variables.  (line   6)
     3687* flavor of variable:                    Flavor Function.     (line   6)
     3688* flavors of variables:                  Flavors.             (line   6)
     3689* FORCE:                                 Force Targets.       (line   6)
     3690* force targets:                         Force Targets.       (line   6)
     3691* Fortran, rule to compile:              Catalogue of Rules.  (line  49)
     3692* functions:                             Functions.           (line   6)
    28833693* functions, for controlling make:       Make Control Functions.
    2884 * functions, for file names:             File Name Functions.
    2885 * functions, for text:                   Text Functions.
    2886 * functions, syntax of:                  Syntax of Functions.
    2887 * functions, user defined:               Call Function.
    2888 * g++ <1>:                               Implicit Variables.
    2889 * g++:                                   Catalogue of Rules.
    2890 * gcc:                                   Catalogue of Rules.
     3694                                                              (line   6)
     3695* functions, for file names:             File Name Functions. (line   6)
     3696* functions, for text:                   Text Functions.      (line   6)
     3697* functions, syntax of:                  Syntax of Functions. (line   6)
     3698* functions, user defined:               Call Function.       (line   6)
     3699* g++ <1>:                               Implicit Variables.  (line  53)
     3700* g++:                                   Catalogue of Rules.  (line  39)
     3701* gcc:                                   Catalogue of Rules.  (line  35)
    28913702* generating prerequisites automatically <1>: Automatic Prerequisites.
    2892 * generating prerequisites automatically: Include.
    2893 * get <1>:                               Implicit Variables.
    2894 * get:                                   Catalogue of Rules.
    2895 * globbing (wildcards):                  Wildcards.
    2896 * goal:                                  How Make Works.
    2897 * goal, default <1>:                     Rules.
    2898 * goal, default:                         How Make Works.
    2899 * goal, how to specify:                  Goals.
    2900 * home directory:                        Wildcards.
    2901 * IEEE Standard 1003.2:                  Overview.
    2902 * ifdef, expansion:                      Reading Makefiles.
    2903 * ifeq, expansion:                       Reading Makefiles.
    2904 * ifndef, expansion:                     Reading Makefiles.
    2905 * ifneq, expansion:                      Reading Makefiles.
    2906 * implicit rule:                         Implicit Rules.
    2907 * implicit rule, and directory search:   Implicit/Search.
    2908 * implicit rule, and VPATH:              Implicit/Search.
    2909 * implicit rule, definition of:          Makefile Contents.
    2910 * implicit rule, expansion:              Reading Makefiles.
    2911 * implicit rule, how to use:             Using Implicit.
    2912 * implicit rule, introduction to:        make Deduces.
    2913 * implicit rule, predefined:             Catalogue of Rules.
     3703                                                              (line   6)
     3704* generating prerequisites automatically: Include.            (line  50)
     3705* get <1>:                               Implicit Variables.  (line  67)
     3706* get:                                   Catalogue of Rules.  (line 173)
     3707* globbing (wildcards):                  Wildcards.           (line   6)
     3708* goal:                                  How Make Works.      (line  11)
     3709* goal, default <1>:                     Rules.               (line  11)
     3710* goal, default:                         How Make Works.      (line  11)
     3711* goal, how to specify:                  Goals.               (line   6)
     3712* home directory:                        Wildcards.           (line  11)
     3713* IEEE Standard 1003.2:                  Overview.            (line  13)
     3714* ifdef, expansion:                      Reading Makefiles.   (line  51)
     3715* ifeq, expansion:                       Reading Makefiles.   (line  51)
     3716* ifndef, expansion:                     Reading Makefiles.   (line  51)
     3717* ifneq, expansion:                      Reading Makefiles.   (line  51)
     3718* implicit rule:                         Implicit Rules.      (line   6)
     3719* implicit rule, and directory search:   Implicit/Search.     (line   6)
     3720* implicit rule, and VPATH:              Implicit/Search.     (line   6)
     3721* implicit rule, definition of:          Makefile Contents.   (line  16)
     3722* implicit rule, expansion:              Reading Makefiles.   (line  62)
     3723* implicit rule, how to use:             Using Implicit.      (line   6)
     3724* implicit rule, introduction to:        make Deduces.        (line   6)
     3725* implicit rule, predefined:             Catalogue of Rules.  (line   6)
    29143726* implicit rule, search algorithm:       Implicit Rule Search.
    2915 * included makefiles, default directories: Include.
     3727                                                              (line   6)
     3728* implicit rules, secondary expansion of: Secondary Expansion.
     3729                                                              (line 146)
     3730* included makefiles, default directories: Include.           (line  52)
    29163731* including (MAKEFILE_LIST variable):    MAKEFILE_LIST Variable.
    2917 * including (MAKEFILES variable):        MAKEFILES Variable.
    2918 * including other makefiles:             Include.
    2919 * incompatibilities:                     Missing.
    2920 * Info, rule to format:                  Catalogue of Rules.
    2921 * install (standard target):             Goals.
    2922 * intermediate files:                    Chained Rules.
    2923 * intermediate files, preserving:        Chained Rules.
    2924 * intermediate targets, explicit:        Special Targets.
    2925 * interrupt:                             Interrupts.
    2926 * job slots:                             Parallel.
    2927 * job slots, and recursion:              Options/Recursion.
    2928 * jobs, limiting based on load:          Parallel.
    2929 * joining lists of words:                File Name Functions.
    2930 * killing (interruption):                Interrupts.
    2931 * last-resort default rules:             Last Resort.
    2932 * ld:                                    Catalogue of Rules.
    2933 * lex <1>:                               Implicit Variables.
    2934 * lex:                                   Catalogue of Rules.
    2935 * Lex, rule to run:                      Catalogue of Rules.
    2936 * libraries for linking, directory search: Libraries/Search.
     3732                                                              (line   6)
     3733* including (MAKEFILES variable):        MAKEFILES Variable.  (line   6)
     3734* including other makefiles:             Include.             (line   6)
     3735* incompatibilities:                     Missing.             (line   6)
     3736* Info, rule to format:                  Catalogue of Rules.  (line 158)
     3737* install (standard target):             Goals.               (line  92)
     3738* intermediate files:                    Chained Rules.       (line  16)
     3739* intermediate files, preserving:        Chained Rules.       (line  46)
     3740* intermediate targets, explicit:        Special Targets.     (line  44)
     3741* interrupt:                             Interrupts.          (line   6)
     3742* job slots:                             Parallel.            (line   6)
     3743* job slots, and recursion:              Options/Recursion.   (line  25)
     3744* jobs, limiting based on load:          Parallel.            (line  57)
     3745* joining lists of words:                File Name Functions. (line  90)
     3746* killing (interruption):                Interrupts.          (line   6)
     3747* last-resort default rules:             Last Resort.         (line   6)
     3748* ld:                                    Catalogue of Rules.  (line  86)
     3749* lex <1>:                               Implicit Variables.  (line  71)
     3750* lex:                                   Catalogue of Rules.  (line 124)
     3751* Lex, rule to run:                      Catalogue of Rules.  (line 124)
     3752* libraries for linking, directory search: Libraries/Search.  (line   6)
    29373753* library archive, suffix rule for:      Archive Suffix Rules.
    2938 * limiting jobs based on load:           Parallel.
    2939 * link libraries, and directory search:  Libraries/Search.
    2940 * link libraries, patterns matching:     Libraries/Search.
    2941 * linking, predefined rule for:          Catalogue of Rules.
    2942 * lint:                                  Catalogue of Rules.
    2943 * lint, rule to run:                     Catalogue of Rules.
    2944 * list of all prerequisites:             Automatic Variables.
    2945 * list of changed prerequisites:         Automatic Variables.
    2946 * load average:                          Parallel.
    2947 * loops in variable expansion:           Flavors.
    2948 * lpr (shell command) <1>:               Empty Targets.
    2949 * lpr (shell command):                   Wildcard Examples.
    2950 * m2c:                                   Catalogue of Rules.
    2951 * macro:                                 Using Variables.
     3754                                                              (line   6)
     3755* limiting jobs based on load:           Parallel.            (line  57)
     3756* link libraries, and directory search:  Libraries/Search.    (line   6)
     3757* link libraries, patterns matching:     Libraries/Search.    (line   6)
     3758* linking, predefined rule for:          Catalogue of Rules.  (line  86)
     3759* lint <1>:                              Implicit Variables.  (line  78)
     3760* lint:                                  Catalogue of Rules.  (line 146)
     3761* lint, rule to run:                     Catalogue of Rules.  (line 146)
     3762* list of all prerequisites:             Automatic Variables. (line  61)
     3763* list of changed prerequisites:         Automatic Variables. (line  51)
     3764* load average:                          Parallel.            (line  57)
     3765* loops in variable expansion:           Flavors.             (line  44)
     3766* lpr (shell command) <1>:               Empty Targets.       (line  25)
     3767* lpr (shell command):                   Wildcard Examples.   (line  21)
     3768* m2c <1>:                               Implicit Variables.  (line  81)
     3769* m2c:                                   Catalogue of Rules.  (line  74)
     3770* macro:                                 Using Variables.     (line  10)
    29523771* make depend:                           Automatic Prerequisites.
    2953 * MAKECMDGOALS:                          Goals.
    2954 * makefile:                              Introduction.
    2955 * makefile name:                         Makefile Names.
    2956 * makefile name, how to specify:         Makefile Names.
    2957 * makefile rule parts:                   Rule Introduction.
    2958 * makefile syntax, evaluating:           Eval Function.
    2959 * makefile, and MAKEFILES variable:      MAKEFILES Variable.
     3772                                                              (line  37)
     3773* makefile:                              Introduction.        (line   7)
     3774* makefile name:                         Makefile Names.      (line   6)
     3775* makefile name, how to specify:         Makefile Names.      (line  30)
     3776* makefile rule parts:                   Rule Introduction.   (line   6)
     3777* makefile syntax, evaluating:           Eval Function.       (line   6)
     3778* makefile, and MAKEFILES variable:      MAKEFILES Variable.  (line   6)
    29603779* makefile, conventions for:             Makefile Conventions.
    2961 * makefile, how make processes:          How Make Works.
    2962 * makefile, how to write:                Makefiles.
    2963 * makefile, including:                   Include.
     3780                                                              (line   6)
     3781* makefile, how make processes:          How Make Works.      (line   6)
     3782* makefile, how to write:                Makefiles.           (line   6)
     3783* makefile, including:                   Include.             (line   6)
    29643784* makefile, overriding:                  Overriding Makefiles.
    2965 * makefile, parsing:                     Reading Makefiles.
    2966 * makefile, remaking of:                 Remaking Makefiles.
    2967 * makefile, simple:                      Simple Makefile.
     3785                                                              (line   6)
     3786* makefile, parsing:                     Reading Makefiles.   (line   6)
     3787* makefile, remaking of:                 Remaking Makefiles.  (line   6)
     3788* makefile, simple:                      Simple Makefile.     (line   6)
    29683789* makefiles, and MAKEFILE_LIST variable: MAKEFILE_LIST Variable.
    2969 * makefiles, and special variables:      Special Variables.
    2970 * makeinfo <1>:                          Implicit Variables.
    2971 * makeinfo:                              Catalogue of Rules.
     3790                                                              (line   6)
     3791* makefiles, and special variables:      Special Variables.   (line   6)
     3792* makeinfo <1>:                          Implicit Variables.  (line  88)
     3793* makeinfo:                              Catalogue of Rules.  (line 158)
    29723794* match-anything rule:                   Match-Anything Rules.
     3795                                                              (line   6)
    29733796* match-anything rule, used to override: Overriding Makefiles.
    2974 * missing features:                      Missing.
    2975 * mistakes with wildcards:               Wildcard Pitfall.
    2976 * modified variable reference:           Substitution Refs.
    2977 * Modula-2, rule to compile:             Catalogue of Rules.
    2978 * mostlyclean (standard target):         Goals.
    2979 * multiple rules for one target:         Multiple Rules.
    2980 * multiple rules for one target (::):    Double-Colon.
    2981 * multiple targets:                      Multiple Targets.
    2982 * multiple targets, in pattern rule:     Pattern Intro.
    2983 * name of makefile:                      Makefile Names.
    2984 * name of makefile, how to specify:      Makefile Names.
    2985 * nested variable reference:             Computed Names.
    2986 * newline, quoting, in commands:         Execution.
    2987 * newline, quoting, in makefile:         Simple Makefile.
    2988 * nondirectory part:                     File Name Functions.
    2989 * normal prerequisites:                  Prerequisite Types.
    2990 * OBJ:                                   Variables Simplify.
    2991 * obj:                                   Variables Simplify.
    2992 * OBJECTS:                               Variables Simplify.
    2993 * objects:                               Variables Simplify.
    2994 * OBJS:                                  Variables Simplify.
    2995 * objs:                                  Variables Simplify.
    2996 * old-fashioned suffix rules:            Suffix Rules.
    2997 * options:                               Options Summary.
    2998 * options, and recursion:                Options/Recursion.
    2999 * options, setting from environment:     Options/Recursion.
    3000 * options, setting in makefiles:         Options/Recursion.
    3001 * order of pattern rules:                Pattern Intro.
    3002 * order-only prerequisites:              Prerequisite Types.
    3003 * origin of variable:                    Origin Function.
     3797                                                              (line  12)
     3798* missing features:                      Missing.             (line   6)
     3799* mistakes with wildcards:               Wildcard Pitfall.    (line   6)
     3800* modified variable reference:           Substitution Refs.   (line   6)
     3801* Modula-2, rule to compile:             Catalogue of Rules.  (line  74)
     3802* mostlyclean (standard target):         Goals.               (line  78)
     3803* multiple rules for one target:         Multiple Rules.      (line   6)
     3804* multiple rules for one target (::):    Double-Colon.        (line   6)
     3805* multiple targets:                      Multiple Targets.    (line   6)
     3806* multiple targets, in pattern rule:     Pattern Intro.       (line  49)
     3807* name of makefile:                      Makefile Names.      (line   6)
     3808* name of makefile, how to specify:      Makefile Names.      (line  30)
     3809* nested variable reference:             Computed Names.      (line   6)
     3810* newline, quoting, in commands:         Splitting Lines.     (line   6)
     3811* newline, quoting, in makefile:         Simple Makefile.     (line  40)
     3812* nondirectory part:                     File Name Functions. (line  27)
     3813* normal prerequisites:                  Prerequisite Types.  (line   6)
     3814* OBJ:                                   Variables Simplify.  (line  20)
     3815* obj:                                   Variables Simplify.  (line  20)
     3816* OBJECTS:                               Variables Simplify.  (line  20)
     3817* objects:                               Variables Simplify.  (line  14)
     3818* OBJS:                                  Variables Simplify.  (line  20)
     3819* objs:                                  Variables Simplify.  (line  20)
     3820* old-fashioned suffix rules:            Suffix Rules.        (line   6)
     3821* options:                               Options Summary.     (line   6)
     3822* options, and recursion:                Options/Recursion.   (line   6)
     3823* options, setting from environment:     Options/Recursion.   (line  81)
     3824* options, setting in makefiles:         Options/Recursion.   (line  81)
     3825* order of pattern rules:                Pattern Intro.       (line  57)
     3826* order-only prerequisites:              Prerequisite Types.  (line   6)
     3827* origin of variable:                    Origin Function.     (line   6)
    30043828* overriding makefiles:                  Overriding Makefiles.
    3005 * overriding variables with arguments:   Overriding.
    3006 * overriding with override:              Override Directive.
    3007 * parallel execution:                    Parallel.
    3008 * parallel execution, and archive update: Archive Pitfalls.
    3009 * parallel execution, overriding:        Special Targets.
    3010 * parts of makefile rule:                Rule Introduction.
    3011 * Pascal, rule to compile:               Catalogue of Rules.
    3012 * pattern rule:                          Pattern Intro.
    3013 * pattern rule, expansion:               Reading Makefiles.
    3014 * pattern rules, order of:               Pattern Intro.
    3015 * pattern rules, static (not implicit):  Static Pattern.
    3016 * pattern rules, static, syntax of:      Static Usage.
    3017 * pattern-specific variables:            Pattern-specific.
    3018 * pc <1>:                                Implicit Variables.
    3019 * pc:                                    Catalogue of Rules.
    3020 * phony targets:                         Phony Targets.
    3021 * pitfalls of wildcards:                 Wildcard Pitfall.
    3022 * portability:                           Features.
    3023 * POSIX:                                 Overview.
    3024 * POSIX.2:                               Options/Recursion.
     3829                                                              (line   6)
     3830* overriding variables with arguments:   Overriding.          (line   6)
     3831* overriding with override:              Override Directive.  (line   6)
     3832* parallel execution:                    Parallel.            (line   6)
     3833* parallel execution, and archive update: Archive Pitfalls.   (line   6)
     3834* parallel execution, overriding:        Special Targets.     (line 135)
     3835* parts of makefile rule:                Rule Introduction.   (line   6)
     3836* Pascal, rule to compile:               Catalogue of Rules.  (line  45)
     3837* pattern rule:                          Pattern Intro.       (line   6)
     3838* pattern rule, expansion:               Reading Makefiles.   (line  62)
     3839* pattern rules, order of:               Pattern Intro.       (line  57)
     3840* pattern rules, static (not implicit):  Static Pattern.      (line   6)
     3841* pattern rules, static, syntax of:      Static Usage.        (line   6)
     3842* pattern-specific variables:            Pattern-specific.    (line   6)
     3843* pc <1>:                                Implicit Variables.  (line  84)
     3844* pc:                                    Catalogue of Rules.  (line  45)
     3845* phony targets:                         Phony Targets.       (line   6)
     3846* pitfalls of wildcards:                 Wildcard Pitfall.    (line   6)
     3847* portability:                           Features.            (line   6)
     3848* POSIX:                                 Overview.            (line  13)
     3849* POSIX.2:                               Options/Recursion.   (line  60)
    30253850* post-installation commands:            Install Command Categories.
     3851                                                              (line   6)
    30263852* pre-installation commands:             Install Command Categories.
    3027 * precious targets:                      Special Targets.
    3028 * predefined rules and variables, printing: Options Summary.
    3029 * prefix, adding:                        File Name Functions.
    3030 * prerequisite:                          Rules.
    3031 * prerequisite pattern, implicit:        Pattern Intro.
    3032 * prerequisite pattern, static (not implicit): Static Usage.
    3033 * prerequisite types:                    Prerequisite Types.
    3034 * prerequisite, expansion:               Reading Makefiles.
    3035 * prerequisites:                         Rule Syntax.
     3853                                                              (line   6)
     3854* precious targets:                      Special Targets.     (line  29)
     3855* predefined rules and variables, printing: Options Summary.  (line 155)
     3856* prefix, adding:                        File Name Functions. (line  79)
     3857* prerequisite:                          Rules.               (line   6)
     3858* prerequisite pattern, implicit:        Pattern Intro.       (line  22)
     3859* prerequisite pattern, static (not implicit): Static Usage.  (line  30)
     3860* prerequisite types:                    Prerequisite Types.  (line   6)
     3861* prerequisite, expansion:               Reading Makefiles.   (line  62)
     3862* prerequisites:                         Rule Syntax.         (line  46)
    30363863* prerequisites, and automatic variables: Automatic Variables.
     3864                                                              (line  17)
    30373865* prerequisites, automatic generation <1>: Automatic Prerequisites.
    3038 * prerequisites, automatic generation:   Include.
    3039 * prerequisites, introduction to:        Rule Introduction.
    3040 * prerequisites, list of all:            Automatic Variables.
    3041 * prerequisites, list of changed:        Automatic Variables.
    3042 * prerequisites, normal:                 Prerequisite Types.
    3043 * prerequisites, order-only:             Prerequisite Types.
    3044 * prerequisites, varying (static pattern): Static Pattern.
    3045 * preserving intermediate files:         Chained Rules.
    3046 * preserving with .PRECIOUS <1>:         Chained Rules.
    3047 * preserving with .PRECIOUS:             Special Targets.
    3048 * preserving with .SECONDARY:            Special Targets.
    3049 * print (standard target):               Goals.
    3050 * print target <1>:                      Empty Targets.
    3051 * print target:                          Wildcard Examples.
    3052 * printing directories:                  -w Option.
    3053 * printing of commands:                  Echoing.
     3866                                                              (line   6)
     3867* prerequisites, automatic generation:   Include.             (line  50)
     3868* prerequisites, introduction to:        Rule Introduction.   (line   8)
     3869* prerequisites, list of all:            Automatic Variables. (line  61)
     3870* prerequisites, list of changed:        Automatic Variables. (line  51)
     3871* prerequisites, normal:                 Prerequisite Types.  (line   6)
     3872* prerequisites, order-only:             Prerequisite Types.  (line   6)
     3873* prerequisites, varying (static pattern): Static Pattern.    (line   6)
     3874* preserving intermediate files:         Chained Rules.       (line  46)
     3875* preserving with .PRECIOUS <1>:         Chained Rules.       (line  56)
     3876* preserving with .PRECIOUS:             Special Targets.     (line  29)
     3877* preserving with .SECONDARY:            Special Targets.     (line  49)
     3878* print (standard target):               Goals.               (line  97)
     3879* print target <1>:                      Empty Targets.       (line  25)
     3880* print target:                          Wildcard Examples.   (line  21)
     3881* printing directories:                  -w Option.           (line   6)
     3882* printing messages:                     Make Control Functions.
     3883                                                              (line  43)
     3884* printing of commands:                  Echoing.             (line   6)
    30543885* printing user warnings:                Make Control Functions.
    3055 * problems and bugs, reporting:          Bugs.
    3056 * problems with wildcards:               Wildcard Pitfall.
    3057 * processing a makefile:                 How Make Works.
     3886                                                              (line  35)
     3887* problems and bugs, reporting:          Bugs.                (line   6)
     3888* problems with wildcards:               Wildcard Pitfall.    (line   6)
     3889* processing a makefile:                 How Make Works.      (line   6)
    30583890* question mode:                         Instead of Execution.
    3059 * quoting %, in patsubst:                Text Functions.
    3060 * quoting %, in static pattern:          Static Usage.
    3061 * quoting %, in vpath:                   Selective Search.
    3062 * quoting newline, in commands:          Execution.
    3063 * quoting newline, in makefile:          Simple Makefile.
    3064 * Ratfor, rule to compile:               Catalogue of Rules.
    3065 * RCS, rule to extract from:             Catalogue of Rules.
    3066 * reading makefiles:                     Reading Makefiles.
    3067 * README:                                Makefile Names.
    3068 * realclean (standard target):           Goals.
    3069 * recompilation:                         Introduction.
     3891                                                              (line  25)
     3892* quoting %, in patsubst:                Text Functions.      (line  26)
     3893* quoting %, in static pattern:          Static Usage.        (line  37)
     3894* quoting %, in vpath:                   Selective Search.    (line  38)
     3895* quoting newline, in commands:          Splitting Lines.     (line   6)
     3896* quoting newline, in makefile:          Simple Makefile.     (line  40)
     3897* Ratfor, rule to compile:               Catalogue of Rules.  (line  49)
     3898* RCS, rule to extract from:             Catalogue of Rules.  (line 164)
     3899* reading makefiles:                     Reading Makefiles.   (line   6)
     3900* README:                                Makefile Names.      (line   9)
     3901* realclean (standard target):           Goals.               (line  85)
     3902* realpath:                              File Name Functions. (line 114)
     3903* recompilation:                         Introduction.        (line  22)
    30703904* recompilation, avoiding:               Avoiding Compilation.
    3071 * recording events with empty targets:   Empty Targets.
    3072 * recursion:                             Recursion.
    3073 * recursion, and -C:                     Options/Recursion.
    3074 * recursion, and -f:                     Options/Recursion.
    3075 * recursion, and -j:                     Options/Recursion.
    3076 * recursion, and -o:                     Options/Recursion.
    3077 * recursion, and -t:                     MAKE Variable.
    3078 * recursion, and -w:                     -w Option.
    3079 * recursion, and -W:                     Options/Recursion.
     3905                                                              (line   6)
     3906* recording events with empty targets:   Empty Targets.       (line   6)
     3907* recursion:                             Recursion.           (line   6)
     3908* recursion, and -C:                     Options/Recursion.   (line  22)
     3909* recursion, and -f:                     Options/Recursion.   (line  22)
     3910* recursion, and -j:                     Options/Recursion.   (line  25)
     3911* recursion, and -o:                     Options/Recursion.   (line  22)
     3912* recursion, and -t:                     MAKE Variable.       (line  34)
     3913* recursion, and -w:                     -w Option.           (line  20)
     3914* recursion, and -W:                     Options/Recursion.   (line  22)
    30803915* recursion, and command line variable definitions: Options/Recursion.
    3081 * recursion, and environment:            Variables/Recursion.
    3082 * recursion, and MAKE variable:          MAKE Variable.
    3083 * recursion, and MAKEFILES variable:     MAKEFILES Variable.
    3084 * recursion, and options:                Options/Recursion.
    3085 * recursion, and printing directories:   -w Option.
    3086 * recursion, and variables:              Variables/Recursion.
    3087 * recursion, level of:                   Variables/Recursion.
    3088 * recursive variable expansion <1>:      Flavors.
    3089 * recursive variable expansion:          Using Variables.
    3090 * recursively expanded variables:        Flavors.
    3091 * reference to variables <1>:            Advanced.
    3092 * reference to variables:                Reference.
    3093 * relinking:                             How Make Works.
    3094 * remaking makefiles:                    Remaking Makefiles.
    3095 * removal of target files <1>:           Interrupts.
    3096 * removal of target files:               Errors.
    3097 * removing duplicate words:              Text Functions.
    3098 * removing targets on failure:           Special Targets.
    3099 * removing, to clean up:                 Cleanup.
    3100 * reporting bugs:                        Bugs.
    3101 * rm:                                    Implicit Variables.
    3102 * rm (shell command) <1>:                Errors.
    3103 * rm (shell command) <2>:                Phony Targets.
    3104 * rm (shell command) <3>:                Wildcard Examples.
    3105 * rm (shell command):                    Simple Makefile.
    3106 * rule commands:                         Commands.
    3107 * rule prerequisites:                    Rule Syntax.
    3108 * rule syntax:                           Rule Syntax.
    3109 * rule targets:                          Rule Syntax.
    3110 * rule, and $:                           Rule Syntax.
    3111 * rule, double-colon (::):               Double-Colon.
    3112 * rule, explicit, definition of:         Makefile Contents.
    3113 * rule, how to write:                    Rules.
    3114 * rule, implicit:                        Implicit Rules.
    3115 * rule, implicit, and directory search:  Implicit/Search.
    3116 * rule, implicit, and VPATH:             Implicit/Search.
    3117 * rule, implicit, chains of:             Chained Rules.
    3118 * rule, implicit, definition of:         Makefile Contents.
    3119 * rule, implicit, how to use:            Using Implicit.
    3120 * rule, implicit, introduction to:       make Deduces.
    3121 * rule, implicit, predefined:            Catalogue of Rules.
    3122 * rule, introduction to:                 Rule Introduction.
    3123 * rule, multiple for one target:         Multiple Rules.
    3124 * rule, no commands or prerequisites:    Force Targets.
    3125 * rule, pattern:                         Pattern Intro.
    3126 * rule, static pattern:                  Static Pattern.
     3916                                                              (line  17)
     3917* recursion, and environment:            Variables/Recursion. (line   6)
     3918* recursion, and MAKE variable:          MAKE Variable.       (line   6)
     3919* recursion, and MAKEFILES variable:     MAKEFILES Variable.  (line  14)
     3920* recursion, and options:                Options/Recursion.   (line   6)
     3921* recursion, and printing directories:   -w Option.           (line   6)
     3922* recursion, and variables:              Variables/Recursion. (line   6)
     3923* recursion, level of:                   Variables/Recursion. (line 115)
     3924* recursive variable expansion <1>:      Flavors.             (line   6)
     3925* recursive variable expansion:          Using Variables.     (line   6)
     3926* recursively expanded variables:        Flavors.             (line   6)
     3927* reference to variables <1>:            Advanced.            (line   6)
     3928* reference to variables:                Reference.           (line   6)
     3929* relinking:                             How Make Works.      (line  46)
     3930* remaking makefiles:                    Remaking Makefiles.  (line   6)
     3931* removal of target files <1>:           Interrupts.          (line   6)
     3932* removal of target files:               Errors.              (line  64)
     3933* removing duplicate words:              Text Functions.      (line 155)
     3934* removing targets on failure:           Special Targets.     (line  68)
     3935* removing, to clean up:                 Cleanup.             (line   6)
     3936* reporting bugs:                        Bugs.                (line   6)
     3937* rm:                                    Implicit Variables.  (line 110)
     3938* rm (shell command) <1>:                Errors.              (line  27)
     3939* rm (shell command) <2>:                Phony Targets.       (line  20)
     3940* rm (shell command) <3>:                Wildcard Examples.   (line  12)
     3941* rm (shell command):                    Simple Makefile.     (line  83)
     3942* rule commands:                         Commands.            (line   6)
     3943* rule prerequisites:                    Rule Syntax.         (line  46)
     3944* rule syntax:                           Rule Syntax.         (line   6)
     3945* rule targets:                          Rule Syntax.         (line  18)
     3946* rule, double-colon (::):               Double-Colon.        (line   6)
     3947* rule, explicit, definition of:         Makefile Contents.   (line  10)
     3948* rule, how to write:                    Rules.               (line   6)
     3949* rule, implicit:                        Implicit Rules.      (line   6)
     3950* rule, implicit, and directory search:  Implicit/Search.     (line   6)
     3951* rule, implicit, and VPATH:             Implicit/Search.     (line   6)
     3952* rule, implicit, chains of:             Chained Rules.       (line   6)
     3953* rule, implicit, definition of:         Makefile Contents.   (line  16)
     3954* rule, implicit, how to use:            Using Implicit.      (line   6)
     3955* rule, implicit, introduction to:       make Deduces.        (line   6)
     3956* rule, implicit, predefined:            Catalogue of Rules.  (line   6)
     3957* rule, introduction to:                 Rule Introduction.   (line   6)
     3958* rule, multiple for one target:         Multiple Rules.      (line   6)
     3959* rule, no commands or prerequisites:    Force Targets.       (line   6)
     3960* rule, pattern:                         Pattern Intro.       (line   6)
     3961* rule, static pattern:                  Static Pattern.      (line   6)
    31273962* rule, static pattern versus implicit:  Static versus Implicit.
    3128 * rule, with multiple targets:           Multiple Targets.
    3129 * s. (SCCS file prefix):                 Catalogue of Rules.
    3130 * SCCS, rule to extract from:            Catalogue of Rules.
     3963                                                              (line   6)
     3964* rule, with multiple targets:           Multiple Targets.    (line   6)
     3965* rules, and $:                          Rule Syntax.         (line  32)
     3966* s. (SCCS file prefix):                 Catalogue of Rules.  (line 173)
     3967* SCCS, rule to extract from:            Catalogue of Rules.  (line 173)
    31313968* search algorithm, implicit rule:       Implicit Rule Search.
    3132 * search path for prerequisites (VPATH): Directory Search.
     3969                                                              (line   6)
     3970* search path for prerequisites (VPATH): Directory Search.    (line   6)
    31333971* search path for prerequisites (VPATH), and implicit rules: Implicit/Search.
     3972                                                              (line   6)
    31343973* search path for prerequisites (VPATH), and link libraries: Libraries/Search.
    3135 * searching for strings:                 Text Functions.
    3136 * secondary files:                       Chained Rules.
    3137 * secondary targets:                     Special Targets.
     3974                                                              (line   6)
     3975* searching for strings:                 Text Functions.      (line 103)
     3976* secondary expansion:                   Secondary Expansion. (line   6)
     3977* secondary expansion and explicit rules: Secondary Expansion.
     3978                                                              (line 106)
     3979* secondary expansion and implicit rules: Secondary Expansion.
     3980                                                              (line 146)
     3981* secondary expansion and static pattern rules: Secondary Expansion.
     3982                                                              (line 138)
     3983* secondary files:                       Chained Rules.       (line  46)
     3984* secondary targets:                     Special Targets.     (line  49)
    31383985* sed (shell command):                   Automatic Prerequisites.
    3139 * selecting a word:                      Text Functions.
    3140 * selecting word lists:                  Text Functions.
    3141 * sequences of commands:                 Sequences.
    3142 * setting options from environment:      Options/Recursion.
    3143 * setting options in makefiles:          Options/Recursion.
    3144 * setting variables:                     Setting.
    3145 * several rules for one target:          Multiple Rules.
    3146 * several targets in a rule:             Multiple Targets.
    3147 * shar (standard target):                Goals.
    3148 * shell command:                         Simple Makefile.
    3149 * shell command, and directory search:   Commands/Search.
    3150 * shell command, execution:              Execution.
    3151 * shell command, function for:           Shell Function.
    3152 * shell file name pattern (in include):  Include.
    3153 * shell wildcards (in include):          Include.
    3154 * SHELL, MS-DOS specifics:               Execution.
    3155 * signal:                                Interrupts.
    3156 * silent operation:                      Echoing.
    3157 * simple makefile:                       Simple Makefile.
    3158 * simple variable expansion:             Using Variables.
    3159 * simplifying with variables:            Variables Simplify.
    3160 * simply expanded variables:             Flavors.
    3161 * sorting words:                         Text Functions.
    3162 * spaces, in variable values:            Flavors.
    3163 * spaces, stripping:                     Text Functions.
    3164 * special targets:                       Special Targets.
    3165 * special variables:                     Special Variables.
    3166 * specifying makefile name:              Makefile Names.
    3167 * standard input:                        Parallel.
    3168 * standards conformance:                 Overview.
     3986                                                              (line  73)
     3987* selecting a word:                      Text Functions.      (line 159)
     3988* selecting word lists:                  Text Functions.      (line 168)
     3989* sequences of commands:                 Sequences.           (line   6)
     3990* setting options from environment:      Options/Recursion.   (line  81)
     3991* setting options in makefiles:          Options/Recursion.   (line  81)
     3992* setting variables:                     Setting.             (line   6)
     3993* several rules for one target:          Multiple Rules.      (line   6)
     3994* several targets in a rule:             Multiple Targets.    (line   6)
     3995* shar (standard target):                Goals.               (line 103)
     3996* shell command:                         Simple Makefile.     (line  72)
     3997* shell command, and directory search:   Commands/Search.     (line   6)
     3998* shell command, execution:              Execution.           (line   6)
     3999* shell command, function for:           Shell Function.      (line   6)
     4000* shell file name pattern (in include):  Include.             (line  13)
     4001* shell variables, setting in commands:  Execution.           (line  10)
     4002* shell wildcards (in include):          Include.             (line  13)
     4003* shell, choosing the:                   Choosing the Shell.  (line   6)
     4004* SHELL, exported value:                 Variables/Recursion. (line  23)
     4005* SHELL, import from environment:        Environment.         (line  37)
     4006* shell, in DOS and Windows:             Choosing the Shell.  (line  36)
     4007* SHELL, MS-DOS specifics:               Choosing the Shell.  (line  42)
     4008* SHELL, value of:                       Choosing the Shell.  (line   6)
     4009* signal:                                Interrupts.          (line   6)
     4010* silent operation:                      Echoing.             (line   6)
     4011* simple makefile:                       Simple Makefile.     (line   6)
     4012* simple variable expansion:             Using Variables.     (line   6)
     4013* simplifying with variables:            Variables Simplify.  (line   6)
     4014* simply expanded variables:             Flavors.             (line  56)
     4015* sorting words:                         Text Functions.      (line 146)
     4016* spaces, in variable values:            Flavors.             (line 103)
     4017* spaces, stripping:                     Text Functions.      (line  80)
     4018* special targets:                       Special Targets.     (line   6)
     4019* special variables:                     Special Variables.   (line   6)
     4020* specifying makefile name:              Makefile Names.      (line  30)
     4021* splitting commands:                    Splitting Lines.     (line   6)
     4022* standard input:                        Parallel.            (line  30)
     4023* standards conformance:                 Overview.            (line  13)
    31694024* standards for makefiles:               Makefile Conventions.
    3170 * static pattern rule:                   Static Pattern.
    3171 * static pattern rule, syntax of:        Static Usage.
     4025                                                              (line   6)
     4026* static pattern rule:                   Static Pattern.      (line   6)
     4027* static pattern rule, syntax of:        Static Usage.        (line   6)
    31724028* static pattern rule, versus implicit:  Static versus Implicit.
    3173 * stem <1>:                              Pattern Match.
    3174 * stem:                                  Static Usage.
    3175 * stem, variable for:                    Automatic Variables.
     4029                                                              (line   6)
     4030* static pattern rules, secondary expansion of: Secondary Expansion.
     4031                                                              (line 138)
     4032* stem <1>:                              Pattern Match.       (line   6)
     4033* stem:                                  Static Usage.        (line  17)
     4034* stem, variable for:                    Automatic Variables. (line  77)
    31764035* stopping make:                         Make Control Functions.
    3177 * strings, searching for:                Text Functions.
    3178 * stripping whitespace:                  Text Functions.
    3179 * sub-make:                              Variables/Recursion.
    3180 * subdirectories, recursion for:         Recursion.
    3181 * substitution variable reference:       Substitution Refs.
    3182 * suffix rule:                           Suffix Rules.
     4036                                                              (line  11)
     4037* strings, searching for:                Text Functions.      (line 103)
     4038* stripping whitespace:                  Text Functions.      (line  80)
     4039* sub-make:                              Variables/Recursion. (line   6)
     4040* subdirectories, recursion for:         Recursion.           (line   6)
     4041* substitution variable reference:       Substitution Refs.   (line   6)
     4042* suffix rule:                           Suffix Rules.        (line   6)
    31834043* suffix rule, for archive:              Archive Suffix Rules.
    3184 * suffix, adding:                        File Name Functions.
    3185 * suffix, function to find:              File Name Functions.
    3186 * suffix, substituting in variables:     Substitution Refs.
    3187 * switches:                              Options Summary.
    3188 * symbol directories, updating archive:  Archive Symbols.
    3189 * syntax of rules:                       Rule Syntax.
    3190 * tab character (in commands):           Rule Syntax.
    3191 * tabs in rules:                         Rule Introduction.
    3192 * TAGS (standard target):                Goals.
    3193 * tangle <1>:                            Implicit Variables.
    3194 * tangle:                                Catalogue of Rules.
    3195 * tar (standard target):                 Goals.
    3196 * target:                                Rules.
    3197 * target pattern, implicit:              Pattern Intro.
    3198 * target pattern, static (not implicit): Static Usage.
    3199 * target, deleting on error:             Errors.
    3200 * target, deleting on interrupt:         Interrupts.
    3201 * target, expansion:                     Reading Makefiles.
    3202 * target, multiple in pattern rule:      Pattern Intro.
    3203 * target, multiple rules for one:        Multiple Rules.
     4044                                                              (line   6)
     4045* suffix, adding:                        File Name Functions. (line  68)
     4046* suffix, function to find:              File Name Functions. (line  43)
     4047* suffix, substituting in variables:     Substitution Refs.   (line   6)
     4048* switches:                              Options Summary.     (line   6)
     4049* symbol directories, updating archive:  Archive Symbols.     (line   6)
     4050* syntax of commands:                    Command Syntax.      (line   6)
     4051* syntax of rules:                       Rule Syntax.         (line   6)
     4052* tab character (in commands):           Rule Syntax.         (line  26)
     4053* tabs in rules:                         Rule Introduction.   (line  21)
     4054* TAGS (standard target):                Goals.               (line 111)
     4055* tangle <1>:                            Implicit Variables.  (line 104)
     4056* tangle:                                Catalogue of Rules.  (line 151)
     4057* tar (standard target):                 Goals.               (line 100)
     4058* target:                                Rules.               (line   6)
     4059* target pattern, implicit:              Pattern Intro.       (line   9)
     4060* target pattern, static (not implicit): Static Usage.        (line  17)
     4061* target, deleting on error:             Errors.              (line  64)
     4062* target, deleting on interrupt:         Interrupts.          (line   6)
     4063* target, expansion:                     Reading Makefiles.   (line  62)
     4064* target, multiple in pattern rule:      Pattern Intro.       (line  49)
     4065* target, multiple rules for one:        Multiple Rules.      (line   6)
    32044066* target, touching:                      Instead of Execution.
    3205 * target-specific variables:             Target-specific.
    3206 * targets:                               Rule Syntax.
    3207 * targets without a file:                Phony Targets.
    3208 * targets, built-in special:             Special Targets.
    3209 * targets, empty:                        Empty Targets.
    3210 * targets, force:                        Force Targets.
    3211 * targets, introduction to:              Rule Introduction.
    3212 * targets, multiple:                     Multiple Targets.
    3213 * targets, phony:                        Phony Targets.
     4067                                                              (line  19)
     4068* target-specific variables:             Target-specific.     (line   6)
     4069* targets:                               Rule Syntax.         (line  18)
     4070* targets without a file:                Phony Targets.       (line   6)
     4071* targets, built-in special:             Special Targets.     (line   6)
     4072* targets, empty:                        Empty Targets.       (line   6)
     4073* targets, force:                        Force Targets.       (line   6)
     4074* targets, introduction to:              Rule Introduction.   (line   8)
     4075* targets, multiple:                     Multiple Targets.    (line   6)
     4076* targets, phony:                        Phony Targets.       (line   6)
    32144077* terminal rule:                         Match-Anything Rules.
    3215 * test (standard target):                Goals.
    3216 * testing compilation:                   Testing.
    3217 * tex <1>:                               Implicit Variables.
    3218 * tex:                                   Catalogue of Rules.
    3219 * TeX, rule to run:                      Catalogue of Rules.
    3220 * texi2dvi <1>:                          Implicit Variables.
    3221 * texi2dvi:                              Catalogue of Rules.
    3222 * Texinfo, rule to format:               Catalogue of Rules.
    3223 * tilde (~):                             Wildcards.
    3224 * touch (shell command) <1>:             Empty Targets.
    3225 * touch (shell command):                 Wildcard Examples.
     4078                                                              (line   6)
     4079* test (standard target):                Goals.               (line 115)
     4080* testing compilation:                   Testing.             (line   6)
     4081* tex <1>:                               Implicit Variables.  (line  91)
     4082* tex:                                   Catalogue of Rules.  (line 151)
     4083* TeX, rule to run:                      Catalogue of Rules.  (line 151)
     4084* texi2dvi <1>:                          Implicit Variables.  (line  95)
     4085* texi2dvi:                              Catalogue of Rules.  (line 158)
     4086* Texinfo, rule to format:               Catalogue of Rules.  (line 158)
     4087* tilde (~):                             Wildcards.           (line  11)
     4088* touch (shell command) <1>:             Empty Targets.       (line  25)
     4089* touch (shell command):                 Wildcard Examples.   (line  21)
    32264090* touching files:                        Instead of Execution.
    3227 * traditional directory search (GPATH):  Search Algorithm.
    3228 * types of prerequisites:                Prerequisite Types.
    3229 * undefined variables, warning message:  Options Summary.
    3230 * updating archive symbol directories:   Archive Symbols.
    3231 * updating makefiles:                    Remaking Makefiles.
    3232 * user defined functions:                Call Function.
    3233 * value:                                 Using Variables.
    3234 * value, how a variable gets it:         Values.
    3235 * variable:                              Using Variables.
    3236 * variable definition:                   Makefile Contents.
    3237 * variables:                             Variables Simplify.
    3238 * variables, $ in name:                  Computed Names.
    3239 * variables, and implicit rule:          Automatic Variables.
    3240 * variables, appending to:               Appending.
    3241 * variables, automatic:                  Automatic Variables.
    3242 * variables, command line:               Overriding.
    3243 * variables, command line, and recursion: Options/Recursion.
    3244 * variables, computed names:             Computed Names.
    3245 * variables, conditional assignment:     Flavors.
    3246 * variables, defining verbatim:          Defining.
    3247 * variables, environment <1>:            Environment.
    3248 * variables, environment:                Variables/Recursion.
    3249 * variables, exporting:                  Variables/Recursion.
    3250 * variables, flavors:                    Flavors.
    3251 * variables, how they get their values:  Values.
    3252 * variables, how to reference:           Reference.
    3253 * variables, loops in expansion:         Flavors.
    3254 * variables, modified reference:         Substitution Refs.
    3255 * variables, nested references:          Computed Names.
    3256 * variables, origin of:                  Origin Function.
    3257 * variables, overriding:                 Override Directive.
    3258 * variables, overriding with arguments:  Overriding.
    3259 * variables, pattern-specific:           Pattern-specific.
    3260 * variables, recursively expanded:       Flavors.
    3261 * variables, setting:                    Setting.
    3262 * variables, simply expanded:            Flavors.
    3263 * variables, spaces in values:           Flavors.
    3264 * variables, substituting suffix in:     Substitution Refs.
    3265 * variables, substitution reference:     Substitution Refs.
    3266 * variables, target-specific:            Target-specific.
    3267 * variables, unexpanded value:           Value Function.
    3268 * variables, warning for undefined:      Options Summary.
    3269 * varying prerequisites:                 Static Pattern.
    3270 * verbatim variable definition:          Defining.
    3271 * vpath:                                 Directory Search.
    3272 * VPATH, and implicit rules:             Implicit/Search.
    3273 * VPATH, and link libraries:             Libraries/Search.
     4091                                                              (line  19)
     4092* traditional directory search (GPATH):  Search Algorithm.    (line  42)
     4093* types of prerequisites:                Prerequisite Types.  (line   6)
     4094* undefined variables, warning message:  Options Summary.     (line 251)
     4095* updating archive symbol directories:   Archive Symbols.     (line   6)
     4096* updating makefiles:                    Remaking Makefiles.  (line   6)
     4097* user defined functions:                Call Function.       (line   6)
     4098* value:                                 Using Variables.     (line   6)
     4099* value, how a variable gets it:         Values.              (line   6)
     4100* variable:                              Using Variables.     (line   6)
     4101* variable definition:                   Makefile Contents.   (line  22)
     4102* variable references in commands:       Variables in Commands.
     4103                                                              (line   6)
     4104* variables:                             Variables Simplify.  (line   6)
     4105* variables, $ in name:                  Computed Names.      (line   6)
     4106* variables, and implicit rule:          Automatic Variables. (line   6)
     4107* variables, appending to:               Appending.           (line   6)
     4108* variables, automatic:                  Automatic Variables. (line   6)
     4109* variables, command line:               Overriding.          (line   6)
     4110* variables, command line, and recursion: Options/Recursion.  (line  17)
     4111* variables, computed names:             Computed Names.      (line   6)
     4112* variables, conditional assignment:     Flavors.             (line 129)
     4113* variables, defining verbatim:          Defining.            (line   6)
     4114* variables, environment <1>:            Environment.         (line   6)
     4115* variables, environment:                Variables/Recursion. (line   6)
     4116* variables, exporting:                  Variables/Recursion. (line   6)
     4117* variables, flavor of:                  Flavor Function.     (line   6)
     4118* variables, flavors:                    Flavors.             (line   6)
     4119* variables, how they get their values:  Values.              (line   6)
     4120* variables, how to reference:           Reference.           (line   6)
     4121* variables, loops in expansion:         Flavors.             (line  44)
     4122* variables, modified reference:         Substitution Refs.   (line   6)
     4123* variables, nested references:          Computed Names.      (line   6)
     4124* variables, origin of:                  Origin Function.     (line   6)
     4125* variables, overriding:                 Override Directive.  (line   6)
     4126* variables, overriding with arguments:  Overriding.          (line   6)
     4127* variables, pattern-specific:           Pattern-specific.    (line   6)
     4128* variables, recursively expanded:       Flavors.             (line   6)
     4129* variables, setting:                    Setting.             (line   6)
     4130* variables, simply expanded:            Flavors.             (line  56)
     4131* variables, spaces in values:           Flavors.             (line 103)
     4132* variables, substituting suffix in:     Substitution Refs.   (line   6)
     4133* variables, substitution reference:     Substitution Refs.   (line   6)
     4134* variables, target-specific:            Target-specific.     (line   6)
     4135* variables, unexpanded value:           Value Function.      (line   6)
     4136* variables, warning for undefined:      Options Summary.     (line 251)
     4137* varying prerequisites:                 Static Pattern.      (line   6)
     4138* verbatim variable definition:          Defining.            (line   6)
     4139* vpath:                                 Directory Search.    (line   6)
     4140* VPATH, and implicit rules:             Implicit/Search.     (line   6)
     4141* VPATH, and link libraries:             Libraries/Search.    (line   6)
    32744142* warnings, printing:                    Make Control Functions.
    3275 * weave <1>:                             Implicit Variables.
    3276 * weave:                                 Catalogue of Rules.
    3277 * Web, rule to run:                      Catalogue of Rules.
     4143                                                              (line  35)
     4144* weave <1>:                             Implicit Variables.  (line  98)
     4145* weave:                                 Catalogue of Rules.  (line 151)
     4146* Web, rule to run:                      Catalogue of Rules.  (line 151)
    32784147* what if:                               Instead of Execution.
    3279 * whitespace, in variable values:        Flavors.
    3280 * whitespace, stripping:                 Text Functions.
    3281 * wildcard:                              Wildcards.
    3282 * wildcard pitfalls:                     Wildcard Pitfall.
    3283 * wildcard, function:                    File Name Functions.
    3284 * wildcard, in archive member:           Archive Members.
    3285 * wildcard, in include:                  Include.
     4148                                                              (line  33)
     4149* whitespace, in variable values:        Flavors.             (line 103)
     4150* whitespace, stripping:                 Text Functions.      (line  80)
     4151* wildcard:                              Wildcards.           (line   6)
     4152* wildcard pitfalls:                     Wildcard Pitfall.    (line   6)
     4153* wildcard, function:                    File Name Functions. (line 107)
     4154* wildcard, in archive member:           Archive Members.     (line  36)
     4155* wildcard, in include:                  Include.             (line  13)
    32864156* wildcards and MS-DOS/MS-Windows backslashes: Wildcard Pitfall.
    3287 * word, selecting a:                     Text Functions.
    3288 * words, extracting first:               Text Functions.
    3289 * words, filtering:                      Text Functions.
    3290 * words, filtering out:                  Text Functions.
    3291 * words, finding number:                 Text Functions.
    3292 * words, iterating over:                 Foreach Function.
    3293 * words, joining lists:                  File Name Functions.
    3294 * words, removing duplicates:            Text Functions.
    3295 * words, selecting lists of:             Text Functions.
    3296 * writing rule commands:                 Commands.
    3297 * writing rules:                         Rules.
    3298 * yacc <1>:                              Implicit Variables.
    3299 * yacc <2>:                              Catalogue of Rules.
    3300 * yacc:                                  Sequences.
    3301 * Yacc, rule to run:                     Catalogue of Rules.
    3302 * ~ (tilde):                             Wildcards.
     4157                                                              (line  31)
     4158* Windows, choosing a shell in:          Choosing the Shell.  (line  36)
     4159* word, selecting a:                     Text Functions.      (line 159)
     4160* words, extracting first:               Text Functions.      (line 184)
     4161* words, extracting last:                Text Functions.      (line 197)
     4162* words, filtering:                      Text Functions.      (line 114)
     4163* words, filtering out:                  Text Functions.      (line 132)
     4164* words, finding number:                 Text Functions.      (line 180)
     4165* words, iterating over:                 Foreach Function.    (line   6)
     4166* words, joining lists:                  File Name Functions. (line  90)
     4167* words, removing duplicates:            Text Functions.      (line 155)
     4168* words, selecting lists of:             Text Functions.      (line 168)
     4169* writing rule commands:                 Commands.            (line   6)
     4170* writing rules:                         Rules.               (line   6)
     4171* yacc <1>:                              Implicit Variables.  (line  75)
     4172* yacc <2>:                              Catalogue of Rules.  (line 120)
     4173* yacc:                                  Sequences.           (line  18)
     4174* Yacc, rule to run:                     Catalogue of Rules.  (line 120)
     4175* ~ (tilde):                             Wildcards.           (line  11)
    33034176
    33044177
     
    33084181*******************************************
    33094182
     4183[index]
    33104184* Menu:
    33114185
    3312 * $$(@D):                                Automatic Variables.
    3313 * $$(@F):                                Automatic Variables.
    3314 * $$@:                                   Automatic Variables.
    3315 * $%:                                    Automatic Variables.
    3316 * $(%D):                                 Automatic Variables.
    3317 * $(%F):                                 Automatic Variables.
    3318 * $(*D):                                 Automatic Variables.
    3319 * $(*F):                                 Automatic Variables.
    3320 * $(+D):                                 Automatic Variables.
    3321 * $(+F):                                 Automatic Variables.
    3322 * $(.VARIABLES):                         Special Variables.
    3323 * $(<D):                                 Automatic Variables.
    3324 * $(<F):                                 Automatic Variables.
    3325 * $(?D):                                 Automatic Variables.
    3326 * $(?F):                                 Automatic Variables.
    3327 * $(@D):                                 Automatic Variables.
    3328 * $(@F):                                 Automatic Variables.
    3329 * $(^D):                                 Automatic Variables.
    3330 * $(^F):                                 Automatic Variables.
    3331 * $*:                                    Automatic Variables.
    3332 * $*, and static pattern:                Static Usage.
    3333 * $+:                                    Automatic Variables.
    3334 * $<:                                    Automatic Variables.
    3335 * $?:                                    Automatic Variables.
    3336 * $@:                                    Automatic Variables.
    3337 * $^:                                    Automatic Variables.
    3338 * % (automatic variable):                Automatic Variables.
    3339 * %D (automatic variable):               Automatic Variables.
    3340 * %F (automatic variable):               Automatic Variables.
    3341 * * (automatic variable):                Automatic Variables.
    3342 * * (automatic variable), unsupported bizarre usage: Missing.
    3343 * *D (automatic variable):               Automatic Variables.
    3344 * *F (automatic variable):               Automatic Variables.
    3345 * + (automatic variable):                Automatic Variables.
    3346 * +D (automatic variable):               Automatic Variables.
    3347 * +F (automatic variable):               Automatic Variables.
    3348 * .DEFAULT <1>:                          Last Resort.
    3349 * .DEFAULT:                              Special Targets.
    3350 * .DEFAULT, and empty commands:          Empty Commands.
    3351 * .DELETE_ON_ERROR <1>:                  Errors.
    3352 * .DELETE_ON_ERROR:                      Special Targets.
    3353 * .EXPORT_ALL_VARIABLES <1>:             Variables/Recursion.
    3354 * .EXPORT_ALL_VARIABLES:                 Special Targets.
    3355 * .IGNORE <1>:                           Errors.
    3356 * .IGNORE:                               Special Targets.
    3357 * .INTERMEDIATE:                         Special Targets.
    3358 * .LIBPATTERNS:                          Libraries/Search.
    3359 * .LOW_RESOLUTION_TIME:                  Special Targets.
    3360 * .NOTPARALLEL:                          Special Targets.
    3361 * .PHONY <1>:                            Special Targets.
    3362 * .PHONY:                                Phony Targets.
    3363 * .POSIX:                                Options/Recursion.
    3364 * .PRECIOUS <1>:                         Interrupts.
    3365 * .PRECIOUS:                             Special Targets.
    3366 * .SECONDARY:                            Special Targets.
    3367 * .SILENT <1>:                           Echoing.
    3368 * .SILENT:                               Special Targets.
    3369 * .SUFFIXES <1>:                         Suffix Rules.
    3370 * .SUFFIXES:                             Special Targets.
    3371 * .VARIABLES (list of variables):        Special Variables.
    3372 * /usr/gnu/include:                      Include.
    3373 * /usr/include:                          Include.
    3374 * /usr/local/include:                    Include.
    3375 * < (automatic variable):                Automatic Variables.
    3376 * <D (automatic variable):               Automatic Variables.
    3377 * <F (automatic variable):               Automatic Variables.
    3378 * ? (automatic variable):                Automatic Variables.
    3379 * ?D (automatic variable):               Automatic Variables.
    3380 * ?F (automatic variable):               Automatic Variables.
    3381 * @ (automatic variable):                Automatic Variables.
    3382 * @D (automatic variable):               Automatic Variables.
    3383 * @F (automatic variable):               Automatic Variables.
    3384 * ^ (automatic variable):                Automatic Variables.
    3385 * ^D (automatic variable):               Automatic Variables.
    3386 * ^F (automatic variable):               Automatic Variables.
    3387 * addprefix:                             File Name Functions.
    3388 * addsuffix:                             File Name Functions.
    3389 * AR:                                    Implicit Variables.
    3390 * ARFLAGS:                               Implicit Variables.
    3391 * AS:                                    Implicit Variables.
    3392 * ASFLAGS:                               Implicit Variables.
    3393 * basename:                              File Name Functions.
    3394 * bindir:                                Directory Variables.
    3395 * call:                                  Call Function.
    3396 * CC:                                    Implicit Variables.
    3397 * CFLAGS:                                Implicit Variables.
    3398 * CO:                                    Implicit Variables.
    3399 * COFLAGS:                               Implicit Variables.
    3400 * COMSPEC:                               Execution.
    3401 * CPP:                                   Implicit Variables.
    3402 * CPPFLAGS:                              Implicit Variables.
    3403 * CTANGLE:                               Implicit Variables.
    3404 * CURDIR:                                Recursion.
    3405 * CWEAVE:                                Implicit Variables.
    3406 * CXX:                                   Implicit Variables.
    3407 * CXXFLAGS:                              Implicit Variables.
    3408 * define:                                Defining.
    3409 * dir:                                   File Name Functions.
    3410 * else:                                  Conditional Syntax.
    3411 * endef:                                 Defining.
    3412 * endif:                                 Conditional Syntax.
     4186* $%:                                    Automatic Variables. (line  37)
     4187* $(%D):                                 Automatic Variables. (line 129)
     4188* $(%F):                                 Automatic Variables. (line 130)
     4189* $(*D):                                 Automatic Variables. (line 124)
     4190* $(*F):                                 Automatic Variables. (line 125)
     4191* $(+D):                                 Automatic Variables. (line 147)
     4192* $(+F):                                 Automatic Variables. (line 148)
     4193* $(<D):                                 Automatic Variables. (line 137)
     4194* $(<F):                                 Automatic Variables. (line 138)
     4195* $(?D):                                 Automatic Variables. (line 153)
     4196* $(?F):                                 Automatic Variables. (line 154)
     4197* $(@D):                                 Automatic Variables. (line 113)
     4198* $(@F):                                 Automatic Variables. (line 119)
     4199* $(^D):                                 Automatic Variables. (line 142)
     4200* $(^F):                                 Automatic Variables. (line 143)
     4201* $*:                                    Automatic Variables. (line  73)
     4202* $*, and static pattern:                Static Usage.        (line  81)
     4203* $+:                                    Automatic Variables. (line  63)
     4204* $<:                                    Automatic Variables. (line  43)
     4205* $?:                                    Automatic Variables. (line  48)
     4206* $@:                                    Automatic Variables. (line  30)
     4207* $^:                                    Automatic Variables. (line  53)
     4208* $|:                                    Automatic Variables. (line  69)
     4209* % (automatic variable):                Automatic Variables. (line  37)
     4210* %D (automatic variable):               Automatic Variables. (line 129)
     4211* %F (automatic variable):               Automatic Variables. (line 130)
     4212* * (automatic variable):                Automatic Variables. (line  73)
     4213* * (automatic variable), unsupported bizarre usage: Missing. (line  44)
     4214* *D (automatic variable):               Automatic Variables. (line 124)
     4215* *F (automatic variable):               Automatic Variables. (line 125)
     4216* + (automatic variable):                Automatic Variables. (line  63)
     4217* +D (automatic variable):               Automatic Variables. (line 147)
     4218* +F (automatic variable):               Automatic Variables. (line 148)
     4219* .DEFAULT <1>:                          Last Resort.         (line  23)
     4220* .DEFAULT:                              Special Targets.     (line  20)
     4221* .DEFAULT, and empty commands:          Empty Commands.      (line  16)
     4222* .DEFAULT_GOAL (define default goal):   Special Variables.   (line  10)
     4223* .DELETE_ON_ERROR <1>:                  Errors.              (line  64)
     4224* .DELETE_ON_ERROR:                      Special Targets.     (line  67)
     4225* .EXPORT_ALL_VARIABLES <1>:             Variables/Recursion. (line  99)
     4226* .EXPORT_ALL_VARIABLES:                 Special Targets.     (line 129)
     4227* .FEATURES (list of supported features): Special Variables.  (line  65)
     4228* .IGNORE <1>:                           Errors.              (line  30)
     4229* .IGNORE:                               Special Targets.     (line  74)
     4230* .INCLUDE_DIRS (list of include directories): Special Variables.
     4231                                                              (line  98)
     4232* .INTERMEDIATE:                         Special Targets.     (line  43)
     4233* .LIBPATTERNS:                          Libraries/Search.    (line   6)
     4234* .LOW_RESOLUTION_TIME:                  Special Targets.     (line  86)
     4235* .NOTPARALLEL:                          Special Targets.     (line 134)
     4236* .PHONY <1>:                            Special Targets.     (line   8)
     4237* .PHONY:                                Phony Targets.       (line  22)
     4238* .POSIX:                                Options/Recursion.   (line  60)
     4239* .PRECIOUS <1>:                         Interrupts.          (line  22)
     4240* .PRECIOUS:                             Special Targets.     (line  28)
     4241* .SECONDARY:                            Special Targets.     (line  48)
     4242* .SECONDEXPANSION <1>:                  Special Targets.     (line  57)
     4243* .SECONDEXPANSION:                      Secondary Expansion. (line   6)
     4244* .SILENT <1>:                           Echoing.             (line  24)
     4245* .SILENT:                               Special Targets.     (line 116)
     4246* .SUFFIXES <1>:                         Suffix Rules.        (line  61)
     4247* .SUFFIXES:                             Special Targets.     (line  15)
     4248* .VARIABLES (list of variables):        Special Variables.   (line  56)
     4249* /usr/gnu/include:                      Include.             (line  52)
     4250* /usr/include:                          Include.             (line  52)
     4251* /usr/local/include:                    Include.             (line  52)
     4252* < (automatic variable):                Automatic Variables. (line  43)
     4253* <D (automatic variable):               Automatic Variables. (line 137)
     4254* <F (automatic variable):               Automatic Variables. (line 138)
     4255* ? (automatic variable):                Automatic Variables. (line  48)
     4256* ?D (automatic variable):               Automatic Variables. (line 153)
     4257* ?F (automatic variable):               Automatic Variables. (line 154)
     4258* @ (automatic variable):                Automatic Variables. (line  30)
     4259* @D (automatic variable):               Automatic Variables. (line 113)
     4260* @F (automatic variable):               Automatic Variables. (line 119)
     4261* ^ (automatic variable):                Automatic Variables. (line  53)
     4262* ^D (automatic variable):               Automatic Variables. (line 142)
     4263* ^F (automatic variable):               Automatic Variables. (line 143)
     4264* abspath:                               File Name Functions. (line 121)
     4265* addprefix:                             File Name Functions. (line  79)
     4266* addsuffix:                             File Name Functions. (line  68)
     4267* and:                                   Conditional Functions.
     4268                                                              (line  45)
     4269* AR:                                    Implicit Variables.  (line  41)
     4270* ARFLAGS:                               Implicit Variables.  (line 117)
     4271* AS:                                    Implicit Variables.  (line  44)
     4272* ASFLAGS:                               Implicit Variables.  (line 120)
     4273* basename:                              File Name Functions. (line  57)
     4274* bindir:                                Directory Variables. (line  53)
     4275* call:                                  Call Function.       (line   6)
     4276* CC:                                    Implicit Variables.  (line  47)
     4277* CFLAGS:                                Implicit Variables.  (line 124)
     4278* CO:                                    Implicit Variables.  (line  50)
     4279* COFLAGS:                               Implicit Variables.  (line 130)
     4280* COMSPEC:                               Choosing the Shell.  (line  39)
     4281* CPP:                                   Implicit Variables.  (line  59)
     4282* CPPFLAGS:                              Implicit Variables.  (line 133)
     4283* CTANGLE:                               Implicit Variables.  (line 107)
     4284* CURDIR:                                Recursion.           (line  28)
     4285* CWEAVE:                                Implicit Variables.  (line 101)
     4286* CXX:                                   Implicit Variables.  (line  53)
     4287* CXXFLAGS:                              Implicit Variables.  (line 127)
     4288* define:                                Defining.            (line   6)
     4289* dir:                                   File Name Functions. (line  17)
     4290* else:                                  Conditional Syntax.  (line   6)
     4291* endef:                                 Defining.            (line   6)
     4292* endif:                                 Conditional Syntax.  (line   6)
    34134293* error:                                 Make Control Functions.
    3414 * eval:                                  Eval Function.
    3415 * exec_prefix:                           Directory Variables.
    3416 * export:                                Variables/Recursion.
    3417 * FC:                                    Implicit Variables.
    3418 * FFLAGS:                                Implicit Variables.
    3419 * filter:                                Text Functions.
    3420 * filter-out:                            Text Functions.
    3421 * findstring:                            Text Functions.
    3422 * firstword:                             Text Functions.
    3423 * foreach:                               Foreach Function.
    3424 * GET:                                   Implicit Variables.
    3425 * GFLAGS:                                Implicit Variables.
    3426 * GNUmakefile:                           Makefile Names.
    3427 * GPATH:                                 Search Algorithm.
    3428 * if:                                    If Function.
    3429 * ifdef:                                 Conditional Syntax.
    3430 * ifeq:                                  Conditional Syntax.
    3431 * ifndef:                                Conditional Syntax.
    3432 * ifneq:                                 Conditional Syntax.
    3433 * include:                               Include.
    3434 * join:                                  File Name Functions.
    3435 * LDFLAGS:                               Implicit Variables.
    3436 * LEX:                                   Implicit Variables.
    3437 * LFLAGS:                                Implicit Variables.
    3438 * libexecdir:                            Directory Variables.
    3439 * MAKE <1>:                              Flavors.
    3440 * MAKE:                                  MAKE Variable.
    3441 * MAKECMDGOALS:                          Goals.
    3442 * makefile:                              Makefile Names.
    3443 * Makefile:                              Makefile Names.
    3444 * MAKEFILES <1>:                         Variables/Recursion.
    3445 * MAKEFILES:                             MAKEFILES Variable.
    3446 * MAKEFLAGS:                             Options/Recursion.
    3447 * MAKEINFO:                              Implicit Variables.
    3448 * MAKELEVEL <1>:                         Flavors.
    3449 * MAKELEVEL:                             Variables/Recursion.
    3450 * MAKEOVERRIDES:                         Options/Recursion.
    3451 * MFLAGS:                                Options/Recursion.
    3452 * notdir:                                File Name Functions.
    3453 * origin:                                Origin Function.
    3454 * OUTPUT_OPTION:                         Catalogue of Rules.
    3455 * override:                              Override Directive.
    3456 * patsubst <1>:                          Text Functions.
    3457 * patsubst:                              Substitution Refs.
    3458 * PC:                                    Implicit Variables.
    3459 * PFLAGS:                                Implicit Variables.
    3460 * prefix:                                Directory Variables.
    3461 * RFLAGS:                                Implicit Variables.
    3462 * RM:                                    Implicit Variables.
    3463 * sbindir:                               Directory Variables.
    3464 * shell:                                 Shell Function.
    3465 * SHELL:                                 Execution.
    3466 * SHELL (command execution):             Execution.
    3467 * sort:                                  Text Functions.
    3468 * strip:                                 Text Functions.
    3469 * subst <1>:                             Text Functions.
    3470 * subst:                                 Multiple Targets.
    3471 * suffix:                                File Name Functions.
    3472 * SUFFIXES:                              Suffix Rules.
    3473 * TANGLE:                                Implicit Variables.
    3474 * TEX:                                   Implicit Variables.
    3475 * TEXI2DVI:                              Implicit Variables.
    3476 * unexport:                              Variables/Recursion.
    3477 * value:                                 Value Function.
    3478 * vpath:                                 Selective Search.
    3479 * VPATH:                                 General Search.
    3480 * vpath:                                 Directory Search.
    3481 * VPATH:                                 Directory Search.
     4294                                                              (line  11)
     4295* eval:                                  Eval Function.       (line   6)
     4296* exec_prefix:                           Directory Variables. (line  35)
     4297* export:                                Variables/Recursion. (line  40)
     4298* FC:                                    Implicit Variables.  (line  63)
     4299* FFLAGS:                                Implicit Variables.  (line 137)
     4300* filter:                                Text Functions.      (line 114)
     4301* filter-out:                            Text Functions.      (line 132)
     4302* findstring:                            Text Functions.      (line 103)
     4303* firstword:                             Text Functions.      (line 184)
     4304* flavor:                                Flavor Function.     (line   6)
     4305* foreach:                               Foreach Function.    (line   6)
     4306* GET:                                   Implicit Variables.  (line  67)
     4307* GFLAGS:                                Implicit Variables.  (line 140)
     4308* GNUmakefile:                           Makefile Names.      (line   7)
     4309* GPATH:                                 Search Algorithm.    (line  48)
     4310* if:                                    Conditional Functions.
     4311                                                              (line   6)
     4312* ifdef:                                 Conditional Syntax.  (line   6)
     4313* ifeq:                                  Conditional Syntax.  (line   6)
     4314* ifndef:                                Conditional Syntax.  (line   6)
     4315* ifneq:                                 Conditional Syntax.  (line   6)
     4316* include:                               Include.             (line   6)
     4317* info:                                  Make Control Functions.
     4318                                                              (line  43)
     4319* join:                                  File Name Functions. (line  90)
     4320* lastword:                              Text Functions.      (line 197)
     4321* LDFLAGS:                               Implicit Variables.  (line 143)
     4322* LEX:                                   Implicit Variables.  (line  70)
     4323* LFLAGS:                                Implicit Variables.  (line 147)
     4324* libexecdir:                            Directory Variables. (line  66)
     4325* LINT:                                  Implicit Variables.  (line  78)
     4326* LINTFLAGS:                             Implicit Variables.  (line 159)
     4327* M2C:                                   Implicit Variables.  (line  81)
     4328* MAKE <1>:                              Flavors.             (line  84)
     4329* MAKE:                                  MAKE Variable.       (line   6)
     4330* MAKE_RESTARTS (number of times make has restarted): Special Variables.
     4331                                                              (line  49)
     4332* MAKE_VERSION:                          Features.            (line 197)
     4333* MAKECMDGOALS:                          Goals.               (line  30)
     4334* makefile:                              Makefile Names.      (line   7)
     4335* Makefile:                              Makefile Names.      (line   7)
     4336* MAKEFILE_LIST:                         MAKEFILE_LIST Variable.
     4337                                                              (line   6)
     4338* MAKEFILES <1>:                         Variables/Recursion. (line 127)
     4339* MAKEFILES:                             MAKEFILES Variable.  (line   6)
     4340* MAKEFLAGS:                             Options/Recursion.   (line   6)
     4341* MAKEINFO:                              Implicit Variables.  (line  87)
     4342* MAKELEVEL <1>:                         Flavors.             (line  84)
     4343* MAKELEVEL:                             Variables/Recursion. (line 115)
     4344* MAKEOVERRIDES:                         Options/Recursion.   (line  49)
     4345* MAKESHELL (MS-DOS alternative to SHELL): Choosing the Shell.
     4346                                                              (line  25)
     4347* MFLAGS:                                Options/Recursion.   (line  65)
     4348* notdir:                                File Name Functions. (line  27)
     4349* or:                                    Conditional Functions.
     4350                                                              (line  37)
     4351* origin:                                Origin Function.     (line   6)
     4352* OUTPUT_OPTION:                         Catalogue of Rules.  (line 202)
     4353* override:                              Override Directive.  (line   6)
     4354* patsubst <1>:                          Text Functions.      (line  18)
     4355* patsubst:                              Substitution Refs.   (line  28)
     4356* PC:                                    Implicit Variables.  (line  84)
     4357* PFLAGS:                                Implicit Variables.  (line 153)
     4358* prefix:                                Directory Variables. (line  25)
     4359* realpath:                              File Name Functions. (line 114)
     4360* RFLAGS:                                Implicit Variables.  (line 156)
     4361* RM:                                    Implicit Variables.  (line 110)
     4362* sbindir:                               Directory Variables. (line  59)
     4363* shell:                                 Shell Function.      (line   6)
     4364* SHELL:                                 Choosing the Shell.  (line   6)
     4365* SHELL (command execution):             Execution.           (line   6)
     4366* sort:                                  Text Functions.      (line 146)
     4367* strip:                                 Text Functions.      (line  80)
     4368* subst <1>:                             Text Functions.      (line   9)
     4369* subst:                                 Multiple Targets.    (line  28)
     4370* suffix:                                File Name Functions. (line  43)
     4371* SUFFIXES:                              Suffix Rules.        (line  81)
     4372* TANGLE:                                Implicit Variables.  (line 104)
     4373* TEX:                                   Implicit Variables.  (line  91)
     4374* TEXI2DVI:                              Implicit Variables.  (line  94)
     4375* unexport:                              Variables/Recursion. (line  45)
     4376* value:                                 Value Function.      (line   6)
     4377* vpath:                                 Selective Search.    (line   6)
     4378* VPATH:                                 General Search.      (line   6)
     4379* vpath:                                 Directory Search.    (line   6)
     4380* VPATH:                                 Directory Search.    (line   6)
    34824381* warning:                               Make Control Functions.
    3483 * WEAVE:                                 Implicit Variables.
    3484 * wildcard <1>:                          File Name Functions.
    3485 * wildcard:                              Wildcard Function.
    3486 * word:                                  Text Functions.
    3487 * wordlist:                              Text Functions.
    3488 * words:                                 Text Functions.
    3489 * YACC:                                  Implicit Variables.
    3490 * YACCR:                                 Implicit Variables.
    3491 * YFLAGS:                                Implicit Variables.
    3492 
    3493 
     4382                                                              (line  35)
     4383* WEAVE:                                 Implicit Variables.  (line  98)
     4384* wildcard <1>:                          File Name Functions. (line 107)
     4385* wildcard:                              Wildcard Function.   (line   6)
     4386* word:                                  Text Functions.      (line 159)
     4387* wordlist:                              Text Functions.      (line 168)
     4388* words:                                 Text Functions.      (line 180)
     4389* YACC:                                  Implicit Variables.  (line  74)
     4390* YFLAGS:                                Implicit Variables.  (line 150)
     4391* | (automatic variable):                Automatic Variables. (line  69)
     4392
     4393
  • trunk/src/gmake/doc/make.texi

    r281 r503  
    22@c %**start of header
    33@setfilename make.info
     4
     5@include version.texi
     6@set EDITION 0.70
     7@set RCSID $Id: make.texi,v 1.45 2006/04/01 06:36:40 psmith Exp $
     8
    49@settitle GNU @code{make}
    510@setchapternewpage odd
    6 @c %**end of header
    7 
    8 @c FSF publishers: format makebook.texi instead of using this file directly.
    9 
    10 @set RCSID $Id: make.texi,v 1.30 2005/05/13 12:45:31 psmith Exp $
    11 @set EDITION 0.70
    12 @set VERSION 3.81
    13 @set UPDATED 07 May 2005
    14 @set UPDATE-MONTH May 2005
    15 @c ISBN provided by Lisa M. Opus Goldstein <opus@gnu.org>, 5 May 2004
    16 @set ISBN 1-882114-83-5
    17 
    18 @c finalout
    19 
    20 @c ISPELL CHECK: done, 10 June 1993 --roland
    21 @c ISPELL CHECK: done, 2000-06-25 --Martin Buchholz
    22 
    2311@c Combine the variable and function indices:
    2412@syncodeindex vr fn
    2513@c Combine the program and concept indices:
    2614@syncodeindex pg cp
     15@c FSF publishers: format makebook.texi instead of using this file directly.
     16@c ISBN provided by Lisa M. Opus Goldstein <opus@gnu.org>, 5 May 2004
     17@set ISBN 1-882114-83-5
     18@c %**end of header
     19
     20@copying
     21This file documents the GNU @code{make} utility, which determines
     22automatically which pieces of a large program need to be recompiled,
     23and issues the commands to recompile them.
     24
     25This is Edition @value{EDITION}, last updated @value{UPDATED},
     26of @cite{The GNU Make Manual}, for GNU @code{make} version @value{VERSION}.
     27
     28Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
     291996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006
     30Free Software Foundation, Inc.
     31
     32@quotation
     33Permission is granted to copy, distribute and/or modify this document
     34under the terms of the GNU Free Documentation License, Version 1.2 or
     35any later version published by the Free Software Foundation; with no
     36Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
     37and with the Back-Cover Texts as in (a) below.  A copy of the
     38license is included in the section entitled ``GNU Free Documentation
     39License.''
     40
     41(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
     42this GNU Manual, like GNU software.  Copies published by the Free
     43Software Foundation raise funds for GNU development.''
     44@end quotation
     45@end copying
     46
     47@c finalout
     48
     49@c ISPELL CHECK: done, 10 June 1993 --roland
     50@c ISPELL CHECK: done, 2000-06-25 --Martin Buchholz
     51
    2752
    2853@dircategory GNU Packages
     
    3055* Make: (make).            Remake files automatically.
    3156@end direntry
    32 
    33 @ifnottex
    34 This file documents the GNU Make utility, which determines
    35 automatically which pieces of a large program need to be recompiled,
    36 and issues the commands to recompile them.
    37 
    38 This is Edition @value{EDITION}, last updated @value{UPDATED},
    39 of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}.
    40 
    41 Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    42 1998, 1999, 2000, 2002, 2003, 2004, 2005
    43 Free Software Foundation, Inc.
    44 
    45 Permission is granted to copy, distribute and/or modify this document
    46 under the terms of the GNU Free Documentation License, Version 1.1 or
    47 any later version published by the Free Software Foundation; with no
    48 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    49 Texts.  A copy of the license is included in the section entitled
    50 ``GNU Free Documentation License''.
    51 @end ifnottex
    5257
    5358@iftex
     
    5863@subtitle A Program for Directing Recompilation
    5964@subtitle GNU @code{make} Version @value{VERSION}
    60 @subtitle @value{UPDATE-MONTH}
     65@subtitle @value{UPDATED-MONTH}
    6166@author Richard M. Stallman, Roland McGrath, Paul D. Smith
    6267@page
    6368@vskip 0pt plus 1filll
    64 Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
    65 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
     69@insertcopying
    6670@sp 2
    6771Published by the Free Software Foundation @*
    68 59 Temple Place -- Suite 330, @*
    69 Boston, MA 02111-1307 USA @*
     7251 Franklin St. -- Fifth Floor @*
     73Boston, MA 02110-1301 USA @*
    7074ISBN @value{ISBN} @*
    71 
    72 Permission is granted to copy, distribute and/or modify this document
    73 under the terms of the GNU Free Documentation License, Version 1.1 or
    74 any later version published by the Free Software Foundation; with the
    75 Invariant Sections being ``GNU General Public License'', the Front-Cover
    76 Texts being ``A GNU Manual'', and with the Back-Cover Texts being as in
    77 (a) below.  A copy of the license is included in the section entitled
    78 ``GNU Free Documentation License''.
    79 
    80 (a) The FSF's Back-Cover Text is:
    81 
    82 @quotation
    83       You have freedom to copy and modify this GNU Manual, like GNU
    84       software.  Copies published by the Free Software Foundation raise
    85       funds for GNU development.
    86 @end quotation
    8775@sp 2
    8876Cover art by Etienne Suvasa.
    8977@end titlepage
    90 @page
     78
     79@summarycontents
     80@contents
    9181
    9282@ifnottex
    9383@node Top, Overview, (dir), (dir)
    94 @top Make
    95 
    96 The GNU @code{make} utility automatically determines which pieces of a
    97 large program need to be recompiled, and issues the commands to
    98 recompile them.@refill
    99 
    100 This edition of the @cite{GNU Make Manual},
    101 last updated @value{UPDATED},
    102 documents GNU @code{make} Version @value{VERSION}.@refill
    103 
    104 This manual describes @code{make} and contains the following chapters:@refill
     84@top GNU @code{make}
     85
     86@insertcopying
    10587@end ifnottex
    10688
     
    174156* Phony Targets::               Using a target that is not a real file's name.
    175157* Force Targets::               You can use a target without commands
    176                                   or prerequisites to mark other
    177                                   targets as phony.
     158                                  or prerequisites to mark other targets
     159                                  as phony.
    178160* Empty Targets::               When only the date matters and the
    179161                                  files are empty.
     
    215197Writing the Commands in Rules
    216198
     199* Command Syntax::              Command syntax features and pitfalls.
    217200* Echoing::                     How to control when commands are echoed.
    218201* Execution::                   How commands are executed.
     
    223206* Sequences::                   Defining canned sequences of commands.
    224207* Empty Commands::              Defining useful, do-nothing commands.
     208
     209Command Syntax
     210
     211* Splitting Lines::             Breaking long command lines for readability.
     212* Variables in Commands::       Using @code{make} variables in commands.
     213
     214Command Execution
     215
     216* Choosing the Shell::          How @code{make} chooses the shell used
     217                                  to run commands.
    225218
    226219Recursive Use of @code{make}
     
    268261* Text Functions::              General-purpose text manipulation functions.
    269262* File Name Functions::         Functions for manipulating file names.
     263* Conditional Functions::       Functions that implement conditions.
    270264* Foreach Function::            Repeat some text with controlled variation.
    271 * If Function::                 Conditionally expand a value.
    272265* Call Function::               Expand a user-defined function.
    273266* Value Function::              Return the un-expanded value of a variable.
    274267* Eval Function::               Evaluate the arguments as makefile syntax.
    275268* Origin Function::             Find where a variable got its value.
     269* Flavor Function::             Find out the flavor of a variable.
    276270* Shell Function::              Substitute the output of a shell command.
    277271* Make Control Functions::      Functions that control how make runs.
     
    301295* Chained Rules::               How to use a chain of implicit rules.
    302296* Pattern Rules::               How to define new implicit rules.
    303 * Last Resort::                 How to defining commands for rules
    304                                   which cannot find any.
     297* Last Resort::                 How to define commands for rules which
     298                                  cannot find any.
    305299* Suffix Rules::                The old-fashioned style of implicit rule.
    306300* Implicit Rule Search::        The precise algorithm for applying
     
    330324
    331325* Archive Symbols::             How to update archive symbol directories.
    332 
    333 Makefile Conventions
    334 
    335 * Makefile Basics::             General Conventions for Makefiles
    336 * Utilities in Makefiles::      Utilities in Makefiles
    337 * Command Variables::           Variables for Specifying Commands
    338 * Directory Variables::         Variables for Installation Directories
    339 * Standard Targets::            Standard Targets for Users
    340 * Install Command Categories::  Three categories of commands in the `install'
    341326
    342327@end detailmenu
     
    11001085
    11011086@noindent
    1102 @var{filenames} can contain shell file name patterns.
     1087@var{filenames} can contain shell file name patterns.  If
     1088@var{filenames} is empty, nothing is included and no error is printed.
    11031089@cindex shell file name pattern (in @code{include})
    11041090@cindex shell wildcards (in @code{include})
     
    12891275@code{.DEFAULT_GOAL} variable allows you to discover the current
    12901276default goal, restart the default goal selection algorithm by clearing
    1291 its value, or to explicitly set the default goal. The following
     1277its value, or to explicitly set the default goal.  The following
    12921278example illustrates these cases:
    12931279
     
    13301316Note that assigning more than one target name to @code{.DEFAULT_GOAL} is
    13311317illegal and will result in an error.
     1318
     1319@vindex MAKE_RESTARTS @r{(number of times @code{make} has restarted)}
     1320@item MAKE_RESTARTS
     1321This variable is set only if this instance of @code{make} has
     1322restarted (@pxref{Remaking Makefiles, , How Makefiles Are Remade}): it
     1323will contain the number of times this instance has restarted.  Note
     1324this is not the same as recursion (counted by the @code{MAKELEVEL}
     1325variable).  You should not set, modify, or export this variable.
    13321326
    13331327@vindex .VARIABLES @r{(list of variables)}
     
    13571351
    13581352@table @samp
     1353
     1354@item archives
     1355Supports @code{ar} (archive) files using special filename syntax.
     1356@xref{Archives, ,Using @code{make} to Update Archive Files}.
     1357
     1358@item check-symlink
     1359Supports the @code{-L} (@code{--check-symlink-times}) flag.
     1360@xref{Options Summary, ,Summary of Options}.
     1361
     1362@item else-if
     1363Supports ``else if'' non-nested conditionals.  @xref{Conditional
     1364Syntax, ,Syntax of Conditionals}.
     1365
     1366@item jobserver
     1367Supports ``job server'' enhanced parallel builds.  @xref{Parallel,
     1368,Parallel Execution}.
     1369
     1370@item second-expansion
     1371Supports secondary expansion of prerequisite lists.
     1372
     1373@item order-only
     1374Supports order-only prerequisites.  @xref{Prerequisite Types, ,Types
     1375of Prerequisites}.
     1376
    13591377@item target-specific
    13601378Supports target-specific and pattern-specific variable assignments.
    13611379@xref{Target-specific, ,Target-specific Variable Values}.
    13621380
    1363 @item order-only
    1364 Supports order-only prerequisites.  @xref{Prerequisite Types, ,Types
    1365 of Prerequisites}.
    1366 
    1367 @item second-expansion
    1368 Supports secondary expansion of prerequisite lists.
    1369 
    1370 @item jobserver
    1371 Supports ``job server'' enhanced parallel builds.  @xref{Parallel,
    1372 ,Parallel Execution}.
    1373 
    1374 @item check-symlink
    1375 Supports the @code{-L} (@code{--check-symlink-times}) flag.
    1376 @xref{Options Summary, ,Summary of Options}.
    1377 
    13781381@end table
     1382
     1383@vindex .INCLUDE_DIRS @r{(list of include directories)}
     1384@item .INCLUDE_DIRS
     1385Expands to a list of directories that @code{make} searches for
     1386included makefiles (@pxref{Include, , Including Other Makefiles}).
    13791387
    13801388@end table
     
    16001608@cindex expansion, secondary
    16011609
     1610@findex .SECONDEXPANSION
    16021611In the previous section we learned that GNU @code{make} works in two
    16031612distinct phases: a read-in phase and a target-update phase
    1604 (@pxref{Reading Makefiles, , How @code{make} Reads a Makefile}).
    1605 There is an extra wrinkle that comes in between those two phases,
    1606 right at the end of the read-in phase: at that time, all the
    1607 prerequisites of all of the targets are expanded a @emph{second time}.
    1608 In most circumstances this secondary expansion will have no effect,
    1609 since all variable and function references will have been expanded
    1610 during the initial parsing of the makefiles.  In order to take
    1611 advantage of the secondary expansion phase of the parser, then, it's
    1612 necessary to @emph{escape} the variable or function reference in the
    1613 makefile.  In this case the first expansion merely un-escapes the
    1614 reference but doesn't expand it, and expansion is left to the
    1615 secondary expansion phase.  For example, consider this makefile:
    1616 
    1617 @example
     1613(@pxref{Reading Makefiles, , How @code{make} Reads a Makefile}).  GNU
     1614make also has the ability to enable a @emph{second expansion} of the
     1615prerequisites (only) for some or all targets defined in the makefile.
     1616In order for this second expansion to occur, the special target
     1617@code{.SECONDEXPANSION} must be defined before the first prerequisite
     1618list that makes use of this feature.
     1619
     1620If that special target is defined then in between the two phases
     1621mentioned above, right at the end of the read-in phase, all the
     1622prerequisites of the targets defined after the special target are
     1623expanded a @emph{second time}.  In most circumstances this secondary
     1624expansion will have no effect, since all variable and function
     1625references will have been expanded during the initial parsing of the
     1626makefiles.  In order to take advantage of the secondary expansion
     1627phase of the parser, then, it's necessary to @emph{escape} the
     1628variable or function reference in the makefile.  In this case the
     1629first expansion merely un-escapes the reference but doesn't expand it,
     1630and expansion is left to the secondary expansion phase.  For example,
     1631consider this makefile:
     1632
     1633@example
     1634.SECONDEXPANSION:
    16181635ONEVAR = onefile
    16191636TWOVAR = twofile
     
    16391656
    16401657@example
     1658.SECONDEXPANSION:
    16411659AVAR = top
    16421660onefile: $(AVAR)
     
    16581676defer the expansion by escaping the @code{$}.  Also, secondary
    16591677expansion occurs for both explicit and implicit (pattern) rules.
    1660 Knowing this, the possible uses for this feature are almost endless.
    1661 For example:
    1662 
    1663 @example
     1678Knowing this, the possible uses for this feature increase
     1679dramatically.  For example:
     1680
     1681@example
     1682.SECONDEXPANSION:
    16641683main_OBJS := main.o try.o test.o
    16651684lib_OBJS := lib.o api.o
     
    16821701lib_SRCS := lib.c api.c
    16831702
     1703.SECONDEXPANSION:
    16841704main lib: $$(patsubst %.c,%.o,$$($$@@_SRCS))
    16851705@end example
     
    17081728of all prerequisites of rules @emph{that have already appeared} for
    17091729the same target (@code{$$+} with repetitions and @code{$$^}
    1710 without). The following example will help illustrate these behaviors:
    1711 
    1712 @example
     1730without).  The following example will help illustrate these behaviors:
     1731
     1732@example
     1733.SECONDEXPANSION:
     1734
    17131735foo: foo.1 bar.1 $$< $$^ $$+    # line #1
    17141736
     
    17181740@end example
    17191741
    1720 For the first line, all three variables (@code{$$<}, @code{$$^}, and
    1721 @code{$$+}) expand to the empty string. For the second line, they will
    1722 have values @code{foo.1}, @code{foo.1 bar.1}, and @code{foo.1 bar.1}
    1723 respectively. For the third they will have values @code{foo.1},
    1724 @code{foo.1 bar.1 foo.2 bar.2}, and @code{foo.1 bar.1 foo.2 bar.2}
    1725 respectively.
     1742In the first prerequisite list, all three variables (@code{$$<},
     1743@code{$$^}, and @code{$$+}) expand to the empty string.  In the
     1744second, they will have values @code{foo.1}, @code{foo.1 bar.1}, and
     1745@code{foo.1 bar.1} respectively.  In the third they will have values
     1746@code{foo.1}, @code{foo.1 bar.1 foo.2 bar.2}, and @code{foo.1 bar.1
     1747foo.2 bar.2} respectively.
    17261748
    17271749Rules undergo secondary expansion in makefile order, except that
     
    17511773
    17521774@example
     1775.SECONDEXPANSION:
     1776
    17531777foo: bar
    17541778
     
    17691793
    17701794@example
     1795.SECONDEXPANSION:
     1796
    17711797/tmp/foo.o:
    17721798
     
    18161842* Phony Targets::               Using a target that is not a real file's name.
    18171843* Force Targets::               You can use a target without commands
    1818                                   or prerequisites to mark other
    1819                                   targets as phony.
     1844                                  or prerequisites to mark other targets
     1845                                  as phony.
    18201846* Empty Targets::               When only the date matters and the
    18211847                                  files are empty.
     
    19011927appear on the line after the prerequisites, with a tab character, or may
    19021928appear on the same line, with a semicolon.  Either way, the effect is the
    1903 same.  @xref{Commands, ,Writing the Commands in Rules}.
     1929same.  There are other differences in the syntax of command lines.
     1930@xref{Commands, ,Writing the Commands in Rules}.
    19041931
    19051932@cindex dollar sign (@code{$}), in rules
    19061933@cindex @code{$}, in rules
    1907 @cindex rule, and @code{$}
    1908 Because dollar signs are used to start variable references, if you really
    1909 want a dollar sign in a rule you must write two of them, @samp{$$}
    1910 (@pxref{Using Variables, ,How to Use Variables}).  In prerequisite
    1911 lists you must actually write @emph{four} dollar signs (@samp{$$$$}),
    1912 due to secondary expansion (@pxref{Secondary Expansion}).
    1913 You may split a long line by inserting a backslash
    1914 followed by a newline, but this is not required, as @code{make} places no
    1915 limit on the length of a line in a makefile.
     1934@cindex rules, and @code{$}
     1935Because dollar signs are used to start @code{make} variable
     1936references, if you really want a dollar sign in a target or
     1937prerequisite you must write two of them, @samp{$$} (@pxref{Using
     1938Variables, ,How to Use Variables}).  If you have enabled secondary
     1939expansion (@pxref{Secondary Expansion}) and you want a literal dollar
     1940sign in the prerequisites lise, you must actually write @emph{four}
     1941dollar signs (@samp{$$$$}).
     1942
     1943You may split a long line by inserting a backslash followed by a
     1944newline, but this is not required, as @code{make} places no limit on
     1945the length of a line in a makefile.
    19161946
    19171947A rule tells @code{make} two things: when the targets are out of date,
     
    20042034@var{HOME}.@refill
    20052035
    2006 Wildcard expansion happens automatically in targets, in prerequisites,
    2007 and in commands (where the shell does the expansion).  In other
    2008 contexts, wildcard expansion happens only if you request it explicitly
    2009 with the @code{wildcard} function.
     2036Wildcard expansion is performed by @code{make} automatically in
     2037targets and in prerequisites.  In commands the shell is responsible
     2038for wildcard expansion.  In other contexts, wildcard expansion happens
     2039only if you request it explicitly with the @code{wildcard} function.
    20102040
    20112041The special significance of a wildcard character can be turned off by
     
    25532583word in the list will be used.
    25542584
    2555 The default value for @code{.LIBPATTERNS} is ``@samp{lib%.so lib%.a}'',
     2585The default value for @code{.LIBPATTERNS} is @samp{lib%.so lib%.a},
    25562586which provides the default behavior described above.
    25572587
     
    26442674it will do so even if @code{make} is invoked with the @code{-k} option,
    26452675which is unfortunate.  Second, and perhaps more importantly, you cannot
    2646 take advantage of the parallel build capabilities of make using this
    2647 method, since there is only one rule.
     2676take advantage of @code{make}'s ability to build targets in parallel
     2677(@pxref{Parallel, ,Parallel Execution}), since there is only one rule.
    26482678
    26492679By declaring the subdirectories as phony targets (you must do this as
     
    28672897as secondary (i.e., no target is removed because it is considered
    28682898intermediate).
     2899
     2900@findex .SECONDEXPANSION
     2901@item .SECONDEXPANSION
     2902
     2903If @code{.SECONDEXPANSION} is mentioned as a target anywhere in the
     2904makefile, then all prerequisite lists defined @emph{after} it appears
     2905will be expanded a second time after all makefiles have been read in.
     2906@xref{Secondary Expansion, ,Secondary Expansion}.
     2907
     2908The prerequisites of the special target @code{.SUFFIXES} are the list
     2909of suffixes to be used in checking for suffix rules.
     2910@xref{Suffix Rules, , Old-Fashioned Suffix Rules}.
    28692911
    28702912@findex .DELETE_ON_ERROR
     
    33763418@group
    33773419%.d: %.c
    3378         @set -e; rm -f $@@; \
     3420        @@set -e; rm -f $@@; \
    33793421         $(CC) -M $(CPPFLAGS) $< > $@@.$$$$; \
    33803422         sed 's,\($*\)\.o[ :]*,\1.o $@@ : ,g' < $@@.$$$$ > $@@; \
     
    34493491@cindex writing rule commands
    34503492
    3451 The commands of a rule consist of shell command lines to be executed one
    3452 by one.  Each command line must start with a tab, except that the first
    3453 command line may be attached to the target-and-prerequisites line with a
    3454 semicolon in between.  Blank lines and lines of just comments may appear
    3455 among the command lines; they are ignored.  (But beware, an apparently
    3456 ``blank'' line that begins with a tab is @emph{not} blank!  It is an
    3457 empty command; @pxref{Empty Commands}.)
     3493The commands of a rule consist of one or more shell command lines to
     3494be executed, one at a time, in the order they appear.  Typically, the
     3495result of executing these commands is that the target of the rule is
     3496brought up to date.
    34583497
    34593498Users use many different shell programs, but commands in makefiles are
     
    34613500otherwise.  @xref{Execution, ,Command Execution}.
    34623501
    3463 @cindex comments, in commands
    3464 @cindex commands, comments in
    3465 @cindex @code{#} (comments), in commands
    3466 The shell that is in use determines whether comments can be written on
    3467 command lines, and what syntax they use.  When the shell is
    3468 @file{/bin/sh}, a @samp{#} starts a comment that extends to the end of
    3469 the line.  The @samp{#} does not have to be at the beginning of a line.
    3470 Text on a line before a @samp{#} is not part of the comment.
    3471 
    34723502@menu
     3503* Command Syntax::              Command syntax features and pitfalls.
    34733504* Echoing::                     How to control when commands are echoed.
    34743505* Execution::                   How commands are executed.
     
    34813512@end menu
    34823513
    3483 @node Echoing, Execution, Commands, Commands
     3514@node Command Syntax, Echoing, Commands, Commands
     3515@section Command Syntax
     3516@cindex command syntax
     3517@cindex syntax of commands
     3518
     3519Makefiles have the unusual property that there are really two distinct
     3520syntaxes in one file.  Most of the makefile uses @code{make} syntax
     3521(@pxref{Makefiles, ,Writing Makefiles}).  However, commands are meant to be
     3522interpreted by the shell and so they are written using shell syntax.
     3523The @code{make} program does not try to understand shell syntax: it
     3524performs only a very few specific translations on the content of the
     3525command before handing it to the shell.
     3526
     3527Each command line must start with a tab, except that the first command
     3528line may be attached to the target-and-prerequisites line with a
     3529semicolon in between.  @emph{Any} line in the makefile that begins
     3530with a tab and appears in a ``rule context'' (that is, after a rule
     3531has been started until another rule or variable definition) will be
     3532considered a command line for that rule.  Blank lines and lines of
     3533just comments may appear among the command lines; they are ignored.
     3534
     3535Some consequences of these rules include:
     3536
     3537@itemize @bullet
     3538@item
     3539A blank line that begins with a tab is not blank: it's an empty
     3540command (@pxref{Empty Commands}).
     3541
     3542@cindex comments, in commands
     3543@cindex commands, comments in
     3544@cindex @code{#} (comments), in commands
     3545@item
     3546A comment in a command line is not a @code{make} comment; it will be
     3547passed to the shell as-is.  Whether the shell treats it as a comment
     3548or not depends on your shell.
     3549
     3550@item
     3551A variable definition in a ``rule context'' which is indented by a tab
     3552as the first character on the line, will be considered a command line,
     3553not a @code{make} variable definition, and passed to the shell.
     3554
     3555@item
     3556A conditional expression (@code{ifdef}, @code{ifeq},
     3557etc. @pxref{Conditional Syntax, ,Syntax of Conditionals}) in a ``rule
     3558context'' which is indented by a tab as the first character on the
     3559line, will be considered a command line and be passed to the shell.
     3560
     3561@end itemize
     3562
     3563@menu
     3564* Splitting Lines::             Breaking long command lines for readability.
     3565* Variables in Commands::       Using @code{make} variables in commands.
     3566@end menu
     3567
     3568@node Splitting Lines, Variables in Commands, Command Syntax, Command Syntax
     3569@subsection Splitting Command Lines
     3570@cindex commands, splitting
     3571@cindex splitting commands
     3572@cindex commands, backslash (@code{\}) in
     3573@cindex commands, quoting newlines in
     3574@cindex backslash (@code{\}), in commands
     3575@cindex @code{\} (backslash), in commands
     3576@cindex quoting newline, in commands
     3577@cindex newline, quoting, in commands
     3578
     3579One of the few ways in which @code{make} does interpret command lines
     3580is checking for a backslash just before the newline.  As in normal
     3581makefile syntax, a single command can be split into multiple lines in
     3582the makefile by placing a backslash before each newline.  A sequence
     3583of lines like this is considered a single command, and one instance of
     3584the shell will be invoked to run it.
     3585
     3586However, in contrast to how they are treated in other places in a
     3587makefile, backslash-newline pairs are @emph{not} removed from the
     3588command.  Both the backslash and the newline characters are preserved
     3589and passed to the shell.  How the backslash-newline is interpreted
     3590depends on your shell.  If the first character of the next line
     3591after the backslash-newline is a tab, then that tab (and only that
     3592tab) is removed.  Whitespace is never added to the command.
     3593
     3594For example, this makefile:
     3595
     3596@example
     3597@group
     3598all :
     3599        @@echo no\
     3600space
     3601        @@echo no\
     3602        space
     3603        @@echo one \
     3604        space
     3605        @@echo one\
     3606         space
     3607@end group
     3608@end example
     3609
     3610@noindent
     3611consists of four separate shell commands where the output is:
     3612
     3613@example
     3614@group
     3615nospace
     3616nospace
     3617one space
     3618one space
     3619@end group
     3620@end example
     3621
     3622As a more complex example, this makefile:
     3623
     3624@example
     3625@group
     3626all : ; @@echo 'hello \
     3627        world' ; echo "hello \
     3628    world"
     3629@end group
     3630@end example
     3631
     3632@noindent
     3633will run one shell with a command script of:
     3634
     3635@example
     3636@group
     3637echo 'hello \
     3638world' ; echo "hello \
     3639    world"
     3640@end group
     3641@end example
     3642
     3643@noindent
     3644which, according to shell quoting rules, will yield the following output:
     3645
     3646@example
     3647@group
     3648hello \
     3649world
     3650hello     world
     3651@end group
     3652@end example
     3653
     3654@noindent
     3655Notice how the backslash/newline pair was removed inside the string quoted
     3656with double quotes (@code{"..."}), but not from the string quoted with single
     3657quotes (@code{'...'}).  This is the way the default shell (@file{/bin/sh})
     3658handles backslash/newline pairs.  If you specify a different shell in your
     3659makefiles it may treat them differently.
     3660
     3661Sometimes you want to split a long line inside of single quotes, but
     3662you don't want the backslash-newline to appear in the quoted content.
     3663This is often the case when passing scripts to languages such as Perl,
     3664where extraneous backslashes inside the script can change its meaning
     3665or even be a syntax error.  One simple way of handling this is to
     3666place the quoted string, or even the entire command, into a
     3667@code{make} variable then use the variable in the command.  In this
     3668situation the newline quoting rules for makefiles will be used, and
     3669the backslash-newline will be removed.  If we rewrite our example
     3670above using this method:
     3671
     3672@example
     3673@group
     3674HELLO = 'hello \
     3675world'
     3676
     3677all : ; @@echo $(HELLO)
     3678@end group
     3679@end example
     3680
     3681@noindent
     3682we will get output like this:
     3683
     3684@example
     3685@group
     3686hello world
     3687@end group
     3688@end example
     3689
     3690If you like, you can also use target-specific variables
     3691(@pxref{Target-specific, ,Target-specific Variable Values}) to obtain
     3692a tighter correspondence between the variable and the command that
     3693uses it.
     3694
     3695@node Variables in Commands,  , Splitting Lines, Command Syntax
     3696@subsection Using Variables in Commands
     3697@cindex variable references in commands
     3698@cindex commands, using variables in
     3699
     3700The other way in which @code{make} processes commands is by expanding
     3701any variable references in them (@pxref{Reference,Basics of Variable
     3702References}).  This occurs after make has finished reading all the
     3703makefiles and the target is determined to be out of date; so, the
     3704commands for targets which are not rebuilt are never expanded.
     3705
     3706Variable and function references in commands have identical syntax and
     3707semantics to references elsewhere in the makefile.  They also have the
     3708same quoting rules: if you want a dollar sign to appear in your
     3709command, you must double it (@samp{$$}).  For shells like the default
     3710shell, that use dollar signs to introduce variables, it's important to
     3711keep clear in your mind whether the variable you want to reference is
     3712a @code{make} variable (use a single dollar sign) or a shell variable
     3713(use two dollar signs).  For example:
     3714
     3715@example
     3716@group
     3717LIST = one two three
     3718all:
     3719        for i in $(LIST); do \
     3720            echo $$i; \
     3721        done
     3722@end group
     3723@end example
     3724
     3725@noindent
     3726results in the following command being passed to the shell:
     3727
     3728@example
     3729@group
     3730for i in one two three; do \
     3731    echo $i; \
     3732done
     3733@end group
     3734@end example
     3735
     3736@noindent
     3737which generates the expected result:
     3738
     3739@example
     3740@group
     3741one
     3742two
     3743three
     3744@end group
     3745@end example
     3746
     3747@node Echoing, Execution, Command Syntax, Commands
    34843748@section Command Echoing
    34853749@cindex echoing of commands
     
    35303794@cindex execution, of commands
    35313795@cindex shell command, execution
    3532 @vindex SHELL @r{(command execution)}
    3533 
    3534 When it is time to execute commands to update a target, they are executed
    3535 by making a new subshell for each line.  (In practice, @code{make} may
    3536 take shortcuts that do not affect the results.)
     3796@vindex @code{SHELL} @r{(command execution)}
     3797
     3798When it is time to execute commands to update a target, they are
     3799executed by invoking a new subshell for each command line.  (In
     3800practice, @code{make} may take shortcuts that do not affect the
     3801results.)
    35373802
    35383803@cindex @code{cd} (shell command)
    3539 @strong{Please note:} this implies that shell commands such as @code{cd}
    3540 that set variables local to each process will not affect the following
    3541 command lines. @footnote{On MS-DOS, the value of current working
    3542 directory is @strong{global}, so changing it @emph{will} affect the
    3543 following command lines on those systems.}  If you want to use @code{cd}
    3544 to affect the next command, put the two on a single line with a
    3545 semicolon between them.  Then @code{make} will consider them a single
    3546 command and pass them, together, to a shell which will execute them in
    3547 sequence.  For example:
     3804@cindex shell variables, setting in commands
     3805@cindex commands setting shell variables
     3806@strong{Please note:} this implies that setting shell variables and
     3807invoking shell commands such as @code{cd} that set a context local to
     3808each process will not affect the following command lines.@footnote{On
     3809MS-DOS, the value of current working directory is @strong{global}, so
     3810changing it @emph{will} affect the following command lines on those
     3811systems.}  If you want to use @code{cd} to affect the next statement,
     3812put both statements in a single command line.  Then @code{make} will
     3813invoke one shell to run the entire line, and the shell will execute
     3814the statements in sequence.  For example:
    35483815
    35493816@example
    35503817foo : bar/lose
    3551         cd bar; gobble lose > ../foo
    3552 @end example
    3553 
    3554 @cindex commands, backslash (@code{\}) in
    3555 @cindex commands, quoting newlines in
    3556 @cindex backslash (@code{\}), in commands
    3557 @cindex @code{\} (backslash), in commands
    3558 @cindex quoting newline, in commands
    3559 @cindex newline, quoting, in commands
    3560 If you would like to split a single shell command into multiple lines of
    3561 text, you must use a backslash at the end of all but the last subline.
    3562 Such a sequence of lines is combined into a single line, by deleting the
    3563 backslash-newline sequences, before passing it to the shell.  Thus, the
    3564 following is equivalent to the preceding example:
    3565 
    3566 @example
    3567 @group
    3568 foo : bar/lose
    3569         cd bar;  \
    3570         gobble lose > ../foo
    3571 @end group
    3572 @end example
     3818        cd $(@@D) && gobble $(@@F) > ../$@@
     3819@end example
     3820
     3821@noindent
     3822Here we use the shell AND operator (@code{&&}) so that if the
     3823@code{cd} command fails, the script will fail without trying to invoke
     3824the @code{gobble} command in the wrong directory, which could cause
     3825problems (in this case it would certainly cause @file{../foo} to be
     3826truncated, at least).
     3827
     3828@menu
     3829* Choosing the Shell::          How @code{make} chooses the shell used
     3830                                  to run commands.
     3831@end menu
     3832
     3833@node Choosing the Shell,  , Execution, Execution
     3834@subsection Choosing the Shell
     3835@cindex shell, choosing the
     3836@cindex @code{SHELL}, value of
    35733837
    35743838@vindex SHELL
    35753839The program used as the shell is taken from the variable @code{SHELL}.
    3576 By default, the program @file{/bin/sh} is used.
     3840If this variable is not set in your makefile, the program
     3841@file{/bin/sh} is used as the shell.
     3842
     3843@cindex environment, @code{SHELL} in
     3844Unlike most variables, the variable @code{SHELL} is never set from the
     3845environment.  This is because the @code{SHELL} environment variable is
     3846used to specify your personal choice of shell program for interactive
     3847use.  It would be very bad for personal choices like this to affect the
     3848functioning of makefiles.  @xref{Environment, ,Variables from the
     3849Environment}.
     3850
     3851Furthermore, when you do set @code{SHELL} in your makefile that value
     3852is @emph{not} exported in the environment to commands that @code{make}
     3853invokes.  Instead, the value inherited from the user's environment, if
     3854any, is exported.  You can override this behavior by explicitly
     3855exporting @code{SHELL} (@pxref{Variables/Recursion, ,Communicating
     3856Variables to a Sub-@code{make}}), forcing it to be passed in the
     3857environment to commands.
     3858
     3859@vindex @code{MAKESHELL} @r{(MS-DOS alternative to @code{SHELL})}
     3860However, on MS-DOS and MS-Windows the value of @code{SHELL} in the
     3861environment @strong{is} used, since on those systems most users do not
     3862set this variable, and therefore it is most likely set specifically to
     3863be used by @code{make}.  On MS-DOS, if the setting of @code{SHELL} is
     3864not suitable for @code{make}, you can set the variable
     3865@code{MAKESHELL} to the shell that @code{make} should use; if set it
     3866will be used as the shell instead of the value of @code{SHELL}.
     3867
     3868@subsubheading Choosing a Shell in DOS and Windows
     3869@cindex shell, in DOS and Windows
     3870@cindex DOS, choosing a shell in
     3871@cindex Windows, choosing a shell in
     3872
     3873Choosing a shell in MS-DOS and MS-Windows is much more complex than on
     3874other systems.
    35773875
    35783876@vindex COMSPEC
     
    36283926
    36293927The effect of the above DOS-specific processing is that a Makefile that
    3630 says @samp{SHELL = /bin/sh} (as many Unix makefiles do), will work
    3631 on MS-DOS unaltered if you have e.g. @file{sh.exe} installed in some
     3928contains @samp{SHELL = /bin/sh} (as many Unix makefiles do), will work
     3929on MS-DOS unaltered if you have e.g.@: @file{sh.exe} installed in some
    36323930directory along your @code{PATH}.
    3633 
    3634 @cindex environment, @code{SHELL} in
    3635 @vindex MAKESHELL @r{(MS-DOS alternative to @code{SHELL})}
    3636 Unlike most variables, the variable @code{SHELL} is never set from the
    3637 environment.  This is because the @code{SHELL} environment variable is
    3638 used to specify your personal choice of shell program for interactive
    3639 use.  It would be very bad for personal choices like this to affect the
    3640 functioning of makefiles.  @xref{Environment, ,Variables from the
    3641 Environment}.  However, on MS-DOS and MS-Windows the value of
    3642 @code{SHELL} in the environment @strong{is} used, since on those systems
    3643 most users do not set this variable, and therefore it is most likely set
    3644 specifically to be used by @code{make}.  On MS-DOS, if the setting of
    3645 @code{SHELL} is not suitable for @code{make}, you can set the variable
    3646 @code{MAKESHELL} to the shell that @code{make} should use; this will
    3647 override the value of @code{SHELL}.
    36483931
    36493932@node Parallel, Errors, Execution, Commands
     
    40154298environment is passed to the sub-@code{make}.  You can force
    40164299@code{make} to export its value for @code{SHELL} by using the
    4017 @code{export} directive, described below.
     4300@code{export} directive, described below.  @xref{Choosing the Shell}.
    40184301
    40194302The special variable @code{MAKEFLAGS} is always exported (unless you
     
    47124995@group
    47134996ifeq (0,$@{MAKELEVEL@})
    4714 cur-dir   := $(shell pwd)
    47154997whoami    := $(shell whoami)
    47164998host-type := $(shell arch)
     
    47275009@group
    47285010$@{subdirs@}:
    4729       $@{MAKE@} cur-dir=$@{cur-dir@}/$@@ -C $@@ all
     5011        $@{MAKE@} -C $@@ all
    47305012@end group
    47315013@end example
     
    51975479simply-expanded definition, and expands the new text before appending it
    51985480to the old value just as @samp{:=} does
    5199 (@pxref{Setting, ,Setting Variables}, for a full explanation of @samp{:=}).
     5481(see @ref{Setting, ,Setting Variables}, for a full explanation of @samp{:=}).
    52005482In fact,
    52015483
     
    54385720When @code{make} runs a command script, variables defined in the
    54395721makefile are placed into the environment of that command.  This allows
    5440 you to pass values to sub-@code{make} invocations. (@pxref{Recursion,
     5722you to pass values to sub-@code{make} invocations (@pxref{Recursion,
    54415723,Recursive Use of @code{make}}).  By default, only variables that came
    54425724from the environment or the command line are passed to recursive
     
    54525734
    54535735@cindex SHELL, import from environment
    5454 Such problems would be especially likely with the variable @code{SHELL},
    5455 which is normally present in the environment to specify the user's choice
    5456 of interactive shell.  It would be very undesirable for this choice to
    5457 affect @code{make}.  So @code{make} ignores the environment value of
    5458 @code{SHELL} (except on MS-DOS and MS-Windows, where @code{SHELL} is
    5459 usually not set.  @xref{Execution, ,Special handling of SHELL on
    5460 MS-DOS}.)@refill
    5461 
    5462 @cindex SHELL, export to environment
    5463 The @code{SHELL} variable is special in another way: just as the value
    5464 of the @code{make} variable @code{SHELL} is not taken from the
    5465 environment, so also it is not placed into the environment of commands
    5466 that @code{make} invokes.  Instead, the value of @code{SHELL} from the
    5467 invoking environment is provided to the command.  You can use
    5468 @code{export SHELL} to force the value of the @code{make} variable
    5469 @code{SHELL} to be placed in the environment of commands.
     5736Such problems would be especially likely with the variable
     5737@code{SHELL}, which is normally present in the environment to specify
     5738the user's choice of interactive shell.  It would be very undesirable
     5739for this choice to affect @code{make}; so, @code{make} handles the
     5740@code{SHELL} environment variable in a special way; see @ref{Choosing
     5741the Shell}.@refill
    54705742
    54715743@node Target-specific, Pattern-specific, Environment, Using Variables
     
    55155787will be in effect.  Note that this variable is actually distinct from
    55165788any ``global'' value: the two variables do not have to have the same
    5517 flavor (recursive vs. static).
     5789flavor (recursive vs.@: static).
    55185790
    55195791Target-specific variables have the same priority as any other makefile
     
    55265798you define a target-specific variable that variable value is also in
    55275799effect for all prerequisites of this target, and all their
    5528 prerequisites, etc. (unless those prerequisites override that variable
     5800prerequisites, etc.@: (unless those prerequisites override that variable
    55295801with their own target-specific variable value).  So, for example, a
    55305802statement like this:
     
    59256197* Text Functions::              General-purpose text manipulation functions.
    59266198* File Name Functions::         Functions for manipulating file names.
     6199* Conditional Functions::       Functions that implement conditions.
    59276200* Foreach Function::            Repeat some text with controlled variation.
    5928 * If Function::                 Conditionally expand a value.
    59296201* Call Function::               Expand a user-defined function.
    59306202* Value Function::              Return the un-expanded value of a variable.
    59316203* Eval Function::               Evaluate the arguments as makefile syntax.
    59326204* Origin Function::             Find where a variable got its value.
     6205* Flavor Function::             Find out the flavor of a variable.
    59336206* Shell Function::              Substitute the output of a shell command.
    59346207* Make Control Functions::      Functions that control how make runs.
     
    63456618Directive, , The @code{override} Directive}).
    63466619
    6347 @node File Name Functions, Foreach Function, Text Functions, Functions
     6620@node File Name Functions, Conditional Functions, Text Functions, Functions
    63486621@section Functions for File Names
    63496622@cindex functions, for file names
     
    65056778For each file name in @var{names} return the canonical absolute name.
    65066779A canonical name does not contain any @code{.} or @code{..} components,
    6507 nor any repeated path separators (@code{/}) or symlinks. In case of a
    6508 failure the empty string is returned. Consult the @code{realpath(3)}
     6780nor any repeated path separators (@code{/}) or symlinks.  In case of a
     6781failure the empty string is returned.  Consult the @code{realpath(3)}
    65096782documentation for a list of possible failure causes.
    65106783
     
    65156788For each file name in @var{names} return an absolute name that does
    65166789not contain any @code{.} or @code{..} components, nor any repeated path
    6517 separators (@code{/}). Note that in contrast to @code{realpath}
     6790separators (@code{/}).  Note that, in contrast to @code{realpath}
    65186791function, @code{abspath} does not resolve symlinks and does not require
    6519 the file names to refer to an existing file or directory. Use the
     6792the file names to refer to an existing file or directory.  Use the
    65206793@code{wildcard} function to test for existence.
    65216794@end table
    65226795
    6523 @node Foreach Function, If Function, File Name Functions, Functions
     6796@node Conditional Functions, Foreach Function, File Name Functions, Functions
     6797@section Functions for Conditionals
     6798@findex if
     6799@cindex conditional expansion
     6800There are three functions that provide conditional expansion.  A key
     6801aspect of these functions is that not all of the arguments are
     6802expanded initially.  Only those arguments which need to be expanded,
     6803will be expanded.
     6804
     6805@table @code
     6806@item $(if @var{condition},@var{then-part}[,@var{else-part}])
     6807@findex if
     6808The @code{if} function provides support for conditional expansion in a
     6809functional context (as opposed to the GNU @code{make} makefile
     6810conditionals such as @code{ifeq} (@pxref{Conditional Syntax, ,Syntax of
     6811Conditionals}).
     6812
     6813The first argument, @var{condition}, first has all preceding and
     6814trailing whitespace stripped, then is expanded.  If it expands to any
     6815non-empty string, then the condition is considered to be true.  If it
     6816expands to an empty string, the condition is considered to be false.
     6817
     6818If the condition is true then the second argument, @var{then-part}, is
     6819evaluated and this is used as the result of the evaluation of the entire
     6820@code{if} function.
     6821
     6822If the condition is false then the third argument, @var{else-part}, is
     6823evaluated and this is the result of the @code{if} function.  If there is
     6824no third argument, the @code{if} function evaluates to nothing (the
     6825empty string).
     6826
     6827Note that only one of the @var{then-part} or the @var{else-part} will be
     6828evaluated, never both.  Thus, either can contain side-effects (such as
     6829@code{shell} function calls, etc.)
     6830
     6831@item $(or @var{condition1}[,@var{condition2}[,@var{condition3}@dots{}]])
     6832@findex or
     6833The @code{or} function provides a ``short-circuiting'' OR operation.
     6834Each argument is expanded, in order.  If an argument expands to a
     6835non-empty string the processing stops and the result of the expansion
     6836is that string.  If, after all arguments are expanded, all of them are
     6837false (empty), then the result of the expansion is the empty string.
     6838
     6839@item $(and @var{condition1}[,@var{condition2}[,@var{condition3}@dots{}]])
     6840@findex and
     6841The @code{and} function provides a ``short-circuiting'' AND operation.
     6842Each argument is expanded, in order.  If an argument expands to an
     6843empty string the processing stops and the result of the expansion is
     6844the empty string.  If all arguments expand to a non-empty string then
     6845the result of the expansion is the expansion of the last argument.
     6846
     6847@end table
     6848
     6849@node Foreach Function, Call Function, Conditional Functions, Functions
    65246850@section The @code{foreach} Function
    65256851@findex foreach
     
    66096935no?), but it is more likely to be a mistake.
    66106936
    6611 @node If Function, Call Function, Foreach Function, Functions
    6612 @section The @code{if} Function
    6613 @findex if
    6614 @cindex conditional expansion
    6615 
    6616 The @code{if} function provides support for conditional expansion in a
    6617 functional context (as opposed to the GNU @code{make} makefile
    6618 conditionals such as @code{ifeq} (@pxref{Conditional Syntax, ,Syntax of
    6619 Conditionals}).
    6620 
    6621 An @code{if} function call can contain either two or three arguments:
    6622 
    6623 @example
    6624 $(if @var{condition},@var{then-part}[,@var{else-part}])
    6625 @end example
    6626 
    6627 The first argument, @var{condition}, first has all preceding and
    6628 trailing whitespace stripped, then is expanded.  If it expands to any
    6629 non-empty string, then the condition is considered to be true.  If it
    6630 expands to an empty string, the condition is considered to be false.
    6631 
    6632 If the condition is true then the second argument, @var{then-part}, is
    6633 evaluated and this is used as the result of the evaluation of the entire
    6634 @code{if} function.
    6635 
    6636 If the condition is false then the third argument, @var{else-part}, is
    6637 evaluated and this is the result of the @code{if} function.  If there is
    6638 no third argument, the @code{if} function evaluates to nothing (the
    6639 empty string).
    6640 
    6641 Note that only one of the @var{then-part} or the @var{else-part} will be
    6642 evaluated, never both.  Thus, either can contain side-effects (such as
    6643 @code{shell} function calls, etc.)
    6644 
    6645 @node Call Function, Value Function, If Function, Functions
     6937@node Call Function, Value Function, Foreach Function, Functions
    66466938@section The @code{call} Function
    66476939@findex call
     
    67137005
    67147006The @code{call} function can be nested.  Each recursive invocation gets
    6715 its own local values for @code{$(1)}, etc. that mask the values of
     7007its own local values for @code{$(1)}, etc.@: that mask the values of
    67167008higher-level @code{call}.  For example, here is an implementation of a
    67177009@dfn{map} function:
     
    68507142@end example
    68517143
    6852 @node Origin Function, Shell Function, Eval Function, Functions
     7144@node Origin Function, Flavor Function, Eval Function, Functions
    68537145@section The @code{origin} Function
    68547146@findex origin
     
    69597251@xref{Text Functions, , Functions for String Substitution and Analysis}.
    69607252
    6961 @node Shell Function, Make Control Functions, Origin Function, Functions
     7253@node Flavor Function, Shell Function, Origin Function, Functions
     7254@section The @code{flavor} Function
     7255@findex flavor
     7256@cindex variables, flavor of
     7257@cindex flavor of variable
     7258
     7259The @code{flavor} function is unlike most other functions (and like
     7260@code{origin} function) in that it does not operate on the values of
     7261variables; it tells you something @emph{about} a variable.
     7262Specifically, it tells you the flavor of a variable (@pxref{Flavors,
     7263,The Two Flavors of Variables}).
     7264
     7265The syntax of the @code{flavor} function is:
     7266
     7267@example
     7268$(flavor @var{variable})
     7269@end example
     7270
     7271Note that @var{variable} is the @emph{name} of a variable to inquire about;
     7272not a @emph{reference} to that variable.  Therefore you would not normally
     7273use a @samp{$} or parentheses when writing it.  (You can, however, use a
     7274variable reference in the name if you want the name not to be a constant.)
     7275
     7276The result of this function is a string that identifies the flavor of the
     7277variable @var{variable}:
     7278
     7279@table @samp
     7280@item undefined
     7281
     7282if @var{variable} was never defined.
     7283
     7284@item recursive
     7285
     7286if @var{variable} is a recursively expanded variable.
     7287
     7288@item simple
     7289
     7290if @var{variable} is a simply expanded variable.
     7291
     7292@end table
     7293
     7294
     7295@node Shell Function, Make Control Functions, Flavor Function, Functions
    69627296@section The @code{shell} Function
    69637297@findex shell
     
    69847318spawning a new shell, you should carefully consider the performance
    69857319implications of using the @code{shell} function within recursively
    6986 expanded variables vs. simply expanded variables (@pxref{Flavors, ,The
     7320expanded variables vs.@: simply expanded variables (@pxref{Flavors, ,The
    69877321Two Flavors of Variables}).
    69887322
     
    70847418things and many others.
    70857419
     7420@cindex exit status of make
    70867421The exit status of @code{make} is always one of three values:
    70877422@table @code
     
    75507885Consider all targets out-of-date.  GNU @code{make} proceeds to
    75517886consider targets and their prerequisites using the normal algorithms;
    7552 however, all these targets are remade, regardless of the status of
    7553 their prerequisites.
     7887however, all targets so considered are always remade regardless of the
     7888status of their prerequisites.  To avoid infinite recursion, if
     7889@code{MAKE_RESTARTS} (@pxref{Special Variables, , Other Special
     7890Variables}) is set to a number greater than 0 this option is disabled
     7891when considering whether to remake makefiles (@pxref{Remaking
     7892Makefiles, , How Makefiles Are Remade}).
    75547893
    75557894@item -C @var{dir}
     
    79078246* Pattern Rules::               How to define new implicit rules.
    79088247* Last Resort::                 How to define commands for rules which
    7909                                 cannot find any.
     8248                                  cannot find any.
    79108249* Suffix Rules::                The old-fashioned style of implicit rule.
    79118250* Implicit Rule Search::        The precise algorithm for applying
     
    80028341@samp{--no-builtin-rules} option cancels all predefined rules.
    80038342
     8343This manual only documents the default rules available on POSIX-based
     8344operating systems.  Other operating systems, such as VMS, Windows,
     8345OS/2, etc. may have different sets of default rules.  To see the full
     8346list of default rules and variables available in your version of GNU
     8347@code{make}, run @samp{make -p} in a directory with no makefile.
     8348
    80048349Not all of these rules will always be defined, even when the @samp{-r}
    80058350option is not given.  Many of the predefined implicit rules are
     
    80088353the special target @code{.SUFFIXES}).  The default suffix list is:
    80098354@code{.out}, @code{.a}, @code{.ln}, @code{.o}, @code{.c}, @code{.cc},
    8010 @code{.C}, @code{.p}, @code{.f}, @code{.F}, @code{.r}, @code{.y},
     8355@code{.C}, @code{.cpp}, @code{.p}, @code{.f}, @code{.F}, @code{.r}, @code{.y},
    80118356@code{.l}, @code{.s}, @code{.S}, @code{.mod}, @code{.sym}, @code{.def},
    80128357@code{.h}, @code{.info}, @code{.dvi}, @code{.tex}, @code{.texinfo},
     
    80338378@cindex C++, rule to compile
    80348379@pindex g++
     8380@pindex .cc
     8381@pindex .cpp
    80358382@pindex .C
    8036 @pindex .cc
    8037 @file{@var{n}.o} is made automatically from @file{@var{n}.cc} or
    8038 @file{@var{n}.C} with a command of the form @samp{$(CXX) -c $(CPPFLAGS)
    8039 $(CXXFLAGS)}.  We encourage you to use the suffix @samp{.cc} for C++
    8040 source files instead of @samp{.C}.@refill
     8383@file{@var{n}.o} is made automatically from @file{@var{n}.cc},
     8384@file{@var{n}.cpp}, or @file{@var{n}.C} with a command of the form
     8385@samp{$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)}.  We encourage you to use the
     8386suffix @samp{.cc} for C++ source files instead of @samp{.C}.@refill
    80418387
    80428388@item Compiling Pascal programs
     
    82998645
    83008646The commands in built-in implicit rules make liberal use of certain
    8301 predefined variables.  You can alter these variables in the makefile,
    8302 with arguments to @code{make}, or in the environment to alter how the
    8303 implicit rules work without redefining the rules themselves.  You can
    8304 cancel all variables used by implicit rules with the @samp{-R} or
    8305 @samp{--no-builtin-variables} option.
     8647predefined variables.  You can alter the values of these variables in
     8648the makefile, with arguments to @code{make}, or in the environment to
     8649alter how the implicit rules work without redefining the rules
     8650themselves.  You can cancel all variables used by implicit rules with
     8651the @samp{-R} or @samp{--no-builtin-variables} option.
    83068652
    83078653For example, the command used to compile a C source file actually says
     
    83228668with spaces.
    83238669
    8324 Here is a table of variables used as names of programs in built-in rules:
     8670The following tables describe of some of the more commonly-used predefined
     8671variables.  This list is not exhaustive, and the default values shown here may
     8672not be what are selected by @code{make} for your environment.  To see the
     8673complete list of predefined variables for your instance of GNU @code{make} you
     8674can run @samp{make -p} in a directory with no makefiles.
     8675
     8676Here is a table of some of the more common variables used as names of
     8677programs in built-in rules:
     8678makefiles.
    83258679
    83268680@table @code
     
    83328686@item AS
    83338687@vindex AS
    8334 Program for doing assembly; default @samp{as}.
     8688Program for compiling assembly files; default @samp{as}.
    83358689@pindex as
    83368690
     
    83388692@vindex CC
    83398693Program for compiling C programs; default @samp{cc}.
     8694@pindex cc
     8695
     8696@item CO
     8697@vindex CO
     8698Program for checking out files from RCS; default @samp{co}.
    83408699@pindex cc
    83418700
     
    83688727@item LEX
    83698728@vindex LEX
    8370 Program to use to turn Lex grammars into C programs or Ratfor programs;
    8371 default @samp{lex}.
     8729Program to use to turn Lex grammars into source code; default @samp{lex}.
    83728730@pindex lex
     8731
     8732@item YACC
     8733@vindex YACC
     8734Program to use to turn Yacc grammars into source code; default @samp{yacc}.
     8735@pindex yacc
     8736
     8737@item LINT
     8738@vindex LINT
     8739Program to use to run lint on source code; default @samp{lint}.
     8740@pindex lint
     8741
     8742@item M2C
     8743@vindex M2C
     8744Program to use to compile Modula-2 source code; default @samp{m2c}.
     8745@pindex m2c
    83738746
    83748747@item PC
     
    83768749Program for compiling Pascal programs; default @samp{pc}.
    83778750@pindex pc
    8378 
    8379 @item YACC
    8380 @vindex YACC
    8381 Program to use to turn Yacc grammars into C programs; default @samp{yacc}.
    8382 @pindex yacc
    8383 
    8384 @item YACCR
    8385 @vindex YACCR
    8386 Program to use to turn Yacc grammars into Ratfor
    8387 programs; default @samp{yacc -r}.
    83888751
    83898752@item MAKEINFO
     
    84728835@item LDFLAGS
    84738836@vindex LDFLAGS
    8474 Extra flags to give to compilers when they are
    8475 supposed to invoke the linker, @samp{ld}.
     8837Extra flags to give to compilers when they are supposed to invoke the linker,
     8838@samp{ld}.
    84768839
    84778840@item LFLAGS
     
    84798842Extra flags to give to Lex.
    84808843
     8844@item YFLAGS
     8845@vindex YFLAGS
     8846Extra flags to give to Yacc.
     8847
    84818848@item PFLAGS
    84828849@vindex PFLAGS
     
    84878854Extra flags to give to the Fortran compiler for Ratfor programs.
    84888855
    8489 @item YFLAGS
    8490 @vindex YFLAGS
    8491 Extra flags to give to Yacc.
     8856@item LINTFLAGS
     8857@vindex LINTFLAGS
     8858Extra flags to give to lint.
    84928859@end table
    84938860
     
    86298996
    86308997@samp{%} in a prerequisite of a pattern rule stands for the same stem
    8631 that was matched by the @samp{%} in the target.  In order for
    8632 the pattern rule to apply, its target pattern must match the file name
    8633 under consideration, and its prerequisite patterns must name files that
    8634 exist or can be made.  These files become prerequisites of the target.
     8998that was matched by the @samp{%} in the target.  In order for the
     8999pattern rule to apply, its target pattern must match the file name
     9000under consideration and all of its prerequisites (after pattern
     9001substitution) must name files that exist or can be made.  These files
     9002become prerequisites of the target.
    86359003@cindex prerequisite pattern, implicit
    86369004
     
    89829350names, along with the slash that ends them, are added on to the
    89839351prerequisite file names generated from the pattern rule's prerequisite
    8984 patterns and the file name. The directories are ignored only for the
     9352patterns and the file name.  The directories are ignored only for the
    89859353purpose of finding an implicit rule to use, not in the application of
    89869354that rule.  Thus, @samp{e%t} matches the file name @file{src/eat},
     
    93869754
    93879755In fact, nearly all archive member targets are updated in just this way
    9388 and there is an implicit rule to do it for you.  @strong{Note:} The
     9756and there is an implicit rule to do it for you.  @strong{Please note:} The
    93899757@samp{c} flag to @code{ar} is required if the archive file does not
    93909758already exist.
     
    1012410492@xref{Origin Function, , The @code{origin} Function}.
    1012510493
     10494@item $(flavor @var{variable})
     10495
     10496Return a string describing the flavor of the @code{make} variable
     10497@var{variable}.@*
     10498@xref{Flavor Function, , The @code{flavor} Function}.
     10499
    1012610500@item $(foreach @var{var},@var{words},@var{text})
    1012710501
     
    1013310507
    1013410508Evaluate the variable @var{var} replacing any references to @code{$(1)},
    10135 @code{$(2)} with the first, second, etc. @var{param} values.@*
     10509@code{$(2)} with the first, second, etc.@: @var{param} values.@*
    1013610510@xref{Call Function, ,The @code{call} Function}.
    1013710511
     
    1022810602commands.  @xref{Execution, ,Command Execution}.  The @code{SHELL}
    1022910603variable is handled specially when importing from and exporting to the
    10230 environment.  @xref{Environment, ,Using Variable from the Environment}.
     10604environment.  @xref{Choosing the Shell}.
    1023110605
    1023210606@item MAKESHELL
    1023310607
    1023410608On MS-DOS only, the name of the command interpreter that is to be used
    10235 by @code{make}. This value takes precedence over the value of
     10609by @code{make}.  This value takes precedence over the value of
    1023610610@code{SHELL}.  @xref{Execution, ,MAKESHELL variable}.
    1023710611
     
    1072811102@printindex fn
    1072911103
    10730 @summarycontents
    10731 @contents
    1073211104@bye
Note: See TracChangeset for help on using the changeset viewer.