Ignore:
Timestamp:
Sep 15, 2006, 4:30:32 AM (19 years ago)
Author:
bird
Message:

Load make-3.81/ into vendor/gnumake/current.

Location:
vendor/gnumake/current/doc
Files:
2 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current/doc/Makefile.am

    r53 r501  
    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
  • vendor/gnumake/current/doc/Makefile.in

    r152 r501  
    1 # Makefile.in generated by automake 1.8.2 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
    4360am__aclocal_m4_deps = $(top_srcdir)/config/dospaths.m4 \
     
    6885AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
    6986DVIPS = dvips
    70 am__installdirs = $(DESTDIR)$(infodir)
     87am__installdirs = "$(DESTDIR)$(infodir)"
    7188DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    7289ACLOCAL = @ACLOCAL@
     
    139156USE_NLS = @USE_NLS@
    140157VERSION = @VERSION@
     158WINDOWSENV_FALSE = @WINDOWSENV_FALSE@
     159WINDOWSENV_TRUE = @WINDOWSENV_TRUE@
    141160XGETTEXT = @XGETTEXT@
    142161ac_ct_CC = @ac_ct_CC@
     
    148167am__leading_dot = @am__leading_dot@
    149168am__quote = @am__quote@
     169am__tar = @am__tar@
     170am__untar = @am__untar@
    150171bindir = @bindir@
    151172build = @build@
     
    216237
    217238.texi.info:
    218         restore=: && \
    219         backupdir="$(am__leading_dot)am$$$$" && \
     239        restore=: && backupdir="$(am__leading_dot)am$$$$" && \
    220240        am__cwd=`pwd` && cd $(srcdir) && \
    221241        rm -rf $$backupdir && mkdir $$backupdir && \
    222         for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
    223           if test -f $$f; then \
    224             mv $$f $$backupdir; \
    225             restore=mv; \
    226           fi; \
    227         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 && \
    228247        cd "$$am__cwd"; \
    229248        if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
     
    237256          $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
    238257        fi; \
    239         rm -rf $$backupdir; \
    240         exit $$rc
     258        rm -rf $$backupdir; exit $$rc
    241259
    242260.texi.dvi:
     
    251269
    252270.texi.html:
    253         $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
    254          -o $@ $<
    255         if test ! -d $@ && test -d $(@:.html=); then \
    256           mv $(@:.html=) $@; else :; fi
    257 $(srcdir)/make.info: make.texi $(make_TEXINFOS)
    258 make.dvi: make.texi $(make_TEXINFOS)
    259 make.pdf: make.texi $(make_TEXINFOS)
    260 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
    261306.dvi.ps:
     307        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
    262308        $(DVIPS) -o $@ $<
    263309
    264310uninstall-info-am:
    265         $(PRE_UNINSTALL)
     311        @$(PRE_UNINSTALL)
    266312        @if (install-info --version && \
    267313             install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
     
    269315          for file in $$list; do \
    270316            relfile=`echo "$$file" | sed 's|^.*/||'`; \
    271             echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \
    272             install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \
     317            echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
     318            install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
    273319          done; \
    274320        else :; fi
     
    278324          relfile=`echo "$$file" | sed 's|^.*/||'`; \
    279325          relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
    280           (if cd $(DESTDIR)$(infodir); then \
    281              echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
     326          (if cd "$(DESTDIR)$(infodir)"; then \
     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]"; \
    282328             rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
    283329           else :; fi); \
     
    351397all-am: Makefile $(INFO_DEPS)
    352398installdirs:
    353         $(mkdir_p) $(DESTDIR)$(infodir)
     399        for dir in "$(DESTDIR)$(infodir)"; do \
     400          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     401        done
    354402install: install-am
    355403install-exec: install-exec-am
     
    372420
    373421distclean-generic:
    374         -rm -f $(CONFIG_CLEAN_FILES)
     422        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    375423
    376424maintainer-clean-generic:
     
    403451install-info-am: $(INFO_DEPS)
    404452        @$(NORMAL_INSTALL)
    405         $(mkdir_p) $(DESTDIR)$(infodir)
     453        test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
    406454        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    407455        list='$(INFO_DEPS)'; \
     
    416464            if test -f $$ifile; then \
    417465              relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
    418               echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
    419               $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
     466              echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
     467              $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
    420468            else : ; fi; \
    421469          done; \
     
    427475          for file in $$list; do \
    428476            relfile=`echo "$$file" | sed 's|^.*/||'`; \
    429             echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\
    430             install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\
     477            echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
     478            install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
    431479          done; \
    432480        else : ; fi
     
    438486        -rm -f Makefile
    439487maintainer-clean-am: distclean-am maintainer-clean-aminfo \
    440         maintainer-clean-generic
     488        maintainer-clean-generic maintainer-clean-vti
    441489
    442490mostlyclean: mostlyclean-am
    443491
    444 mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
     492mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
    445493
    446494pdf: pdf-am
     
    460508        install-man install-strip installcheck installcheck-am \
    461509        installdirs maintainer-clean maintainer-clean-aminfo \
    462         maintainer-clean-generic mostlyclean mostlyclean-aminfo \
    463         mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
    464         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
    465513
    466514
  • vendor/gnumake/current/doc/fdl.texi

    r152 r501  
    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
  • vendor/gnumake/current/doc/make-stds.texi

    r152 r501  
    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
  • vendor/gnumake/current/doc/make.info

    r152 r501  
    1 This is make.info, produced by makeinfo version 4.6 from 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."
    225
    326INFO-DIR-SECTION GNU Packages
     
    629END-INFO-DIR-ENTRY
    730
    8    This file documents the GNU Make utility, which determines
    9 automatically which pieces of a large program need to be recompiled,
    10 and issues the commands to recompile them.
    11 
    12    This is Edition 0.61, last updated 02 May 2003, of `The GNU Make
    13 Manual', for `make', Version 3.81.
    14 
    15    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    16 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    17 
    18    Permission is granted to copy, distribute and/or modify this document
    19 under the terms of the GNU Free Documentation License, Version 1.1 or
    20 any later version published by the Free Software Foundation; with no
    21 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    22 Texts.  A copy of the license is included in the section entitled "GNU
    23 Free Documentation License".
    24 
    2531
    2632Indirect:
    27 make.info-1: 997
    28 make.info-2: 300500
     33make.info-1: 1297
     34make.info-2: 301265
    2935
    3036Tag Table:
    3137(Indirect)
    32 Node: Top997
    33 Node: Overview13531
    34 Node: Preparing14535
    35 Node: Reading15507
    36 Node: Bugs16426
    37 Node: Introduction18248
    38 Node: Rule Introduction19832
    39 Node: Simple Makefile21568
    40 Node: How Make Works25189
    41 Node: Variables Simplify27677
    42 Node: make Deduces29880
    43 Node: Combine By Prerequisite31627
    44 Node: Cleanup32658
    45 Node: Makefiles34069
    46 Node: Makefile Contents34952
    47 Node: Makefile Names37899
    48 Node: Include39498
    49 Ref: Include-Footnote-143049
    50 Node: MAKEFILES Variable43183
    51 Node: MAKEFILE_LIST Variable44685
    52 Node: Special Variables46004
    53 Node: Remaking Makefiles46739
    54 Node: Overriding Makefiles50981
    55 Node: Reading Makefiles53031
    56 Node: Rules55558
    57 Node: Rule Example58226
    58 Node: Rule Syntax59075
    59 Node: Prerequisite Types61296
    60 Node: Wildcards63064
    61 Node: Wildcard Examples64747
    62 Node: Wildcard Pitfall65991
    63 Node: Wildcard Function67773
    64 Node: Directory Search69550
    65 Node: General Search70684
    66 Node: Selective Search72387
    67 Node: Search Algorithm75363
    68 Node: Commands/Search77870
    69 Node: Implicit/Search79205
    70 Node: Libraries/Search80137
    71 Node: Phony Targets82219
    72 Node: Force Targets87195
    73 Node: Empty Targets88232
    74 Node: Special Targets89519
    75 Node: Multiple Targets96215
    76 Node: Multiple Rules98075
    77 Node: Static Pattern100301
    78 Node: Static Usage100943
    79 Node: Static versus Implicit104664
    80 Node: Double-Colon106394
    81 Node: Automatic Prerequisites108041
    82 Node: Commands112295
    83 Node: Echoing113984
    84 Node: Execution115262
    85 Ref: Execution-Footnote-1119688
    86 Node: Parallel119834
    87 Node: Errors123417
    88 Node: Interrupts127053
    89 Node: Recursion128632
    90 Node: MAKE Variable130715
    91 Node: Variables/Recursion132966
    92 Node: Options/Recursion138111
    93 Node: -w Option143264
    94 Node: Sequences144247
    95 Node: Empty Commands147248
    96 Node: Using Variables148414
    97 Node: Reference151521
    98 Node: Flavors153077
    99 Node: Advanced158861
    100 Node: Substitution Refs159358
    101 Node: Computed Names160904
    102 Node: Values165471
    103 Node: Setting166376
    104 Node: Appending168404
    105 Node: Override Directive172319
    106 Node: Defining173695
    107 Node: Environment176151
    108 Node: Target-specific178423
    109 Node: Pattern-specific181380
    110 Node: Conditionals182772
    111 Node: Conditional Example183478
    112 Node: Conditional Syntax186062
    113 Node: Testing Flags190930
    114 Node: Functions192024
    115 Node: Syntax of Functions193366
    116 Node: Text Functions195557
    117 Node: File Name Functions203707
    118 Node: Foreach Function208146
    119 Node: If Function211346
    120 Node: Call Function212614
    121 Node: Value Function215496
    122 Node: Eval Function216930
    123 Node: Origin Function219236
    124 Node: Shell Function222445
    125 Node: Make Control Functions224026
    126 Node: Running225456
    127 Node: Makefile Arguments227441
    128 Node: Goals228149
    129 Node: Instead of Execution232704
    130 Node: Avoiding Compilation235982
    131 Node: Overriding237949
    132 Node: Testing240239
    133 Node: Options Summary242116
    134 Node: Implicit Rules251547
    135 Node: Using Implicit253691
    136 Node: Catalogue of Rules257220
    137 Node: Implicit Variables266203
    138 Node: Chained Rules270429
    139 Node: Pattern Rules274428
    140 Node: Pattern Intro275954
    141 Node: Pattern Examples278802
    142 Node: Automatic Variables280597
    143 Node: Pattern Match288760
    144 Node: Match-Anything Rules290381
    145 Node: Canceling Rules294242
    146 Node: Last Resort294944
    147 Node: Suffix Rules296781
    148 Node: Implicit Rule Search300500
    149 Node: Archives304009
    150 Node: Archive Members304701
    151 Node: Archive Update306297
    152 Node: Archive Symbols308201
    153 Node: Archive Pitfalls309421
    154 Node: Archive Suffix Rules310134
    155 Node: Features311671
    156 Node: Missing320218
    157 Node: Makefile Conventions323948
    158 Node: Makefile Basics324728
    159 Node: Utilities in Makefiles327885
    160 Node: Command Variables330013
    161 Node: Directory Variables333573
    162 Node: Standard Targets344450
    163 Ref: Standard Targets-Footnote-1355704
    164 Node: Install Command Categories355804
    165 Node: Quick Reference360369
    166 Node: Error Messages370113
    167 Node: Complex Makefile377782
    168 Node: GNU Free Documentation License386462
    169 Node: Concept Index406354
    170 Node: Name Index451260
     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
    171183
    172184End Tag Table
  • vendor/gnumake/current/doc/make.info-1

    r152 r501  
    1 This is make.info, produced by makeinfo version 4.6 from 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."
    225
    326INFO-DIR-SECTION GNU Packages
     
    629END-INFO-DIR-ENTRY
    730
    8    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
    938automatically which pieces of a large program need to be recompiled,
    1039and issues the commands to recompile them.
    1140
    12    This is Edition 0.61, last updated 02 May 2003, of `The GNU Make
    13 Manual', for `make', Version 3.81.
    14 
    15    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    16 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    17 
    18    Permission is granted to copy, distribute and/or modify this document
    19 under the terms of the GNU Free Documentation License, Version 1.1 or
    20 any later version published by the Free Software Foundation; with no
    21 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    22 Texts.  A copy of the license is included in the section entitled "GNU
    23 Free Documentation License".
    24 
    25 
    26 File: make.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
    27 
    28 Make
    29 ****
    30 
    31 The GNU `make' utility automatically determines which pieces of a large
    32 program need to be recompiled, and issues the commands to recompile
    33 them.
    34 
    35    This edition of the `GNU Make Manual', last updated 02 May 2003,
    36 documents GNU `make' Version 3.81.
    37 
    38    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."
    3959
    4060* Menu:
     
    96116                                  with another makefile.
    97117* Reading Makefiles::           How makefiles are parsed.
     118* Secondary Expansion::         How and when secondary expansion is performed.
    98119
    99120Writing Rules
     
    106127* Phony Targets::               Using a target that is not a real file's name.
    107128* Force Targets::               You can use a target without commands
    108                                   or prerequisites to mark other
    109                                   targets as phony.
     129                                  or prerequisites to mark other targets
     130                                  as phony.
    110131* Empty Targets::               When only the date matters and the
    111132                                  files are empty.
     
    147168Writing the Commands in Rules
    148169
     170* Command Syntax::              Command syntax features and pitfalls.
    149171* Echoing::                     How to control when commands are echoed.
    150172* Execution::                   How commands are executed.
     
    155177* Sequences::                   Defining canned sequences of commands.
    156178* 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.
    157189
    158190Recursive Use of `make'
     
    200232* Text Functions::              General-purpose text manipulation functions.
    201233* File Name Functions::         Functions for manipulating file names.
     234* Conditional Functions::       Functions that implement conditions.
    202235* Foreach Function::            Repeat some text with controlled variation.
    203 * If Function::                 Conditionally expand a value.
    204236* Call Function::               Expand a user-defined function.
    205237* Value Function::              Return the un-expanded value of a variable.
    206238* Eval Function::               Evaluate the arguments as makefile syntax.
    207239* Origin Function::             Find where a variable got its value.
     240* Flavor Function::             Find out the flavor of a variable.
    208241* Shell Function::              Substitute the output of a shell command.
    209242* Make Control Functions::      Functions that control how make runs.
     
    233266* Chained Rules::               How to use a chain of implicit rules.
    234267* Pattern Rules::               How to define new implicit rules.
    235 * Last Resort::                 How to defining commands for rules
    236                                   which cannot find any.
     268* Last Resort::                 How to define commands for rules which
     269                                  cannot find any.
    237270* Suffix Rules::                The old-fashioned style of implicit rule.
    238271* Implicit Rule Search::        The precise algorithm for applying
     
    263296* Archive Symbols::             How to update archive symbol directories.
    264297
    265 Makefile Conventions
    266 
    267 * Makefile Basics::             General Conventions for Makefiles
    268 * Utilities in Makefiles::      Utilities in Makefiles
    269 * Command Variables::           Variables for Specifying Commands
    270 * Directory Variables::         Variables for Installation Directories
    271 * Standard Targets::            Standard Targets for Users
    272 * Install Command Categories::  Three categories of commands in the `install'
    273 
    274 Copying This Manual
    275 
    276298
    277299File: make.info,  Node: Overview,  Next: Introduction,  Prev: Top,  Up: Top
    278300
    279 Overview of `make'
    280 ******************
     3011 Overview of `make'
     302********************
    281303
    282304The `make' utility automatically determines which pieces of a large
     
    287309
    288310   GNU `make' conforms to section 6.2 of `IEEE Standard 1003.2-1992'
    289 (POSIX.2).
     311(POSIX.2). 
    290312
    291313   Our examples show C programs, since they are most common, but you
     
    329351File: make.info,  Node: Reading,  Next: Bugs,  Prev: Preparing,  Up: Overview
    330352
    331 How to Read This Manual
    332 =======================
     3531.1 How to Read This Manual
     354===========================
    333355
    334356If you are new to `make', or are looking for a general introduction,
     
    350372File: make.info,  Node: Bugs,  Prev: Reading,  Up: Overview
    351373
    352 Problems and Bugs
    353 =================
     3741.2 Problems and Bugs
     375=====================
    354376
    355377If you have problems with GNU `make' or think you've found a bug,
     
    393415File: make.info,  Node: Introduction,  Next: Makefiles,  Prev: Overview,  Up: Top
    394416
    395 An Introduction to Makefiles
    396 ****************************
     4172 An Introduction to Makefiles
     418******************************
    397419
    398420You need a file called a "makefile" to tell `make' what to do.  Most
    399 often, the makefile tells `make' how to compile and link a program.
     421often, the makefile tells `make' how to compile and link a program. 
    400422
    401423   In this chapter, we will discuss a simple makefile that describes
     
    412434Finally, if any source file has been recompiled, all the object files,
    413435whether newly made or saved from previous compilations, must be linked
    414 together to produce the new executable editor.
     436together to produce the new executable editor. 
    415437
    416438* Menu:
     
    427449File: make.info,  Node: Rule Introduction,  Next: Simple Makefile,  Prev: Introduction,  Up: Introduction
    428450
    429 What a Rule Looks Like
    430 ======================
     4512.1 What a Rule Looks Like
     452==========================
    431453
    432454A simple makefile consists of "rules" with the following shape:
     
    470492File: make.info,  Node: Simple Makefile,  Next: How Make Works,  Prev: Rule Introduction,  Up: Introduction
    471493
    472 A Simple Makefile
    473 =================
     4942.2 A Simple Makefile
     495=====================
    474496
    475497Here is a straightforward makefile that describes the way an executable
     
    485507             cc -o edit main.o kbd.o command.o display.o \
    486508                        insert.o search.o files.o utils.o
    487      
     509
    488510     main.o : main.c defs.h
    489511             cc -c main.c
     
    507529
    508530We split each long line into two lines using backslash-newline; this is
    509 like using one long line, but is easier to read.
     531like using one long line, but is easier to read. 
    510532
    511533   To use this makefile to create the executable file called `edit',
     
    535557prerequisites.  These shell commands say how to update the target file.
    536558A tab character must come at the beginning of every command line to
    537 distinguish commands lines from other lines in the makefile.  (Bear in
     559distinguish command lines from other lines in the makefile.  (Bear in
    538560mind that `make' does not know anything about how the commands work.
    539561It is up to you to supply commands that will update the target file
    540562properly.  All `make' does is execute the commands in the rule you have
    541 specified when the target file needs to be updated.)
     563specified when the target file needs to be updated.) 
    542564
    543565   The target `clean' is not a file, but merely the name of an action.
     
    550572called "phony targets".  *Note Phony Targets::, for information about
    551573this kind of target.  *Note Errors in Commands: Errors, to see how to
    552 cause `make' to ignore errors from `rm' or any other command.
     574cause `make' to ignore errors from `rm' or any other command. 
    553575
    554576
    555577File: make.info,  Node: How Make Works,  Next: Variables Simplify,  Prev: Simple Makefile,  Up: Introduction
    556578
    557 How `make' Processes a Makefile
    558 ===============================
     5792.3 How `make' Processes a Makefile
     580===================================
    559581
    560582By default, `make' starts with the first target (not targets whose
    561583names start with `.').  This is called the "default goal".  ("Goals"
    562 are the targets that `make' strives ultimately to update.  *Note
    563 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.). 
    564588
    565589   In the simple example of the previous section, the default goal is to
     
    596620not exist, or if any of the object files are newer than it.  If an
    597621object file was just recompiled, it is now newer than `edit', so `edit'
    598 is relinked.
     622is relinked. 
    599623
    600624   Thus, if we change the file `insert.c' and run `make', `make' will
     
    607631File: make.info,  Node: Variables Simplify,  Next: make Deduces,  Prev: How Make Works,  Up: Introduction
    608632
    609 Variables Make Makefiles Simpler
    610 ================================
     6332.4 Variables Make Makefiles Simpler
     634====================================
    611635
    612636In our example, we had to list all the object files twice in the rule
     
    641665     objects = main.o kbd.o command.o display.o \
    642666               insert.o search.o files.o utils.o
    643      
     667
    644668     edit : $(objects)
    645669             cc -o edit $(objects)
     
    666690File: make.info,  Node: make Deduces,  Next: Combine By Prerequisite,  Prev: Variables Simplify,  Up: Introduction
    667691
    668 Letting `make' Deduce the Commands
    669 ==================================
     6922.5 Letting `make' Deduce the Commands
     693======================================
    670694
    671695It is not necessary to spell out the commands for compiling the
     
    686710     objects = main.o kbd.o command.o display.o \
    687711               insert.o search.o files.o utils.o
    688      
     712
    689713     edit : $(objects)
    690714             cc -o edit $(objects)
    691      
     715
    692716     main.o : defs.h
    693717     kbd.o : defs.h command.h
     
    698722     files.o : defs.h buffer.h command.h
    699723     utils.o : defs.h
    700      
     724
    701725     .PHONY : clean
    702726     clean :
     
    713737File: make.info,  Node: Combine By Prerequisite,  Next: Cleanup,  Prev: make Deduces,  Up: Introduction
    714738
    715 Another Style of Makefile
    716 =========================
     7392.6 Another Style of Makefile
     740=============================
    717741
    718742When the objects of a makefile are created only by implicit rules, an
     
    723747     objects = main.o kbd.o command.o display.o \
    724748               insert.o search.o files.o utils.o
    725      
     749
    726750     edit : $(objects)
    727751             cc -o edit $(objects)
    728      
     752
    729753     $(objects) : defs.h
    730754     kbd.o command.o files.o : command.h
     
    742766File: make.info,  Node: Cleanup,  Prev: Combine By Prerequisite,  Up: Introduction
    743767
    744 Rules for Cleaning the Directory
    745 ================================
     7682.7 Rules for Cleaning the Directory
     769====================================
    746770
    747771Compiling a program is not the only thing you might want to write rules
     
    781805File: make.info,  Node: Makefiles,  Next: Rules,  Prev: Introduction,  Up: Top
    782806
    783 Writing Makefiles
    784 *****************
     8073 Writing Makefiles
     808*******************
    785809
    786810The information that tells `make' how to recompile a system comes from
     
    799823                                  with another makefile.
    800824* Reading Makefiles::           How makefiles are parsed.
     825* Secondary Expansion::         How and when secondary expansion is performed.
    801826
    802827
    803828File: make.info,  Node: Makefile Contents,  Next: Makefile Names,  Prev: Makefiles,  Up: Makefiles
    804829
    805 What Makefiles Contain
    806 ======================
     8303.1 What Makefiles Contain
     831==========================
    807832
    808833Makefiles contain five kinds of things: "explicit rules", "implicit
     
    864889File: make.info,  Node: Makefile Names,  Next: Include,  Prev: Makefile Contents,  Up: Makefiles
    865890
    866 What Name to Give Your Makefile
    867 ===============================
     8913.2 What Name to Give Your Makefile
     892===================================
    868893
    869894By default, when `make' looks for the makefile, it tries the following
    870 names, in order: `GNUmakefile', `makefile' and `Makefile'.
     895names, in order: `GNUmakefile', `makefile' and `Makefile'. 
    871896
    872897   Normally you should call your makefile either `makefile' or
     
    891916concatenated in the order specified.  The default makefile names
    892917`GNUmakefile', `makefile' and `Makefile' are not checked automatically
    893 if you specify `-f' or `--file'.
     918if you specify `-f' or `--file'. 
    894919
    895920
    896921File: make.info,  Node: Include,  Next: MAKEFILES Variable,  Prev: Makefile Names,  Up: Makefiles
    897922
    898 Including Other Makefiles
    899 =========================
     9233.3 Including Other Makefiles
     924=============================
    900925
    901926The `include' directive tells `make' to suspend reading the current
     
    905930     include FILENAMES...
    906931
    907 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. 
    908934
    909935   Extra spaces are allowed and ignored at the beginning of the line,
     
    942968than that of somehow appending the prerequisites to the end of the main
    943969makefile as has been traditionally done with other versions of `make'.
    944 *Note Automatic Prerequisites::.
     970*Note Automatic Prerequisites::. 
    945971
    946972   If the specified name does not start with a slash, and the file is
     
    9801006File: make.info,  Node: MAKEFILES Variable,  Next: MAKEFILE_LIST Variable,  Prev: Include,  Up: Makefiles
    9811007
    982 The Variable `MAKEFILES'
    983 ========================
     10083.4 The Variable `MAKEFILES'
     1009============================
    9841010
    9851011If the environment variable `MAKEFILES' is defined, `make' considers
     
    10091035File: make.info,  Node: MAKEFILE_LIST Variable,  Next: Special Variables,  Prev: MAKEFILES Variable,  Up: Makefiles
    10101036
    1011 The Variable `MAKEFILE_LIST'
    1012 ============================
     10373.5 The Variable `MAKEFILE_LIST'
     1038================================
    10131039
    10141040As `make' reads various makefiles, including any obtained from the
     
    10251051   If a makefile named `Makefile' has this content:
    10261052
    1027      name1 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
    1028      
     1053     name1 := $(lastword $(MAKEFILE_LIST))
     1054
    10291055     include inc.mk
    1030      
    1031      name2 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
    1032      
     1056
     1057     name2 := $(lastword $(MAKEFILE_LIST))
     1058
    10331059     all:
    10341060             @echo name1 = $(name1)
     
    10481074File: make.info,  Node: Special Variables,  Next: Remaking Makefiles,  Prev: MAKEFILE_LIST Variable,  Up: Makefiles
    10491075
    1050 Other Special Variables
    1051 =======================
    1052 
    1053 GNU `make' also supports a special variable.  Note that any value you
    1054 assign to this variable will be ignored; it will always return its
    1055 special value.
    1056 
    1057    The first special variable is `.VARIABLES'.  When expanded, the
    1058 value consists of a list of the _names_ of all global variables defined
    1059 in all makefiles read up until that point.  This includes variables
    1060 which have empty values, as well as built-in variables (*note Variables
    1061 Used by Implicit Rules: Implicit Variables.), but does not include any
    1062 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
    10631175
    10641176
    10651177File: make.info,  Node: Remaking Makefiles,  Next: Overriding Makefiles,  Prev: Special Variables,  Up: Makefiles
    10661178
    1067 How Makefiles Are Remade
    1068 ========================
     11793.7 How Makefiles Are Remade
     1180============================
    10691181
    10701182Sometimes makefiles can be remade from other files, such as RCS or SCCS
     
    11031215   If you do not specify any makefiles to be read with `-f' or `--file'
    11041216options, `make' will try the default makefile names; *note What Name to
    1105 Give Your Makefile: Makefile Names..  Unlike makefiles explicitly
     1217Give Your Makefile: Makefile Names.  Unlike makefiles explicitly
    11061218requested with `-f' or `--file' options, `make' is not certain that
    11071219these makefiles should exist.  However, if a default makefile does not
     
    11431255File: make.info,  Node: Overriding Makefiles,  Next: Reading Makefiles,  Prev: Remaking Makefiles,  Up: Makefiles
    11441256
    1145 Overriding Part of Another Makefile
    1146 ===================================
     12573.8 Overriding Part of Another Makefile
     1258=======================================
    11471259
    11481260Sometimes it is useful to have a makefile that is mostly just like
     
    11641276     foo:
    11651277             frobnicate > foo
    1166      
     1278
    11671279     %: force
    11681280             @$(MAKE) -f Makefile $@
     
    11861298
    11871299
    1188 File: make.info,  Node: Reading Makefiles,  Prev: Overriding Makefiles,  Up: Makefiles
    1189 
    1190 How `make' Reads a Makefile
    1191 ===========================
     1300File: make.info,  Node: Reading Makefiles,  Next: Secondary Expansion,  Prev: Overriding Makefiles,  Up: Makefiles
     1301
     13023.9 How `make' Reads a Makefile
     1303===============================
    11921304
    11931305GNU `make' does its work in two distinct phases.  During the first
     
    12241336     IMMEDIATE := IMMEDIATE
    12251337     IMMEDIATE += DEFERRED or IMMEDIATE
    1226      
     1338
    12271339     define IMMEDIATE
    12281340       DEFERRED
     
    12381350All instances of conditional syntax are parsed immediately, in their
    12391351entirety; this includes the `ifdef', `ifeq', `ifndef', and `ifneq'
    1240 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.
    12411357
    12421358Rule Definition
     
    12541370
    12551371
     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
    12561551File: make.info,  Node: Rules,  Next: Commands,  Prev: Makefiles,  Up: Top
    12571552
    1258 Writing Rules
    1259 *************
     15534 Writing Rules
     1554***************
    12601555
    12611556A "rule" appears in the makefile and says when and how to remake
     
    12881583* Phony Targets::               Using a target that is not a real file's name.
    12891584* Force Targets::               You can use a target without commands
    1290                                   or prerequisites to mark other
    1291                                   targets as phony.
     1585                                  or prerequisites to mark other targets
     1586                                  as phony.
    12921587* Empty Targets::               When only the date matters and the
    12931588                                  files are empty.
     
    13061601File: make.info,  Node: Rule Example,  Next: Rule Syntax,  Prev: Rules,  Up: Rules
    13071602
    1308 Rule Example
    1309 ============
     16034.1 Rule Example
     1604================
    13101605
    13111606Here is an example of a rule:
     
    13321627File: make.info,  Node: Rule Syntax,  Next: Prerequisite Types,  Prev: Rule Example,  Up: Rules
    13331628
    1334 Rule Syntax
    1335 ===========
     16294.2 Rule Syntax
     1630===============
    13361631
    13371632In general, a rule looks like this:
     
    13581653appear on the line after the prerequisites, with a tab character, or may
    13591654appear on the same line, with a semicolon.  Either way, the effect is
    1360 the same.  *Note Writing the Commands in Rules: Commands.
    1361 
    1362    Because dollar signs are used to start variable references, if you
    1363 really want a dollar sign in a rule you must write two of them, `$$'
    1364 (*note How to Use Variables: Using Variables.).  You may split a long
    1365 line by inserting a backslash followed by a newline, but this is not
    1366 required, as `make' places no limit on the length of a line in a
    1367 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.
    13681668
    13691669   A rule tells `make' two things: when the targets are out of date,
     
    13871687File: make.info,  Node: Prerequisite Types,  Next: Wildcards,  Prev: Rule Syntax,  Up: Rules
    13881688
    1389 Types of Prerequisites
    1390 ======================
     16894.3 Types of Prerequisites
     1690==========================
    13911691
    13921692There are actually two different types of prerequisites understood by
     
    14231723File: make.info,  Node: Wildcards,  Next: Directory Search,  Prev: Prerequisite Types,  Up: Rules
    14241724
    1425 Using Wildcard Characters in File Names
    1426 =======================================
     17254.4 Using Wildcard Characters in File Names
     1726===========================================
    14271727
    14281728A single file name can specify many files using "wildcard characters".
     
    14401740simulated by setting the environment variable HOME.
    14411741
    1442    Wildcard expansion happens automatically in targets, in
    1443 prerequisites, and in commands (where the shell does the expansion).
    1444 In other contexts, wildcard expansion happens only if you request it
    1445 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.
    14461746
    14471747   The special significance of a wildcard character can be turned off by
     
    14591759File: make.info,  Node: Wildcard Examples,  Next: Wildcard Pitfall,  Prev: Wildcards,  Up: Wildcards
    14601760
    1461 Wildcard Examples
    1462 -----------------
     17614.4.1 Wildcard Examples
     1762-----------------------
    14631763
    14641764Wildcards can be used in the commands of a rule, where they are expanded
     
    14991799File: make.info,  Node: Wildcard Pitfall,  Next: Wildcard Function,  Prev: Wildcard Examples,  Up: Wildcards
    15001800
    1501 Pitfalls of Using Wildcards
    1502 ---------------------------
     18014.4.2 Pitfalls of Using Wildcards
     1802---------------------------------
    15031803
    15041804Now here is an example of a naive way of using wildcard expansion, that
     
    15081808
    15091809     objects = *.o
    1510      
     1810
    15111811     foo : $(objects)
    15121812             cc -o foo $(CFLAGS) $(objects)
     
    15421842File: make.info,  Node: Wildcard Function,  Prev: Wildcard Pitfall,  Up: Wildcards
    15431843
    1544 The Function `wildcard'
    1545 -----------------------
     18444.4.3 The Function `wildcard'
     1845-----------------------------
    15461846
    15471847Wildcard expansion happens automatically in rules.  But wildcard
     
    15781878
    15791879     objects := $(patsubst %.c,%.o,$(wildcard *.c))
    1580      
     1880
    15811881     foo : $(objects)
    15821882             cc -o foo $(objects)
     
    15901890File: make.info,  Node: Directory Search,  Next: Phony Targets,  Prev: Wildcards,  Up: Rules
    15911891
    1592 Searching Directories for Prerequisites
    1593 =======================================
     18924.5 Searching Directories for Prerequisites
     1893===========================================
    15941894
    15951895For large systems, it is often desirable to put sources in a separate
     
    16141914File: make.info,  Node: General Search,  Next: Selective Search,  Prev: Directory Search,  Up: Directory Search
    16151915
    1616 `VPATH': Search Path for All Prerequisites
    1617 ------------------------------------------
     19164.5.1 `VPATH': Search Path for All Prerequisites
     1917------------------------------------------------
    16181918
    16191919The value of the `make' variable `VPATH' specifies a list of
     
    16581958File: make.info,  Node: Selective Search,  Next: Search Algorithm,  Prev: General Search,  Up: Directory Search
    16591959
    1660 The `vpath' Directive
    1661 ---------------------
     19604.5.2 The `vpath' Directive
     1961---------------------------
    16621962
    16631963Similar to the `VPATH' variable, but more selective, is the `vpath'
     
    17372037File: make.info,  Node: Search Algorithm,  Next: Commands/Search,  Prev: Selective Search,  Up: Directory Search
    17382038
    1739 How Directory Searches are Performed
    1740 ------------------------------------
     20394.5.3 How Directory Searches are Performed
     2040------------------------------------------
    17412041
    17422042When a prerequisite is found through directory search, regardless of
     
    17952095File: make.info,  Node: Commands/Search,  Next: Implicit/Search,  Prev: Search Algorithm,  Up: Directory Search
    17962096
    1797 Writing Shell Commands with Directory Search
    1798 --------------------------------------------
     20974.5.4 Writing Shell Commands with Directory Search
     2098--------------------------------------------------
    17992099
    18002100When a prerequisite is found in another directory through directory
     
    18162116compilation by implicit rules; we use it here for consistency so it will
    18172117affect all C compilations uniformly; *note Variables Used by Implicit
    1818 Rules: Implicit Variables..)
     2118Rules: Implicit Variables.)
    18192119
    18202120   Often the prerequisites include header files as well, which you do
     
    18292129File: make.info,  Node: Implicit/Search,  Next: Libraries/Search,  Prev: Commands/Search,  Up: Directory Search
    18302130
    1831 Directory Search and Implicit Rules
    1832 -----------------------------------
     21314.5.5 Directory Search and Implicit Rules
     2132-----------------------------------------
    18332133
    18342134The search through the directories specified in `VPATH' or with `vpath'
     
    18502150File: make.info,  Node: Libraries/Search,  Prev: Implicit/Search,  Up: Directory Search
    18512151
    1852 Directory Search for Link Libraries
    1853 -----------------------------------
     21524.5.6 Directory Search for Link Libraries
     2153-----------------------------------------
    18542154
    18552155Directory search applies in a special way to libraries used with the
     
    18892189word in the list will be used.
    18902190
    1891    The default value for `.LIBPATTERNS' is "`lib%.so lib%.a'", which
     2191   The default value for `.LIBPATTERNS' is `lib%.so lib%.a', which
    18922192provides the default behavior described above.
    18932193
     
    18982198File: make.info,  Node: Phony Targets,  Next: Force Targets,  Prev: Directory Search,  Up: Rules
    18992199
    1900 Phony Targets
    1901 =============
     22004.6 Phony Targets
     2201=================
    19022202
    19032203A phony target is one that is not really the name of a file.  It is
     
    19152215Because the `rm' command does not create a file named `clean', probably
    19162216no such file will ever exist.  Therefore, the `rm' command will be
    1917 executed every time you say `make clean'.
     2217executed every time you say `make clean'. 
    19182218
    19192219   The phony target will cease to work if anything ever does create a
     
    19452245   Another example of the usefulness of phony targets is in conjunction
    19462246with recursive invocations of `make' (for more information, see *Note
    1947 Recursive Use of `make': Recursion).  In this case the makefile will
     2247Recursive Use of `make': Recursion.).  In this case the makefile will
    19482248often contain a variable which lists a number of subdirectories to be
    19492249built.  One way to handle this is with one rule whose command is a
     
    19512251
    19522252     SUBDIRS = foo bar baz
    1953      
     2253
    19542254     subdirs:
    19552255             for dir in $(SUBDIRS); do \
     
    19632263it will do so even if `make' is invoked with the `-k' option, which is
    19642264unfortunate.  Second, and perhaps more importantly, you cannot take
    1965 advantage of the parallel build capabilities of make using this method,
    1966 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.
    19672267
    19682268   By declaring the subdirectories as phony targets (you must do this as
     
    19712271
    19722272     SUBDIRS = foo bar baz
    1973      
     2273
    19742274     .PHONY: subdirs $(SUBDIRS)
    1975      
     2275
    19762276     subdirs: $(SUBDIRS)
    1977      
     2277
    19782278     $(SUBDIRS):
    19792279             $(MAKE) -C $@
    1980      
     2280
    19812281     foo: baz
    19822282
     
    20022302     all : prog1 prog2 prog3
    20032303     .PHONY : all
    2004      
     2304
    20052305     prog1 : prog1.o utils.o
    20062306             cc -o prog1 prog1.o utils.o
    2007      
     2307
    20082308     prog2 : prog2.o
    20092309             cc -o prog2 prog2.o
    2010      
     2310
    20112311     prog3 : prog3.o sort.o utils.o
    20122312             cc -o prog3 prog3.o sort.o utils.o
    20132313
    20142314Now you can say just `make' to remake all three programs, or specify as
    2015 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.
    20162318
    20172319   When one phony target is a prerequisite of another, it serves as a
     
    20202322
    20212323     .PHONY: cleanall cleanobj cleandiff
    2022      
     2324
    20232325     cleanall : cleanobj cleandiff
    20242326             rm program
    2025      
     2327
    20262328     cleanobj :
    20272329             rm *.o
    2028      
     2330
    20292331     cleandiff :
    20302332             rm *.diff
     
    20332335File: make.info,  Node: Force Targets,  Next: Empty Targets,  Prev: Phony Targets,  Up: Rules
    20342336
    2035 Rules without Commands or Prerequisites
    2036 =======================================
     23374.7 Rules without Commands or Prerequisites
     2338===========================================
    20372339
    20382340If a rule has no prerequisites or commands, and the target of the rule
     
    20622364File: make.info,  Node: Empty Targets,  Next: Special Targets,  Prev: Force Targets,  Up: Rules
    20632365
    2064 Empty Target Files to Record Events
    2065 ===================================
     23664.8 Empty Target Files to Record Events
     2367=======================================
    20662368
    20672369The "empty target" is a variant of the phony target; it is used to hold
     
    20842386             lpr -p $?
    20852387             touch print
    2086 
     2388   
    20872389With this rule, `make print' will execute the `lpr' command if either
    20882390source file has changed since the last `make print'.  The automatic
     
    20932395File: make.info,  Node: Special Targets,  Next: Multiple Targets,  Prev: Empty Targets,  Up: Rules
    20942396
    2095 Special Built-in Target Names
    2096 =============================
     23974.9 Special Built-in Target Names
     2398=================================
    20972399
    20982400Certain names have special meanings if they appear as targets.
     
    21472449     intermediate).
    21482450
     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
    21492461`.DELETE_ON_ERROR'
    21502462     If `.DELETE_ON_ERROR' is mentioned as a target anywhere in the
     
    22332545File: make.info,  Node: Multiple Targets,  Next: Multiple Rules,  Prev: Special Targets,  Up: Rules
    22342546
    2235 Multiple Targets in a Rule
    2236 ==========================
     25474.10 Multiple Targets in a Rule
     2548===============================
    22372549
    22382550A rule with multiple targets is equivalent to writing many rules, each
     
    22582570          bigoutput littleoutput : text.g
    22592571                  generate text.g -$(subst output,,$@) > $@
    2260 
     2572     
    22612573     is equivalent to
    22622574
     
    22802592File: make.info,  Node: Multiple Rules,  Next: Static Pattern,  Prev: Multiple Targets,  Up: Rules
    22812593
    2282 Multiple Rules for One Target
    2283 =============================
     25944.11 Multiple Rules for One Target
     2595==================================
    22842596
    22852597One file can be the target of several rules.  All the prerequisites
     
    23312643File: make.info,  Node: Static Pattern,  Next: Double-Colon,  Prev: Multiple Rules,  Up: Rules
    23322644
    2333 Static Pattern Rules
    2334 ====================
     26454.12 Static Pattern Rules
     2646=========================
    23352647
    23362648"Static pattern rules" are rules which specify multiple targets and
     
    23482660File: make.info,  Node: Static Usage,  Next: Static versus Implicit,  Prev: Static Pattern,  Up: Static Pattern
    23492661
    2350 Syntax of Static Pattern Rules
    2351 ------------------------------
     26624.12.1 Syntax of Static Pattern Rules
     2663-------------------------------------
    23522664
    23532665Here is the syntax of a static pattern rule:
     
    23972709
    23982710     objects = foo.o bar.o
    2399      
     2711
    24002712     all: $(objects)
    2401      
     2713
    24022714     $(objects): %.o: %.c
    24032715             $(CC) -c $(CFLAGS) $< -o $@
     
    24142726
    24152727     files = foo.elc bar.o lose.o
    2416      
     2728
    24172729     $(filter %.o,$(files)): %.o: %.c
    24182730             $(CC) -c $(CFLAGS) $< -o $@
     
    24262738from `foo.el'.
    24272739
    2428    Another example shows how to use `$*' in static pattern rules:
     2740   Another example shows how to use `$*' in static pattern rules: 
    24292741
    24302742     bigoutput littleoutput : %output : text.g
     
    24372749File: make.info,  Node: Static versus Implicit,  Prev: Static Usage,  Up: Static Pattern
    24382750
    2439 Static Pattern Rules versus Implicit Rules
    2440 ------------------------------------------
     27514.12.2 Static Pattern Rules versus Implicit Rules
     2752-------------------------------------------------
    24412753
    24422754A static pattern rule has much in common with an implicit rule defined
     
    24742786File: make.info,  Node: Double-Colon,  Next: Automatic Prerequisites,  Prev: Static Pattern,  Up: Rules
    24752787
    2476 Double-Colon Rules
    2477 ==================
     27884.13 Double-Colon Rules
     2789=======================
    24782790
    24792791"Double-colon" rules are rules written with `::' instead of `:' after
     
    25112823File: make.info,  Node: Automatic Prerequisites,  Prev: Double-Colon,  Up: Rules
    25122824
    2513 Generating Prerequisites Automatically
    2514 ======================================
     28254.14 Generating Prerequisites Automatically
     2826===========================================
    25152827
    25162828In the makefile for a program, many of the rules you need to write often
     
    25242836would have to write dozens of such rules in your makefile.  And, you
    25252837must always be very careful to update the makefile every time you add
    2526 or remove an `#include'.
     2838or remove an `#include'. 
    25272839
    25282840   To avoid this hassle, most modern C compilers can write these rules
     
    25432855makefile, so it can never be considered an intermediate file by implicit
    25442856rule search.  This means that `make' won't ever remove the file after
    2545 using it; *note Chains of Implicit Rules: Chained Rules..
     2857using it; *note Chains of Implicit Rules: Chained Rules.
    25462858
    25472859   With old `make' programs, it was traditional practice to use this
     
    25672879
    25682880     %.d: %.c
    2569              
     2881             @set -e; rm -f $@; \
    25702882              $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
    25712883              sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
     
    25742886*Note Pattern Rules::, for information on defining pattern rules.  The
    25752887`-e' flag to the shell causes it to exit immediately if the `$(CC)'
    2576 command (or any other command) fails (exits with a nonzero status).
     2888command (or any other command) fails (exits with a nonzero status). 
    25772889
    25782890   With the GNU C compiler, you may wish to use the `-MM' flag instead
     
    25992911
    26002912     sources = foo.c bar.c
    2601      
     2913
    26022914     include $(sources:.c=.d)
    26032915
     
    26102922
    26112923   Note that the `.d' files contain target definitions; you should be
    2612 sure to place the `include' directive _after_ the first, default target
     2924sure to place the `include' directive _after_ the first, default goal
    26132925in your makefiles or run the risk of having a random object file become
    2614 the default target.  *Note How Make Works::.
     2926the default goal.  *Note How Make Works::.
    26152927
    26162928
    26172929File: make.info,  Node: Commands,  Next: Using Variables,  Prev: Rules,  Up: Top
    26182930
    2619 Writing the Commands in Rules
    2620 *****************************
    2621 
    2622 The commands of a rule consist of shell command lines to be executed one
    2623 by one.  Each command line must start with a tab, except that the first
    2624 command line may be attached to the target-and-prerequisites line with a
    2625 semicolon in between.  Blank lines and lines of just comments may appear
    2626 among the command lines; they are ignored.  (But beware, an apparently
    2627 "blank" line that begins with a tab is _not_ blank!  It is an empty
    2628 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.
    26292938
    26302939   Users use many different shell programs, but commands in makefiles
     
    26322941otherwise.  *Note Command Execution: Execution.
    26332942
    2634    The shell that is in use determines whether comments can be written
    2635 on command lines, and what syntax they use.  When the shell is
    2636 `/bin/sh', a `#' starts a comment that extends to the end of the line.
    2637 The `#' does not have to be at the beginning of a line.  Text on a line
    2638 before a `#' is not part of the comment.
    2639 
    26402943* Menu:
    26412944
     2945* Command Syntax::              Command syntax features and pitfalls.
    26422946* Echoing::                     How to control when commands are echoed.
    26432947* Execution::                   How commands are executed.
     
    26502954
    26512955
    2652 File: make.info,  Node: Echoing,  Next: Execution,  Prev: Commands,  Up: Commands
    2653 
    2654 Command Echoing
    2655 ===============
     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===================
    26563134
    26573135Normally `make' prints each command line before it is executed.  We
     
    26823160File: make.info,  Node: Execution,  Next: Parallel,  Prev: Echoing,  Up: Commands
    26833161
    2684 Command Execution
    2685 =================
     31625.3 Command Execution
     3163=====================
    26863164
    26873165When it is time to execute commands to update a target, they are
    2688 executed by making a new subshell for each line.  (In practice, `make'
    2689 may take shortcuts that do not affect the results.)
    2690 
    2691    *Please note:* this implies that shell commands such as `cd' that
    2692 set variables local to each process will not affect the following
    2693 command lines. (1)  If you want to use `cd' to affect the next command,
    2694 put the two on a single line with a semicolon between them.  Then
    2695 `make' will consider them a single command and pass them, together, to
    2696 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:
    26973176
    26983177     foo : bar/lose
    2699              cd bar; gobble lose > ../foo
    2700 
    2701    If you would like to split a single shell command into multiple
    2702 lines of text, you must use a backslash at the end of all but the last
    2703 subline.  Such a sequence of lines is combined into a single line, by
    2704 deleting the backslash-newline sequences, before passing it to the
    2705 shell.  Thus, the following is equivalent to the preceding example:
    2706 
    2707      foo : bar/lose
    2708              cd bar;  \
    2709              gobble lose > ../foo
    2710 
    2711    The program used as the shell is taken from the variable `SHELL'.
    2712 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.
    27133233
    27143234   On MS-DOS, if `SHELL' is not set, the value of the variable
     
    27563276
    27573277   The effect of the above DOS-specific processing is that a Makefile
    2758 that says `SHELL = /bin/sh' (as many Unix makefiles do), will work on
    2759 MS-DOS unaltered if you have e.g. `sh.exe' installed in some directory
    2760 along your `PATH'.
    2761 
    2762    Unlike most variables, the variable `SHELL' is never set from the
    2763 environment.  This is because the `SHELL' environment variable is used
    2764 to specify your personal choice of shell program for interactive use.
    2765 It would be very bad for personal choices like this to affect the
    2766 functioning of makefiles.  *Note Variables from the Environment:
    2767 Environment.  However, on MS-DOS and MS-Windows the value of `SHELL' in
    2768 the environment *is* used, since on those systems most users do not set
    2769 this variable, and therefore it is most likely set specifically to be
    2770 used by `make'.  On MS-DOS, if the setting of `SHELL' is not suitable
    2771 for `make', you can set the variable `MAKESHELL' to the shell that
    2772 `make' should use; this will override the value of `SHELL'.
    2773 
    2774    ---------- Footnotes ----------
    2775 
    2776    (1) On MS-DOS, the value of current working directory is *global*,
    2777 so changing it _will_ affect the following command lines on those
    2778 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'.
    27793281
    27803282
    27813283File: make.info,  Node: Parallel,  Next: Errors,  Prev: Execution,  Up: Commands
    27823284
    2783 Parallel Execution
    2784 ==================
     32855.4 Parallel Execution
     3286======================
    27853287
    27863288GNU `make' knows how to execute several commands at once.  Normally,
     
    28083310streams of all but one running command.  This means that attempting to
    28093311read from standard input will usually be a fatal error (a `Broken pipe'
    2810 signal) for most child processes if there are several.
     3312signal) for most child processes if there are several. 
    28113313
    28123314   It is unpredictable which command will have a valid standard input
     
    28573359File: make.info,  Node: Errors,  Next: Interrupts,  Prev: Parallel,  Up: Commands
    28583360
    2859 Errors in Commands
    2860 ==================
     33615.5 Errors in Commands
     3362======================
    28613363
    28623364After each shell command returns, `make' looks at its exit status.  If
     
    29163418program as possible, perhaps to find several independent problems so
    29173419that you can correct them all before the next attempt to compile.  This
    2918 is why Emacs' `compile' command passes the `-k' flag by default.
     3420is why Emacs' `compile' command passes the `-k' flag by default. 
    29193421
    29203422   Usually when a command fails, if it has changed the target file at
     
    29333435File: make.info,  Node: Interrupts,  Next: Recursion,  Prev: Errors,  Up: Commands
    29343436
    2935 Interrupting or Killing `make'
    2936 ==============================
     34375.6 Interrupting or Killing `make'
     3438==================================
    29373439
    29383440If `make' gets a fatal signal while a command is executing, it may
     
    29643466File: make.info,  Node: Recursion,  Next: Sequences,  Prev: Interrupts,  Up: Commands
    29653467
    2966 Recursive Use of `make'
    2967 =======================
     34685.7 Recursive Use of `make'
     3469===========================
    29683470
    29693471Recursive use of `make' means using `make' as a command in a makefile.
     
    29813483     subsystem:
    29823484             $(MAKE) -C subdir
    2983 
     3485   
    29843486   You can write recursive `make' commands just by copying this example,
    29853487but there are many things to know about how they work and why, and about
     
    30113513File: make.info,  Node: MAKE Variable,  Next: Variables/Recursion,  Prev: Recursion,  Up: Recursion
    30123514
    3013 How the `MAKE' Variable Works
    3014 -----------------------------
     35155.7.1 How the `MAKE' Variable Works
     3516-----------------------------------
    30153517
    30163518Recursive `make' commands should always use the variable `MAKE', not
     
    30243526is `cd subdir && /bin/make'.  If you use a special version of `make' to
    30253527run the top-level makefile, the same special version will be executed
    3026 for recursive invocations.
     3528for recursive invocations. 
    30273529
    30283530   As a special feature, using the variable `MAKE' in the commands of a
     
    30423544file named `subsystem' and do nothing else.  What you really want it to
    30433545do is run `cd subdir && make -t'; but that would require executing the
    3044 command, and `-t' says not to execute commands.
     3546command, and `-t' says not to execute commands. 
    30453547
    30463548   The special feature makes this do what you want: whenever a command
     
    30563558File: make.info,  Node: Variables/Recursion,  Next: Options/Recursion,  Prev: MAKE Variable,  Up: Recursion
    30573559
    3058 Communicating Variables to a Sub-`make'
    3059 ---------------------------------------
     35605.7.2 Communicating Variables to a Sub-`make'
     3561---------------------------------------------
    30603562
    30613563Variable values of the top-level `make' can be passed to the sub-`make'
     
    30763578characters other than letters, numbers, and underscores.
    30773579
    3078    The special variables `SHELL' and `MAKEFLAGS' are always exported
    3079 (unless you unexport them).  `MAKEFILES' is exported if you set it to
    3080 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.
    30813588
    30823589   `make' automatically passes down variable values that were defined
     
    31533660`.EXPORT_ALL_VARIABLES' instead of using the `export' directive.  This
    31543661will be ignored by old `make's, while the `export' directive will cause
    3155 a syntax error.
     3662a syntax error. 
    31563663
    31573664   Likewise, you can use `unexport' by itself to tell `make' _not_ to
     
    31863693File: make.info,  Node: Options/Recursion,  Next: -w Option,  Prev: Variables/Recursion,  Up: Recursion
    31873694
    3188 Communicating Options to a Sub-`make'
    3189 -------------------------------------
     36955.7.3 Communicating Options to a Sub-`make'
     3696-------------------------------------------
    31903697
    31913698Flags such as `-s' and `-k' are passed automatically to the sub-`make'
     
    32913798File: make.info,  Node: -w Option,  Prev: Options/Recursion,  Up: Recursion
    32923799
    3293 The `--print-directory' Option
    3294 ------------------------------
     38005.7.4 The `--print-directory' Option
     3801------------------------------------
    32953802
    32963803If you use several levels of recursive `make' invocations, the `-w' or
     
    33173824File: make.info,  Node: Sequences,  Next: Empty Commands,  Prev: Recursion,  Up: Commands
    33183825
    3319 Defining Canned Command Sequences
    3320 =================================
     38265.8 Defining Canned Command Sequences
     3827=====================================
    33213828
    33223829When the same sequence of commands is useful in making various targets,
     
    33323839     mv y.tab.c $@
    33333840     endef
    3334 
     3841   
    33353842Here `run-yacc' is the name of the variable being defined; `endef'
    33363843marks the end of the definition; the lines in between are the commands.
     
    33923899File: make.info,  Node: Empty Commands,  Prev: Sequences,  Up: Commands
    33933900
    3394 Using Empty Commands
    3395 ====================
     39015.9 Using Empty Commands
     3902========================
    33963903
    33973904It is sometimes useful to define commands which do nothing.  This is
     
    34213928File: make.info,  Node: Using Variables,  Next: Conditionals,  Prev: Commands,  Up: Top
    34223929
    3423 How to Use Variables
    3424 ********************
     39306 How to Use Variables
     3931**********************
    34253932
    34263933A "variable" is a name defined in a makefile to represent a string of
     
    34283935explicit request into targets, prerequisites, commands, and other parts
    34293936of the makefile.  (In some other versions of `make', variables are
    3430 called "macros".)
     3937called "macros".) 
    34313938
    34323939   Variables and functions in all parts of a makefile are expanded when
     
    34833990File: make.info,  Node: Reference,  Next: Flavors,  Prev: Using Variables,  Up: Using Variables
    34843991
    3485 Basics of Variable References
    3486 =============================
     39926.1 Basics of Variable References
     3993=================================
    34873994
    34883995To substitute a variable's value, write a dollar sign followed by the
     
    35004007     program : $(objects)
    35014008             cc -o program $(objects)
    3502      
     4009
    35034010     $(objects) : defs.h
    35044011
     
    35234030File: make.info,  Node: Flavors,  Next: Advanced,  Prev: Reference,  Up: Using Variables
    35244031
    3525 The Two Flavors of Variables
    3526 ============================
     40326.2 The Two Flavors of Variables
     4033================================
    35274034
    35284035There are two ways that a variable in GNU `make' can have a value; we
     
    35444051     bar = $(ugh)
    35454052     ugh = Huh?
    3546      
     4053
    35474054     all:;echo $(foo)
    35484055
     
    35644071
    35654072because it will cause an infinite loop in the variable expansion.
    3566 (Actually `make' detects the infinite loop and reports an error.)
     4073(Actually `make' detects the infinite loop and reports an error.) 
    35674074
    35684075   Another disadvantage is that any functions (*note Functions for
     
    36054112
    36064113     ifeq (0,${MAKELEVEL})
    3607      cur-dir   := $(shell pwd)
    36084114     whoami    := $(shell whoami)
    36094115     host-type := $(shell arch)
     
    36154121
    36164122     ${subdirs}:
    3617            ${MAKE} cur-dir=${cur-dir}/$@ -C $@ all
     4123             ${MAKE} -C $@ all
    36184124
    36194125   Simply expanded variables generally make complicated makefile
     
    36694175File: make.info,  Node: Advanced,  Next: Values,  Prev: Flavors,  Up: Using Variables
    36704176
    3671 Advanced Features for Reference to Variables
    3672 ============================================
     41776.3 Advanced Features for Reference to Variables
     4178================================================
    36734179
    36744180This section describes some advanced features you can use to reference
     
    36844190File: make.info,  Node: Substitution Refs,  Next: Computed Names,  Prev: Advanced,  Up: Advanced
    36854191
    3686 Substitution References
    3687 -----------------------
     41926.3.1 Substitution References
     4193-----------------------------
    36884194
    36894195A "substitution reference" substitutes the value of a variable with
     
    37174223
    37184224For example:
    3719      
     4225
    37204226     foo := a.o b.o c.o
    37214227     bar := $(foo:%.o=%.c)
     
    37264232File: make.info,  Node: Computed Names,  Prev: Substitution Refs,  Up: Advanced
    37274233
    3728 Computed Variable Names
    3729 -----------------------
     42346.3.2 Computed Variable Names
     4235-----------------------------
    37304236
    37314237Computed variable names are a complicated concept needed only for
     
    37984304     a_dirs := dira dirb
    37994305     1_dirs := dir1 dir2
    3800      
     4306
    38014307     a_files := filea fileb
    38024308     1_files := file1 file2
    3803      
     4309
    38044310     ifeq "$(use_a)" "yes"
    38054311     a1 := a
     
    38074313     a1 := 1
    38084314     endif
    3809      
     4315
    38104316     ifeq "$(use_dirs)" "yes"
    38114317     df := dirs
     
    38134319     df := files
    38144320     endif
    3815      
     4321
    38164322     dirs := $($(a1)_$(df))
    38174323
     
    38234329     a_objects := a.o b.o c.o
    38244330     1_objects := 1.o 2.o 3.o
    3825      
     4331
    38264332     sources := $($(a1)_objects:.o=.c)
    38274333
     
    38394345     func := strip
    38404346     endif
    3841      
     4347
    38424348     bar := a d b g q c
    3843      
     4349
    38444350     foo := $($(func) $(bar))
    38454351
     
    38694375File: make.info,  Node: Values,  Next: Setting,  Prev: Advanced,  Up: Using Variables
    38704376
    3871 How Variables Get Their Values
    3872 ==============================
     43776.4 How Variables Get Their Values
     4378==================================
    38734379
    38744380Variables can get values in several different ways:
     
    38944400File: make.info,  Node: Setting,  Next: Appending,  Prev: Values,  Up: Using Variables
    38954401
    3896 Setting Variables
    3897 =================
     44026.5 Setting Variables
     4403=====================
    38984404
    38994405To set a variable from the makefile, write a line starting with the
     
    39474453File: make.info,  Node: Appending,  Next: Override Directive,  Prev: Setting,  Up: Using Variables
    39484454
    3949 Appending More Text to Variables
    3950 ================================
     44556.6 Appending More Text to Variables
     4456====================================
    39514457
    39524458Often it is useful to add more text to the value of a variable already
     
    39834489it a simply-expanded variable, `+=' adds to that simply-expanded
    39844490definition, and expands the new text before appending it to the old
    3985 value just as `:=' does (*note Setting Variables: Setting., for a full
    3986 explanation of `:=').  In fact,
     4491value just as `:=' does (see *Note Setting Variables: Setting, for a
     4492full explanation of `:=').  In fact,
    39874493
    39884494     variable := value
     
    39904496
    39914497is exactly equivalent to:
     4498
    39924499
    39934500     variable := value
     
    40224529The first line defines the `CFLAGS' variable with a reference to another
    40234530variable, `includes'.  (`CFLAGS' is used by the rules for C
    4024 compilation; *note Catalogue of Implicit Rules: Catalogue of Rules..)
     4531compilation; *note Catalogue of Implicit Rules: Catalogue of Rules.)
    40254532Using `=' for the definition makes `CFLAGS' a recursively-expanded
    40264533variable, meaning `$(includes) -O' is _not_ expanded when `make'
     
    40444551File: make.info,  Node: Override Directive,  Next: Defining,  Prev: Appending,  Up: Using Variables
    40454552
    4046 The `override' Directive
    4047 ========================
     45536.7 The `override' Directive
     4554============================
    40484555
    40494556If a variable has been set with a command argument (*note Overriding
     
    40884595File: make.info,  Node: Defining,  Next: Environment,  Prev: Override Directive,  Up: Using Variables
    40894596
    4090 Defining Variables Verbatim
    4091 ===========================
     45976.8 Defining Variables Verbatim
     4598===============================
    40924599
    40934600Another way to set the value of a variable is to use the `define'
     
    41474654File: make.info,  Node: Environment,  Next: Target-specific,  Prev: Defining,  Up: Using Variables
    41484655
    4149 Variables from the Environment
    4150 ==============================
     46566.9 Variables from the Environment
     4657==================================
    41514658
    41524659Variables in `make' can come from the environment in which `make' is
    41534660run.  Every environment variable that `make' sees when it starts up is
    4154 transformed into a `make' variable with the same name and value.  But
    4155 an explicit assignment in the makefile, or with a command argument,
    4156 overrides the environment.  (If the `-e' flag is specified, then values
    4157 from the environment override assignments in the makefile.  *Note
    4158 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
    41594666practice.)
    41604667
     
    41634670you prefer.  This is safe for variables with standard or conventional
    41644671meanings because you know that no makefile will use them for other
    4165 things.  (But this is not totally reliable; some makefiles set `CFLAGS'
    4166 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
    41674674environment.)
    41684675
    4169    When `make' is invoked recursively, variables defined in the outer
    4170 invocation can be passed to inner invocations through the environment
    4171 (*note Recursive Use of `make': Recursion.).  By default, only
    4172 variables that came from the environment or the command line are passed
    4173 to recursive invocations.  You can use the `export' directive to pass
    4174 other variables.  *Note Communicating Variables to a Sub-`make':
    4175 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.
    41764683
    41774684   Other use of variables from the environment is not recommended.  It
     
    41844691which is normally present in the environment to specify the user's
    41854692choice of interactive shell.  It would be very undesirable for this
    4186 choice to affect `make'.  So `make' ignores the environment value of
    4187 `SHELL' (except on MS-DOS and MS-Windows, where `SHELL' is usually not
    4188 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::.
    41894695
    41904696
    41914697File: make.info,  Node: Target-specific,  Next: Pattern-specific,  Prev: Environment,  Up: Using Variables
    41924698
    4193 Target-specific Variable Values
    4194 ===============================
     46996.10 Target-specific Variable Values
     4700====================================
    41954701
    41964702Variable values in `make' are usually global; that is, they are the
     
    42614767File: make.info,  Node: Pattern-specific,  Prev: Target-specific,  Up: Using Variables
    42624768
    4263 Pattern-specific Variable Values
    4264 ================================
     47696.11 Pattern-specific Variable Values
     4770=====================================
    42654771
    42664772In addition to target-specific variable values (*note Target-specific
     
    42994805File: make.info,  Node: Conditionals,  Next: Functions,  Prev: Using Variables,  Up: Top
    43004806
    4301 Conditional Parts of Makefiles
    4302 ******************************
     48077 Conditional Parts of Makefiles
     4808********************************
    43034809
    43044810A "conditional" causes part of a makefile to be obeyed or ignored
     
    43184824File: make.info,  Node: Conditional Example,  Next: Conditional Syntax,  Prev: Conditionals,  Up: Conditionals
    43194825
    4320 Example of a Conditional
    4321 ========================
     48267.1 Example of a Conditional
     4827============================
    43224828
    43234829The following example of a conditional tells `make' to use one set of
     
    43304836     libs_for_gcc = -lgnu
    43314837     normal_libs =
    4332      
     4838
    43334839     foo: $(objects)
    43344840     ifeq ($(CC),gcc)
     
    43804886     libs_for_gcc = -lgnu
    43814887     normal_libs =
    4382      
     4888
    43834889     ifeq ($(CC),gcc)
    43844890       libs=$(libs_for_gcc)
     
    43864892       libs=$(normal_libs)
    43874893     endif
    4388      
     4894
    43894895     foo: $(objects)
    43904896             $(CC) -o foo $(objects) $(libs)
     
    43934899File: make.info,  Node: Conditional Syntax,  Next: Testing Flags,  Prev: Conditional Example,  Up: Conditionals
    43944900
    4395 Syntax of Conditionals
    4396 ======================
     49017.2 Syntax of Conditionals
     4902==========================
    43974903
    43984904The syntax of a simple conditional with no `else' is as follows:
     
    44144920     endif
    44154921
    4416 If the condition is true, TEXT-IF-TRUE is used; otherwise,
    4417 TEXT-IF-FALSE is used instead.  The TEXT-IF-FALSE can be any number of
    4418 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.
    44194937
    44204938   The syntax of the CONDITIONAL-DIRECTIVE is the same whether the
    4421 conditional is simple or complex.  There are four different directives
    4422 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:
    44234942
    44244943`ifeq (ARG1, ARG2)'
     
    44564975
    44574976`ifdef VARIABLE-NAME'
    4458      If the variable VARIABLE-NAME has a non-empty value, the
    4459      TEXT-IF-TRUE is effective; otherwise, the TEXT-IF-FALSE, if any,
    4460      is effective.  Variables that have never been defined have an
    4461      empty value.  The variable VARIABLE-NAME is itself expanded, so it
    4462      could be a variable or function that expands to the name of a
    4463      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.
    44644995
    44654996     Note that `ifdef' only tests whether a variable has a value.  It
     
    44915022     If the variable VARIABLE-NAME has an empty value, the TEXT-IF-TRUE
    44925023     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.
    44935026
    44945027   Extra spaces are allowed and ignored at the beginning of the
     
    45255058File: make.info,  Node: Testing Flags,  Prev: Conditional Syntax,  Up: Conditionals
    45265059
    4527 Conditionals that Test Flags
    4528 ============================
     50607.3 Conditionals that Test Flags
     5061================================
    45295062
    45305063You can write a conditional that tests `make' command flags such as
     
    45565089File: make.info,  Node: Functions,  Next: Running,  Prev: Conditionals,  Up: Top
    45575090
    4558 Functions for Transforming Text
    4559 *******************************
     50918 Functions for Transforming Text
     5092*********************************
    45605093
    45615094"Functions" allow you to do text processing in the makefile to compute
     
    45715104* Text Functions::              General-purpose text manipulation functions.
    45725105* File Name Functions::         Functions for manipulating file names.
     5106* Conditional Functions::       Functions that implement conditions.
    45735107* Foreach Function::            Repeat some text with controlled variation.
    4574 * If Function::                 Conditionally expand a value.
    45755108* Call Function::               Expand a user-defined function.
    45765109* Value Function::              Return the un-expanded value of a variable.
    45775110* Eval Function::               Evaluate the arguments as makefile syntax.
    45785111* Origin Function::             Find where a variable got its value.
     5112* Flavor Function::             Find out the flavor of a variable.
    45795113* Shell Function::              Substitute the output of a shell command.
    45805114* Make Control Functions::      Functions that control how make runs.
     
    45835117File: make.info,  Node: Syntax of Functions,  Next: Text Functions,  Prev: Functions,  Up: Functions
    45845118
    4585 Function Call Syntax
    4586 ====================
     51198.1 Function Call Syntax
     5120========================
    45875121
    45885122A function call resembles a variable reference.  It looks like this:
     
    46375171File: make.info,  Node: Text Functions,  Next: File Name Functions,  Prev: Syntax of Functions,  Up: Functions
    46385172
    4639 Functions for String Substitution and Analysis
    4640 ==============================================
     51738.2 Functions for String Substitution and Analysis
     5174==================================================
    46415175
    46425176Here are some functions that operate on strings:
     
    48035337`$(wordlist S,E,TEXT)'
    48045338     Returns the list of words in TEXT starting with word S and ending
    4805      with word E (inclusive).  The legitimate values of S and E start
    4806      from 1.  If S is bigger than the number of words in TEXT, the
    4807      value is empty.  If E is bigger than the number of words in TEXT,
    4808      words up to the end of TEXT are returned.  If S is greater than E,
    4809      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,
    48105344
    48115345          $(wordlist 2, 3, foo bar baz)
     
    48295363     same as `$(word 1,TEXT)', the `firstword' function is retained for
    48305364     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.
    48315377
    48325378   Here is a realistic example of the use of `subst' and `patsubst'.
     
    48575403
    48585404
    4859 File: make.info,  Node: File Name Functions,  Next: Foreach Function,  Prev: Text Functions,  Up: Functions
    4860 
    4861 Functions for File Names
    4862 ========================
     5405File: make.info,  Node: File Name Functions,  Next: Conditional Functions,  Prev: Text Functions,  Up: Functions
     5406
     54078.3 Functions for File Names
     5408============================
    48635409
    48645410Several of the built-in expansion functions relate specifically to
     
    49695515     File Names: Wildcards.
    49705516
    4971 
    4972 File: make.info,  Node: Foreach Function,  Next: If Function,  Prev: File Name Functions,  Up: Functions
    4973 
    4974 The `foreach' Function
    4975 ======================
     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==========================
    49765590
    49775591The `foreach' function is very different from other functions.  It
     
    50455659
    50465660
    5047 File: make.info,  Node: If Function,  Next: Call Function,  Prev: Foreach Function,  Up: Functions
    5048 
    5049 The `if' Function
    5050 =================
    5051 
    5052 The `if' function provides support for conditional expansion in a
    5053 functional context (as opposed to the GNU `make' makefile conditionals
    5054 such as `ifeq' (*note Syntax of Conditionals: Conditional Syntax.).
    5055 
    5056    An `if' function call can contain either two or three arguments:
    5057 
    5058      $(if CONDITION,THEN-PART[,ELSE-PART])
    5059 
    5060    The first argument, CONDITION, first has all preceding and trailing
    5061 whitespace stripped, then is expanded.  If it expands to any non-empty
    5062 string, then the condition is considered to be true.  If it expands to
    5063 an empty string, the condition is considered to be false.
    5064 
    5065    If the condition is true then the second argument, THEN-PART, is
    5066 evaluated and this is used as the result of the evaluation of the entire
    5067 `if' function.
    5068 
    5069    If the condition is false then the third argument, ELSE-PART, is
    5070 evaluated and this is the result of the `if' function.  If there is no
    5071 third argument, the `if' function evaluates to nothing (the empty
    5072 string).
    5073 
    5074    Note that only one of the THEN-PART or the ELSE-PART will be
    5075 evaluated, never both.  Thus, either can contain side-effects (such as
    5076 `shell' function calls, etc.)
    5077 
    5078 
    5079 File: make.info,  Node: Call Function,  Next: Value Function,  Prev: If Function,  Up: Functions
    5080 
    5081 The `call' Function
    5082 ===================
     5661File: make.info,  Node: Call Function,  Next: Value Function,  Prev: Foreach Function,  Up: Functions
     5662
     56638.6 The `call' Function
     5664=======================
    50835665
    50845666The `call' function is unique in that it can be used to create new
     
    51195701
    51205702     reverse = $(2) $(1)
    5121      
     5703
    51225704     foo = $(call reverse,a,b)
    51235705
     
    51285710
    51295711     pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
    5130      
     5712
    51315713     LS := $(call pathsearch,ls)
    51325714
     
    51565738File: make.info,  Node: Value Function,  Next: Eval Function,  Prev: Call Function,  Up: Functions
    51575739
    5158 The `value' Function
    5159 ====================
     57408.7 The `value' Function
     5741========================
    51605742
    51615743The `value' function provides a way for you to use the value of a
     
    51805762
    51815763     FOO = $PATH
    5182      
     5764
    51835765     all:
    51845766             @echo $(FOO)
     
    51965778File: make.info,  Node: Eval Function,  Next: Origin Function,  Prev: Value Function,  Up: Functions
    51975779
    5198 The `eval' Function
    5199 ===================
     57808.8 The `eval' Function
     5781=======================
    52005782
    52015783The `eval' function is very special: it allows you to define new
     
    52285810
    52295811     PROGRAMS    = server client
    5230      
     5812
    52315813     server_OBJS = server.o server_priv.o server_access.o
    52325814     server_LIBS = priv protocol
    5233      
     5815
    52345816     client_OBJS = client.o client_api.o client_mem.o
    52355817     client_LIBS = protocol
    5236      
     5818
    52375819     # Everything after this is generic
    5238      
     5820
    52395821     .PHONY: all
    52405822     all: $(PROGRAMS)
    5241      
     5823
    52425824     define PROGRAM_template
    52435825      $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%)
    52445826      ALL_OBJS   += $$($(1)_OBJS)
    52455827     endef
    5246      
     5828
    52475829     $(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
    5248      
     5830
    52495831     $(PROGRAMS):
    52505832             $(LINK.o) $^ $(LDLIBS) -o $@
    5251      
     5833
    52525834     clean:
    52535835             rm -f $(ALL_OBJS) $(PROGRAMS)
    52545836
    52555837
    5256 File: make.info,  Node: Origin Function,  Next: Shell Function,  Prev: Eval Function,  Up: Functions
    5257 
    5258 The `origin' Function
    5259 =====================
     5838File: make.info,  Node: Origin Function,  Next: Flavor Function,  Prev: Eval Function,  Up: Functions
     5839
     58408.9 The `origin' Function
     5841=========================
    52605842
    52615843The `origin' function is unlike most other functions in that it does
     
    53405922
    53415923
    5342 File: make.info,  Node: Shell Function,  Next: Make Control Functions,  Prev: Origin Function,  Up: Functions
    5343 
    5344 The `shell' Function
    5345 ====================
     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=========================
    53465961
    53475962The `shell' function is unlike any other function other than the
     
    53745989
    53755990sets `files' to the expansion of `*.c'.  Unless `make' is using a very
    5376 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).
    53775993
    53785994
    53795995File: make.info,  Node: Make Control Functions,  Prev: Shell Function,  Up: Functions
    53805996
    5381 Functions That Control Make
    5382 ===========================
     59978.12 Functions That Control Make
     5998================================
    53835999
    53846000These functions control the way make runs.  Generally, they are used to
     
    54036019
    54046020          ERR = $(error found an error!)
    5405          
     6021
    54066022          .PHONY: err
    54076023          err: ; $(ERR)
     
    54186034     The result of the expansion of this function is the empty string.
    54196035
     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
    54206042
    54216043File: make.info,  Node: Running,  Next: Implicit Rules,  Prev: Functions,  Up: Top
    54226044
    5423 How to Run `make'
    5424 *****************
     60459 How to Run `make'
     6046*******************
    54256047
    54266048A makefile that says how to recompile a program can be used in more
     
    54686090File: make.info,  Node: Makefile Arguments,  Next: Goals,  Prev: Running,  Up: Running
    54696091
    5470 Arguments to Specify the Makefile
    5471 =================================
     60929.1 Arguments to Specify the Makefile
     6093=====================================
    54726094
    54736095The way to specify the name of the makefile is with the `-f' or
     
    54866108File: make.info,  Node: Goals,  Next: Instead of Execution,  Prev: Makefile Arguments,  Up: Running
    54876109
    5488 Arguments to Specify the Goals
    5489 ==============================
     61109.2 Arguments to Specify the Goals
     6111==================================
    54906112
    54916113The "goals" are the targets that `make' should strive ultimately to
     
    54986120program or programs they describe.  If the first rule in the makefile
    54996121has several targets, only the first target in the rule becomes the
    5500 default goal, not the whole list.
    5501 
    5502    You can specify a different goal or goals with arguments to `make'.
    5503 Use the name of the goal as an argument.  If you specify several goals,
    5504 `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.
    55056130
    55066131   Any target in the makefile may be specified as a goal (unless it
     
    55206145
    55216146     sources = foo.c bar.c
    5522      
     6147
    55236148     ifneq ($(MAKECMDGOALS),clean)
    55246149     include $(sources:.c=.d)
     
    56006225File: make.info,  Node: Instead of Execution,  Next: Avoiding Compilation,  Prev: Goals,  Up: Running
    56016226
    5602 Instead of Executing the Commands
    5603 =================================
     62279.3 Instead of Executing the Commands
     6228=====================================
    56046229
    56056230The makefile tells `make' how to tell whether a target is up to date,
     
    56796304File: make.info,  Node: Avoiding Compilation,  Next: Overriding,  Prev: Instead of Execution,  Up: Running
    56806305
    5681 Avoiding Recompilation of Some Files
    5682 ====================================
     63069.4 Avoiding Recompilation of Some Files
     6307========================================
    56836308
    56846309Sometimes you may have changed a source file but you do not want to
     
    57226347File: make.info,  Node: Overriding,  Next: Testing,  Prev: Avoiding Compilation,  Up: Running
    57236348
    5724 Overriding Variables
    5725 ====================
     63499.5 Overriding Variables
     6350========================
    57266351
    57276352An argument that contains `=' specifies the value of a variable: `V=X'
     
    57746399File: make.info,  Node: Testing,  Next: Options Summary,  Prev: Overriding,  Up: Running
    57756400
    5776 Testing the Compilation of a Program
    5777 ====================================
     64019.6 Testing the Compilation of a Program
     6402========================================
    57786403
    57796404Normally, when an error happens in executing a shell command, `make'
     
    58106435File: make.info,  Node: Options Summary,  Prev: Testing,  Up: Running
    58116436
    5812 Summary of Options
    5813 ==================
     64379.7 Summary of Options
     6438======================
    58146439
    58156440Here is a table of all the options `make' understands:
     
    58246449     Consider all targets out-of-date.  GNU `make' proceeds to consider
    58256450     targets and their prerequisites using the normal algorithms;
    5826      however, all these targets are remade, regardless of the status of
    5827      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.).
    58286457
    58296458`-C DIR'
     
    59306559     floating-point number).  With no argument, removes a previous load
    59316560     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.
    59326570
    59336571`-n'
     
    60526690File: make.info,  Node: Implicit Rules,  Next: Archives,  Prev: Running,  Up: Top
    60536691
    6054 Using Implicit Rules
    6055 ********************
     669210 Using Implicit Rules
     6693***********************
    60566694
    60576695Certain standard ways of remaking target files are used very often.  For
     
    60906728* Chained Rules::               How to use a chain of implicit rules.
    60916729* Pattern Rules::               How to define new implicit rules.
    6092 * Last Resort::                 How to defining commands for rules
    6093                                   which cannot find any.
     6730* Last Resort::                 How to define commands for rules which
     6731                                  cannot find any.
    60946732* Suffix Rules::                The old-fashioned style of implicit rule.
    60956733* Implicit Rule Search::        The precise algorithm for applying
     
    60996737File: make.info,  Node: Using Implicit,  Next: Catalogue of Rules,  Prev: Implicit Rules,  Up: Implicit Rules
    61006738
    6101 Using Implicit Rules
    6102 ====================
     673910.1 Using Implicit Rules
     6740=========================
    61036741
    61046742To allow `make' to find a customary method for updating a target file,
     
    61736811File: make.info,  Node: Catalogue of Rules,  Next: Implicit Variables,  Prev: Using Implicit,  Up: Implicit Rules
    61746812
    6175 Catalogue of Implicit Rules
    6176 ===========================
     681310.2 Catalogue of Implicit Rules
     6814================================
    61776815
    61786816Here is a catalogue of predefined implicit rules which are always
     
    61826820`--no-builtin-rules' option cancels all predefined rules.
    61836821
     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
    61846828   Not all of these rules will always be defined, even when the `-r'
    61856829option is not given.  Many of the predefined implicit rules are
     
    61876831depends on the "suffix list" (the list of prerequisites of the special
    61886832target `.SUFFIXES').  The default suffix list is: `.out', `.a', `.ln',
    6189 `.o', `.c', `.cc', `.C', `.p', `.f', `.F', `.r', `.y', `.l', `.s',
    6190 `.S', `.mod', `.sym', `.def', `.h', `.info', `.dvi', `.tex', `.texinfo',
    6191 `.texi', `.txinfo', `.w', `.ch' `.web', `.sh', `.elc', `.el'.  All of
    6192 the implicit rules described below whose prerequisites have one of
    6193 these suffixes are actually suffix rules.  If you modify the suffix
    6194 list, the only predefined suffix rules in effect will be those named by
    6195 one or two of the suffixes that are on the list you specify; rules
    6196 whose suffixes fail to be on the list are disabled.  *Note
    6197 Old-Fashioned Suffix Rules: Suffix Rules, for full details on suffix
    6198 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.
    61996843
    62006844Compiling C programs
     
    62036847
    62046848Compiling C++ programs
    6205      `N.o' is made automatically from `N.cc' or `N.C' with a command of
    6206      the form `$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)'.  We encourage you to
    6207      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'.
    62086853
    62096854Compiling Pascal programs
     
    63797024File: make.info,  Node: Implicit Variables,  Next: Chained Rules,  Prev: Catalogue of Rules,  Up: Implicit Rules
    63807025
    6381 Variables Used by Implicit Rules
    6382 ================================
     702610.3 Variables Used by Implicit Rules
     7027=====================================
    63837028
    63847029The commands in built-in implicit rules make liberal use of certain
    6385 predefined variables.  You can alter these variables in the makefile,
    6386 with arguments to `make', or in the environment to alter how the
    6387 implicit rules work without redefining the rules themselves.  You can
    6388 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
    63897034`--no-builtin-variables' option.
    63907035
     
    64067051argument, separate them with spaces.
    64077052
    6408    Here is a table of variables used as names of programs in built-in
    6409 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.
    64107062
    64117063`AR'
    6412      Archive-maintaining program; default `ar'.
     7064     Archive-maintaining program; default `ar'. 
    64137065
    64147066`AS'
    6415      Program for doing assembly; default `as'.
     7067     Program for compiling assembly files; default `as'. 
    64167068
    64177069`CC'
    6418      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'. 
    64197074
    64207075`CXX'
    6421      Program for compiling C++ programs; default `g++'.
     7076     Program for compiling C++ programs; default `g++'. 
    64227077
    64237078`CO'
    6424      Program for extracting a file from RCS; default `co'.
     7079     Program for extracting a file from RCS; default `co'. 
    64257080
    64267081`CPP'
     
    64307085`FC'
    64317086     Program for compiling or preprocessing Fortran and Ratfor programs;
    6432      default `f77'.
     7087     default `f77'. 
    64337088
    64347089`GET'
    6435      Program for extracting a file from SCCS; default `get'.
     7090     Program for extracting a file from SCCS; default `get'. 
    64367091
    64377092`LEX'
    6438      Program to use to turn Lex grammars into C programs or Ratfor
    6439      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'. 
    64407105
    64417106`PC'
    6442      Program for compiling Pascal programs; default `pc'.
    6443 
    6444 `YACC'
    6445      Program to use to turn Yacc grammars into C programs; default
    6446      `yacc'.
    6447 
    6448 `YACCR'
    6449      Program to use to turn Yacc grammars into Ratfor programs; default
    6450      `yacc -r'.
     7107     Program for compiling Pascal programs; default `pc'. 
    64517108
    64527109`MAKEINFO'
    64537110     Program to convert a Texinfo source file into an Info file; default
    6454      `makeinfo'.
     7111     `makeinfo'. 
    64557112
    64567113`TEX'
    6457      Program to make TeX DVI files from TeX source; default `tex'.
     7114     Program to make TeX DVI files from TeX source; default `tex'. 
    64587115
    64597116`TEXI2DVI'
    64607117     Program to make TeX DVI files from Texinfo source; default
    6461      `texi2dvi'.
     7118     `texi2dvi'. 
    64627119
    64637120`WEAVE'
    6464      Program to translate Web into TeX; default `weave'.
     7121     Program to translate Web into TeX; default `weave'. 
    64657122
    64667123`CWEAVE'
    6467      Program to translate C Web into TeX; default `cweave'.
     7124     Program to translate C Web into TeX; default `cweave'. 
    64687125
    64697126`TANGLE'
    6470      Program to translate Web into Pascal; default `tangle'.
     7127     Program to translate Web into Pascal; default `tangle'. 
    64717128
    64727129`CTANGLE'
    6473      Program to translate C Web into C; default `ctangle'.
     7130     Program to translate C Web into C; default `ctangle'. 
    64747131
    64757132`RM'
    6476      Command to remove a file; default `rm -f'.
     7133     Command to remove a file; default `rm -f'. 
    64777134
    64787135   Here is a table of variables whose values are additional arguments
     
    65137170     Extra flags to give to Lex.
    65147171
     7172`YFLAGS'
     7173     Extra flags to give to Yacc.
     7174
    65157175`PFLAGS'
    65167176     Extra flags to give to the Pascal compiler.
     
    65197179     Extra flags to give to the Fortran compiler for Ratfor programs.
    65207180
    6521 `YFLAGS'
    6522      Extra flags to give to Yacc.
     7181`LINTFLAGS'
     7182     Extra flags to give to lint.
    65237183
    65247184
    65257185File: make.info,  Node: Chained Rules,  Next: Pattern Rules,  Prev: Implicit Variables,  Up: Implicit Rules
    65267186
    6527 Chains of Implicit Rules
    6528 ========================
     718710.4 Chains of Implicit Rules
     7188=============================
    65297189
    65307190Sometimes a file can be made by a sequence of implicit rules.  For
     
    65787238as a prerequisite of the special target `.PRECIOUS' to preserve
    65797239intermediate files made by implicit rules whose target patterns match
    6580 that file's name; see *Note Interrupts::.
     7240that file's name; see *Note Interrupts::. 
    65817241
    65827242   A chain can involve more than two implicit rules.  For example, it is
     
    66007260earlier in the ordering of rules.
    66017261
    6602 
    6603 File: make.info,  Node: Pattern Rules,  Next: Last Resort,  Prev: Chained Rules,  Up: Implicit Rules
    6604 
    6605 Defining and Redefining Pattern Rules
    6606 =====================================
    6607 
    6608 You define an implicit rule by writing a "pattern rule".  A pattern
    6609 rule looks like an ordinary rule, except that its target contains the
    6610 character `%' (exactly one of them).  The target is considered a
    6611 pattern for matching file names; the `%' can match any nonempty
    6612 substring, while other characters match only themselves.  The
    6613 prerequisites likewise use `%' to show how their names relate to the
    6614 target name.
    6615 
    6616    Thus, a pattern rule `%.o : %.c' says how to make any file `STEM.o'
    6617 from another file `STEM.c'.
    6618 
    6619    Note that expansion using `%' in pattern rules occurs *after* any
    6620 variable or function expansions, which take place when the makefile is
    6621 read.  *Note How to Use Variables: Using Variables, and *Note Functions
    6622 for Transforming Text: Functions.
    6623 
    6624 * Menu:
    6625 
    6626 * Pattern Intro::               An introduction to pattern rules.
    6627 * Pattern Examples::            Examples of pattern rules.
    6628 * Automatic Variables::         How to use automatic variables in the
    6629                                   commands of implicit rules.
    6630 * Pattern Match::               How patterns match.
    6631 * Match-Anything Rules::        Precautions you should take prior to
    6632                                   defining rules that can match any
    6633                                   target file whatever.
    6634 * Canceling Rules::             How to override or cancel built-in rules.
    6635 
    6636 
    6637 File: make.info,  Node: Pattern Intro,  Next: Pattern Examples,  Prev: Pattern Rules,  Up: Pattern Rules
    6638 
    6639 Introduction to Pattern Rules
    6640 -----------------------------
    6641 
    6642 A pattern rule contains the character `%' (exactly one of them) in the
    6643 target; otherwise, it looks exactly like an ordinary rule.  The target
    6644 is a pattern for matching file names; the `%' matches any nonempty
    6645 substring, while other characters match only themselves.
    6646 
    6647    For example, `%.c' as a pattern matches any file name that ends in
    6648 `.c'.  `s.%.c' as a pattern matches any file name that starts with
    6649 `s.', ends in `.c' and is at least five characters long.  (There must
    6650 be at least one character to match the `%'.)  The substring that the
    6651 `%' matches is called the "stem".
    6652 
    6653    `%' in a prerequisite of a pattern rule stands for the same stem
    6654 that was matched by the `%' in the target.  In order for the pattern
    6655 rule to apply, its target pattern must match the file name under
    6656 consideration, and its prerequisite patterns must name files that exist
    6657 or can be made.  These files become prerequisites of the target.
    6658 
    6659    Thus, a rule of the form
    6660 
    6661      %.o : %.c ; COMMAND...
    6662 
    6663 specifies how to make a file `N.o', with another file `N.c' as its
    6664 prerequisite, provided that `N.c' exists or can be made.
    6665 
    6666    There may also be prerequisites that do not use `%'; such a
    6667 prerequisite attaches to every file made by this pattern rule.  These
    6668 unvarying prerequisites are useful occasionally.
    6669 
    6670    A pattern rule need not have any prerequisites that contain `%', or
    6671 in fact any prerequisites at all.  Such a rule is effectively a general
    6672 wildcard.  It provides a way to make any file that matches the target
    6673 pattern.  *Note Last Resort::.
    6674 
    6675    Pattern rules may have more than one target.  Unlike normal rules,
    6676 this does not act as many different rules with the same prerequisites
    6677 and commands.  If a pattern rule has multiple targets, `make' knows that
    6678 the rule's commands are responsible for making all of the targets.  The
    6679 commands are executed only once to make all the targets.  When searching
    6680 for a pattern rule to match a target, the target patterns of a rule
    6681 other than the one that matches the target in need of a rule are
    6682 incidental: `make' worries only about giving commands and prerequisites
    6683 to the file presently in question.  However, when this file's commands
    6684 are run, the other targets are marked as having been updated themselves.
    6685 
    6686    The order in which pattern rules appear in the makefile is important
    6687 since this is the order in which they are considered.  Of equally
    6688 applicable rules, only the first one found is used.  The rules you
    6689 write take precedence over those that are built in.  Note however, that
    6690 a rule whose prerequisites actually exist or are mentioned always takes
    6691 priority over a rule with prerequisites that must be made by chaining
    6692 other implicit rules.
    6693 
    6694 
    6695 File: make.info,  Node: Pattern Examples,  Next: Automatic Variables,  Prev: Pattern Intro,  Up: Pattern Rules
    6696 
    6697 Pattern Rule Examples
    6698 ---------------------
    6699 
    6700 Here are some examples of pattern rules actually predefined in `make'.
    6701 First, the rule that compiles `.c' files into `.o' files:
    6702 
    6703      %.o : %.c
    6704              $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
    6705 
    6706 defines a rule that can make any file `X.o' from `X.c'.  The command
    6707 uses the automatic variables `$@' and `$<' to substitute the names of
    6708 the target file and the source file in each case where the rule applies
    6709 (*note Automatic Variables::).
    6710 
    6711    Here is a second built-in rule:
    6712 
    6713      % :: RCS/%,v
    6714              $(CO) $(COFLAGS) $<
    6715 
    6716 defines a rule that can make any file `X' whatsoever from a
    6717 corresponding file `X,v' in the subdirectory `RCS'.  Since the target
    6718 is `%', this rule will apply to any file whatever, provided the
    6719 appropriate prerequisite file exists.  The double colon makes the rule
    6720 "terminal", which means that its prerequisite may not be an intermediate
    6721 file (*note Match-Anything Pattern Rules: Match-Anything Rules.).
    6722 
    6723    This pattern rule has two targets:
    6724 
    6725      %.tab.c %.tab.h: %.y
    6726              bison -d $<
    6727 
    6728 This tells `make' that the command `bison -d X.y' will make both
    6729 `X.tab.c' and `X.tab.h'.  If the file `foo' depends on the files
    6730 `parse.tab.o' and `scan.o' and the file `scan.o' depends on the file
    6731 `parse.tab.h', when `parse.y' is changed, the command `bison -d parse.y'
    6732 will be executed only once, and the prerequisites of both `parse.tab.o'
    6733 and `scan.o' will be satisfied.  (Presumably the file `parse.tab.o'
    6734 will be recompiled from `parse.tab.c' and the file `scan.o' from
    6735 `scan.c', while `foo' is linked from `parse.tab.o', `scan.o', and its
    6736 other prerequisites, and it will execute happily ever after.)
    6737 
    6738 
    6739 File: make.info,  Node: Automatic Variables,  Next: Pattern Match,  Prev: Pattern Examples,  Up: Pattern Rules
    6740 
    6741 Automatic Variables
    6742 -------------------
    6743 
    6744 Suppose you are writing a pattern rule to compile a `.c' file into a
    6745 `.o' file: how do you write the `cc' command so that it operates on the
    6746 right source file name?  You cannot write the name in the command,
    6747 because the name is different each time the implicit rule is applied.
    6748 
    6749    What you do is use a special feature of `make', the "automatic
    6750 variables".  These variables have values computed afresh for each rule
    6751 that is executed, based on the target and prerequisites of the rule.
    6752 In this example, you would use `$@' for the object file name and `$<'
    6753 for the source file name.
    6754 
    6755    It's very important that you recognize the limited scope in which
    6756 automatic variable values are available: they only have values within
    6757 the command script.  In particular, you cannot use them anywhere within
    6758 the target or prerequisite lists of a rule; they have no value there
    6759 and will expand to the empty string.  A common mistake is attempting to
    6760 use `$@' within the prerequisites list in a rule; this will not work.
    6761 However, see below for information on the SysV-style `$$@' variables.
    6762 
    6763    Here is a table of automatic variables:
    6764 
    6765 `$@'
    6766      The file name of the target of the rule.  If the target is an
    6767      archive member, then `$@' is the name of the archive file.  In a
    6768      pattern rule that has multiple targets (*note Introduction to
    6769      Pattern Rules: Pattern Intro.), `$@' is the name of whichever
    6770      target caused the rule's commands to be run.
    6771 
    6772 `$%'
    6773      The target member name, when the target is an archive member.
    6774      *Note Archives::.  For example, if the target is `foo.a(bar.o)'
    6775      then `$%' is `bar.o' and `$@' is `foo.a'.  `$%' is empty when the
    6776      target is not an archive member.
    6777 
    6778 `$<'
    6779      The name of the first prerequisite.  If the target got its
    6780      commands from an implicit rule, this will be the first
    6781      prerequisite added by the implicit rule (*note Implicit Rules::).
    6782 
    6783 `$?'
    6784      The names of all the prerequisites that are newer than the target,
    6785      with spaces between them.  For prerequisites which are archive
    6786      members, only the member named is used (*note Archives::).
    6787 
    6788 `$^'
    6789      The names of all the prerequisites, with spaces between them.  For
    6790      prerequisites which are archive members, only the member named is
    6791      used (*note Archives::).  A target has only one prerequisite on
    6792      each other file it depends on, no matter how many times each file
    6793      is listed as a prerequisite.  So if you list a prerequisite more
    6794      than once for a target, the value of `$^' contains just one copy
    6795      of the name.
    6796 
    6797 `$+'
    6798      This is like `$^', but prerequisites listed more than once are
    6799      duplicated in the order they were listed in the makefile.  This is
    6800      primarily useful for use in linking commands where it is
    6801      meaningful to repeat library file names in a particular order.
    6802 
    6803 `$*'
    6804      The stem with which an implicit rule matches (*note How Patterns
    6805      Match: Pattern Match.).  If the target is `dir/a.foo.b' and the
    6806      target pattern is `a.%.b' then the stem is `dir/foo'.  The stem is
    6807      useful for constructing names of related files.
    6808 
    6809      In a static pattern rule, the stem is part of the file name that
    6810      matched the `%' in the target pattern.
    6811 
    6812      In an explicit rule, there is no stem; so `$*' cannot be determined
    6813      in that way.  Instead, if the target name ends with a recognized
    6814      suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is
    6815      set to the target name minus the suffix.  For example, if the
    6816      target name is `foo.c', then `$*' is set to `foo', since `.c' is a
    6817      suffix.  GNU `make' does this bizarre thing only for compatibility
    6818      with other implementations of `make'.  You should generally avoid
    6819      using `$*' except in implicit rules or static pattern rules.
    6820 
    6821      If the target name in an explicit rule does not end with a
    6822      recognized suffix, `$*' is set to the empty string for that rule.
    6823 
    6824    `$?' is useful even in explicit rules when you wish to operate on
    6825 only the prerequisites that have changed.  For example, suppose that an
    6826 archive named `lib' is supposed to contain copies of several object
    6827 files.  This rule copies just the changed object files into the archive:
    6828 
    6829      lib: foo.o bar.o lose.o win.o
    6830              ar r lib $?
    6831 
    6832    Of the variables listed above, four have values that are single file
    6833 names, and three have values that are lists of file names.  These seven
    6834 have variants that get just the file's directory name or just the file
    6835 name within the directory.  The variant variables' names are formed by
    6836 appending `D' or `F', respectively.  These variants are semi-obsolete
    6837 in GNU `make' since the functions `dir' and `notdir' can be used to get
    6838 a similar effect (*note Functions for File Names: File Name
    6839 Functions.).  Note, however, that the `D' variants all omit the
    6840 trailing slash which always appears in the output of the `dir'
    6841 function.  Here is a table of the variants:
    6842 
    6843 `$(@D)'
    6844      The directory part of the file name of the target, with the
    6845      trailing slash removed.  If the value of `$@' is `dir/foo.o' then
    6846      `$(@D)' is `dir'.  This value is `.' if `$@' does not contain a
    6847      slash.
    6848 
    6849 `$(@F)'
    6850      The file-within-directory part of the file name of the target.  If
    6851      the value of `$@' is `dir/foo.o' then `$(@F)' is `foo.o'.  `$(@F)'
    6852      is equivalent to `$(notdir $@)'.
    6853 
    6854 `$(*D)'
    6855 `$(*F)'
    6856      The directory part and the file-within-directory part of the stem;
    6857      `dir' and `foo' in this example.
    6858 
    6859 `$(%D)'
    6860 `$(%F)'
    6861      The directory part and the file-within-directory part of the target
    6862      archive member name.  This makes sense only for archive member
    6863      targets of the form `ARCHIVE(MEMBER)' and is useful only when
    6864      MEMBER may contain a directory name.  (*Note Archive Members as
    6865      Targets: Archive Members.)
    6866 
    6867 `$(<D)'
    6868 `$(<F)'
    6869      The directory part and the file-within-directory part of the first
    6870      prerequisite.
    6871 
    6872 `$(^D)'
    6873 `$(^F)'
    6874      Lists of the directory parts and the file-within-directory parts
    6875      of all prerequisites.
    6876 
    6877 `$(+D)'
    6878 `$(+F)'
    6879      Lists of the directory parts and the file-within-directory parts
    6880      of all prerequisites, including multiple instances of duplicated
    6881      prerequisites.
    6882 
    6883 `$(?D)'
    6884 `$(?F)'
    6885      Lists of the directory parts and the file-within-directory parts of
    6886      all prerequisites that are newer than the target.
    6887 
    6888    Note that we use a special stylistic convention when we talk about
    6889 these automatic variables; we write "the value of `$<'", rather than
    6890 "the variable `<'" as we would write for ordinary variables such as
    6891 `objects' and `CFLAGS'.  We think this convention looks more natural in
    6892 this special case.  Please do not assume it has a deep significance;
    6893 `$<' refers to the variable named `<' just as `$(CFLAGS)' refers to the
    6894 variable named `CFLAGS'.  You could just as well use `$(<)' in place of
    6895 `$<'.
    6896 
    6897    GNU `make' provides support for the SysV `make' feature that allows
    6898 special variable references `$$@', `$$(@D)', and `$$(@F)' (note the
    6899 required double-"$"!) to appear with the _prerequisites list_ (normal
    6900 automatic variables are available only within a command script).  When
    6901 appearing in a prerequisites list, these variables are expanded to the
    6902 name of the target, the directory component of the target, and the file
    6903 component of the target, respectively.
    6904 
    6905    Note that these variables are available only within explicit and
    6906 static pattern (*note Static Pattern Rules: Static Pattern.) rules;
    6907 they have no special significance within implicit (suffix or pattern)
    6908 rules.  Also note that while SysV `make' actually expands its entire
    6909 prerequisite list _twice_, GNU `make' does not behave this way: instead
    6910 it simply expands these special variables without re-expanding any
    6911 other part of the prerequisites list.
    6912 
    6913    This somewhat bizarre feature is included only to provide some
    6914 compatibility with SysV makefiles.  In a native GNU `make' file there
    6915 are other ways to accomplish the same results.  This feature is
    6916 disabled if the special pseudo target `.POSIX' is defined.
    6917 
    6918 
    6919 File: make.info,  Node: Pattern Match,  Next: Match-Anything Rules,  Prev: Automatic Variables,  Up: Pattern Rules
    6920 
    6921 How Patterns Match
    6922 ------------------
    6923 
    6924 A target pattern is composed of a `%' between a prefix and a suffix,
    6925 either or both of which may be empty.  The pattern matches a file name
    6926 only if the file name starts with the prefix and ends with the suffix,
    6927 without overlap.  The text between the prefix and the suffix is called
    6928 the "stem".  Thus, when the pattern `%.o' matches the file name
    6929 `test.o', the stem is `test'.  The pattern rule prerequisites are
    6930 turned into actual file names by substituting the stem for the character
    6931 `%'.  Thus, if in the same example one of the prerequisites is written
    6932 as `%.c', it expands to `test.c'.
    6933 
    6934    When the target pattern does not contain a slash (and it usually does
    6935 not), directory names in the file names are removed from the file name
    6936 before it is compared with the target prefix and suffix.  After the
    6937 comparison of the file name to the target pattern, the directory names,
    6938 along with the slash that ends them, are added on to the prerequisite
    6939 file names generated from the pattern rule's prerequisite patterns and
    6940 the file name. The directories are ignored only for the purpose of
    6941 finding an implicit rule to use, not in the application of that rule.
    6942 Thus, `e%t' matches the file name `src/eat', with `src/a' as the stem.
    6943 When prerequisites are turned into file names, the directories from the
    6944 stem are added at the front, while the rest of the stem is substituted
    6945 for the `%'.  The stem `src/a' with a prerequisite pattern `c%r' gives
    6946 the file name `src/car'.
    6947 
    6948 
    6949 File: make.info,  Node: Match-Anything Rules,  Next: Canceling Rules,  Prev: Pattern Match,  Up: Pattern Rules
    6950 
    6951 Match-Anything Pattern Rules
    6952 ----------------------------
    6953 
    6954 When a pattern rule's target is just `%', it matches any file name
    6955 whatever.  We call these rules "match-anything" rules.  They are very
    6956 useful, but it can take a lot of time for `make' to think about them,
    6957 because it must consider every such rule for each file name listed
    6958 either as a target or as a prerequisite.
    6959 
    6960    Suppose the makefile mentions `foo.c'.  For this target, `make'
    6961 would have to consider making it by linking an object file `foo.c.o',
    6962 or by C compilation-and-linking in one step from `foo.c.c', or by
    6963 Pascal compilation-and-linking from `foo.c.p', and many other
    6964 possibilities.
    6965 
    6966    We know these possibilities are ridiculous since `foo.c' is a C
    6967 source file, not an executable.  If `make' did consider these
    6968 possibilities, it would ultimately reject them, because files such as
    6969 `foo.c.o' and `foo.c.p' would not exist.  But these possibilities are so
    6970 numerous that `make' would run very slowly if it had to consider them.
    6971 
    6972    To gain speed, we have put various constraints on the way `make'
    6973 considers match-anything rules.  There are two different constraints
    6974 that can be applied, and each time you define a match-anything rule you
    6975 must choose one or the other for that rule.
    6976 
    6977    One choice is to mark the match-anything rule as "terminal" by
    6978 defining it with a double colon.  When a rule is terminal, it does not
    6979 apply unless its prerequisites actually exist.  Prerequisites that
    6980 could be made with other implicit rules are not good enough.  In other
    6981 words, no further chaining is allowed beyond a terminal rule.
    6982 
    6983    For example, the built-in implicit rules for extracting sources from
    6984 RCS and SCCS files are terminal; as a result, if the file `foo.c,v' does
    6985 not exist, `make' will not even consider trying to make it as an
    6986 intermediate file from `foo.c,v.o' or from `RCS/SCCS/s.foo.c,v'.  RCS
    6987 and SCCS files are generally ultimate source files, which should not be
    6988 remade from any other files; therefore, `make' can save time by not
    6989 looking for ways to remake them.
    6990 
    6991    If you do not mark the match-anything rule as terminal, then it is
    6992 nonterminal.  A nonterminal match-anything rule cannot apply to a file
    6993 name that indicates a specific type of data.  A file name indicates a
    6994 specific type of data if some non-match-anything implicit rule target
    6995 matches it.
    6996 
    6997    For example, the file name `foo.c' matches the target for the pattern
    6998 rule `%.c : %.y' (the rule to run Yacc).  Regardless of whether this
    6999 rule is actually applicable (which happens only if there is a file
    7000 `foo.y'), the fact that its target matches is enough to prevent
    7001 consideration of any nonterminal match-anything rules for the file
    7002 `foo.c'.  Thus, `make' will not even consider trying to make `foo.c' as
    7003 an executable file from `foo.c.o', `foo.c.c', `foo.c.p', etc.
    7004 
    7005    The motivation for this constraint is that nonterminal match-anything
    7006 rules are used for making files containing specific types of data (such
    7007 as executable files) and a file name with a recognized suffix indicates
    7008 some other specific type of data (such as a C source file).
    7009 
    7010    Special built-in dummy pattern rules are provided solely to recognize
    7011 certain file names so that nonterminal match-anything rules will not be
    7012 considered.  These dummy rules have no prerequisites and no commands,
    7013 and they are ignored for all other purposes.  For example, the built-in
    7014 implicit rule
    7015 
    7016      %.p :
    7017 
    7018 exists to make sure that Pascal source files such as `foo.p' match a
    7019 specific target pattern and thereby prevent time from being wasted
    7020 looking for `foo.p.o' or `foo.p.c'.
    7021 
    7022    Dummy pattern rules such as the one for `%.p' are made for every
    7023 suffix listed as valid for use in suffix rules (*note Old-Fashioned
    7024 Suffix Rules: Suffix Rules.).
    7025 
    7026 
    7027 File: make.info,  Node: Canceling Rules,  Prev: Match-Anything Rules,  Up: Pattern Rules
    7028 
    7029 Canceling Implicit Rules
    7030 ------------------------
    7031 
    7032 You can override a built-in implicit rule (or one you have defined
    7033 yourself) by defining a new pattern rule with the same target and
    7034 prerequisites, but different commands.  When the new rule is defined,
    7035 the built-in one is replaced.  The new rule's position in the sequence
    7036 of implicit rules is determined by where you write the new rule.
    7037 
    7038    You can cancel a built-in implicit rule by defining a pattern rule
    7039 with the same target and prerequisites, but no commands.  For example,
    7040 the following would cancel the rule that runs the assembler:
    7041 
    7042      %.o : %.s
    7043 
    7044 
    7045 File: make.info,  Node: Last Resort,  Next: Suffix Rules,  Prev: Pattern Rules,  Up: Implicit Rules
    7046 
    7047 Defining Last-Resort Default Rules
    7048 ==================================
    7049 
    7050 You can define a last-resort implicit rule by writing a terminal
    7051 match-anything pattern rule with no prerequisites (*note Match-Anything
    7052 Rules::).  This is just like any other pattern rule; the only thing
    7053 special about it is that it will match any target.  So such a rule's
    7054 commands are used for all targets and prerequisites that have no
    7055 commands of their own and for which no other implicit rule applies.
    7056 
    7057    For example, when testing a makefile, you might not care if the
    7058 source files contain real data, only that they exist.  Then you might
    7059 do this:
    7060 
    7061      %::
    7062              touch $@
    7063 
    7064 to cause all the source files needed (as prerequisites) to be created
    7065 automatically.
    7066 
    7067    You can instead define commands to be used for targets for which
    7068 there are no rules at all, even ones which don't specify commands.  You
    7069 do this by writing a rule for the target `.DEFAULT'.  Such a rule's
    7070 commands are used for all prerequisites which do not appear as targets
    7071 in any explicit rule, and for which no implicit rule applies.
    7072 Naturally, there is no `.DEFAULT' rule unless you write one.
    7073 
    7074    If you use `.DEFAULT' with no commands or prerequisites:
    7075 
    7076      .DEFAULT:
    7077 
    7078 the commands previously stored for `.DEFAULT' are cleared.  Then `make'
    7079 acts as if you had never defined `.DEFAULT' at all.
    7080 
    7081    If you do not want a target to get the commands from a match-anything
    7082 pattern rule or `.DEFAULT', but you also do not want any commands to be
    7083 run for the target, you can give it empty commands (*note Defining
    7084 Empty Commands: Empty Commands.).
    7085 
    7086    You can use a last-resort rule to override part of another makefile.
    7087 *Note Overriding Part of Another Makefile: Overriding Makefiles.
    7088 
    7089 
    7090 File: make.info,  Node: Suffix Rules,  Next: Implicit Rule Search,  Prev: Last Resort,  Up: Implicit Rules
    7091 
    7092 Old-Fashioned Suffix Rules
    7093 ==========================
    7094 
    7095 "Suffix rules" are the old-fashioned way of defining implicit rules for
    7096 `make'.  Suffix rules are obsolete because pattern rules are more
    7097 general and clearer.  They are supported in GNU `make' for
    7098 compatibility with old makefiles.  They come in two kinds:
    7099 "double-suffix" and "single-suffix".
    7100 
    7101    A double-suffix rule is defined by a pair of suffixes: the target
    7102 suffix and the source suffix.  It matches any file whose name ends with
    7103 the target suffix.  The corresponding implicit prerequisite is made by
    7104 replacing the target suffix with the source suffix in the file name.  A
    7105 two-suffix rule whose target and source suffixes are `.o' and `.c' is
    7106 equivalent to the pattern rule `%.o : %.c'.
    7107 
    7108    A single-suffix rule is defined by a single suffix, which is the
    7109 source suffix.  It matches any file name, and the corresponding implicit
    7110 prerequisite name is made by appending the source suffix.  A
    7111 single-suffix rule whose source suffix is `.c' is equivalent to the
    7112 pattern rule `% : %.c'.
    7113 
    7114    Suffix rule definitions are recognized by comparing each rule's
    7115 target against a defined list of known suffixes.  When `make' sees a
    7116 rule whose target is a known suffix, this rule is considered a
    7117 single-suffix rule.  When `make' sees a rule whose target is two known
    7118 suffixes concatenated, this rule is taken as a double-suffix rule.
    7119 
    7120    For example, `.c' and `.o' are both on the default list of known
    7121 suffixes.  Therefore, if you define a rule whose target is `.c.o',
    7122 `make' takes it to be a double-suffix rule with source suffix `.c' and
    7123 target suffix `.o'.  Here is the old-fashioned way to define the rule
    7124 for compiling a C source file:
    7125 
    7126      .c.o:
    7127              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    7128 
    7129    Suffix rules cannot have any prerequisites of their own.  If they
    7130 have any, they are treated as normal files with funny names, not as
    7131 suffix rules.  Thus, the rule:
    7132 
    7133      .c.o: foo.h
    7134              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    7135 
    7136 tells how to make the file `.c.o' from the prerequisite file `foo.h',
    7137 and is not at all like the pattern rule:
    7138 
    7139      %.o: %.c foo.h
    7140              $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    7141 
    7142 which tells how to make `.o' files from `.c' files, and makes all `.o'
    7143 files using this pattern rule also depend on `foo.h'.
    7144 
    7145    Suffix rules with no commands are also meaningless.  They do not
    7146 remove previous rules as do pattern rules with no commands (*note
    7147 Canceling Implicit Rules: Canceling Rules.).  They simply enter the
    7148 suffix or pair of suffixes concatenated as a target in the data base.
    7149 
    7150    The known suffixes are simply the names of the prerequisites of the
    7151 special target `.SUFFIXES'.  You can add your own suffixes by writing a
    7152 rule for `.SUFFIXES' that adds more prerequisites, as in:
    7153 
    7154      .SUFFIXES: .hack .win
    7155 
    7156 which adds `.hack' and `.win' to the end of the list of suffixes.
    7157 
    7158    If you wish to eliminate the default known suffixes instead of just
    7159 adding to them, write a rule for `.SUFFIXES' with no prerequisites.  By
    7160 special dispensation, this eliminates all existing prerequisites of
    7161 `.SUFFIXES'.  You can then write another rule to add the suffixes you
    7162 want.  For example,
    7163 
    7164      .SUFFIXES:            # Delete the default suffixes
    7165      .SUFFIXES: .c .o .h   # Define our suffix list
    7166 
    7167    The `-r' or `--no-builtin-rules' flag causes the default list of
    7168 suffixes to be empty.
    7169 
    7170    The variable `SUFFIXES' is defined to the default list of suffixes
    7171 before `make' reads any makefiles.  You can change the list of suffixes
    7172 with a rule for the special target `.SUFFIXES', but that does not alter
    7173 this variable.
    7174 
  • vendor/gnumake/current/doc/make.info-2

    r152 r501  
    1 This is make.info, produced by makeinfo version 4.6 from 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."
    225
    326INFO-DIR-SECTION GNU Packages
     
    629END-INFO-DIR-ENTRY
    730
    8    This file documents the GNU Make utility, which determines
    9 automatically which pieces of a large program need to be recompiled,
    10 and issues the commands to recompile them.
    11 
    12    This is Edition 0.61, last updated 02 May 2003, of `The GNU Make
    13 Manual', for `make', Version 3.81.
    14 
    15    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    16 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    17 
    18    Permission is granted to copy, distribute and/or modify this document
    19 under the terms of the GNU Free Documentation License, Version 1.1 or
    20 any later version published by the Free Software Foundation; with no
    21 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
    22 Texts.  A copy of the license is included in the section entitled "GNU
    23 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.
    24591
    25592
    26593File: make.info,  Node: Implicit Rule Search,  Prev: Suffix Rules,  Up: Implicit Rules
    27594
    28 Implicit Rule Search Algorithm
    29 ==============================
     59510.8 Implicit Rule Search Algorithm
     596===================================
    30597
    31598Here is the procedure `make' uses for searching for an implicit rule
     
    109676File: make.info,  Node: Archives,  Next: Features,  Prev: Implicit Rules,  Up: Top
    110677
    111 Using `make' to Update Archive Files
    112 ************************************
     67811 Using `make' to Update Archive Files
     679***************************************
    113680
    114681"Archive files" are files containing named subfiles called "members";
     
    127694File: make.info,  Node: Archive Members,  Next: Archive Update,  Prev: Archives,  Up: Archives
    128695
    129 Archive Members as Targets
    130 ==========================
     69611.1 Archive Members as Targets
     697===============================
    131698
    132699An individual member of an archive file can be used as a target or
     
    148715
    149716   In fact, nearly all archive member targets are updated in just this
    150 way and there is an implicit rule to do it for you.  *Note:* The `c'
    151 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.
    152719
    153720   To specify several members in the same archive, you can write all the
     
    169736File: make.info,  Node: Archive Update,  Next: Archive Pitfalls,  Prev: Archive Members,  Up: Archives
    170737
    171 Implicit Rule for Archive Member Targets
    172 ========================================
     73811.2 Implicit Rule for Archive Member Targets
     739=============================================
    173740
    174741Recall that a target that looks like `A(M)' stands for the member named
     
    219786File: make.info,  Node: Archive Symbols,  Prev: Archive Update,  Up: Archive Update
    220787
    221 Updating Archive Symbol Directories
    222 -----------------------------------
     78811.2.1 Updating Archive Symbol Directories
     789------------------------------------------
    223790
    224791An archive file that is used as a library usually contains a special
     
    250817File: make.info,  Node: Archive Pitfalls,  Next: Archive Suffix Rules,  Prev: Archive Update,  Up: Archives
    251818
    252 Dangers When Using Archives
    253 ===========================
     81911.3 Dangers When Using Archives
     820================================
    254821
    255822It is important to be careful when using parallel execution (the `-j'
     
    266833File: make.info,  Node: Archive Suffix Rules,  Prev: Archive Pitfalls,  Up: Archives
    267834
    268 Suffix Rules for Archive Files
    269 ==============================
     83511.4 Suffix Rules for Archive Files
     836===================================
    270837
    271838You can write a special kind of suffix rule for dealing with archive
     
    305872File: make.info,  Node: Features,  Next: Missing,  Prev: Archives,  Up: Top
    306873
    307 Features of GNU `make'
    308 **********************
     87412 Features of GNU `make'
     875*************************
    309876
    310877Here is a summary of the features of GNU `make', for comparison with
     
    4991066
    5001067   * The built-in variable `MAKE_VERSION' gives the version number of
    501      `make'.
     1068     `make'. 
    5021069
    5031070
    5041071File: make.info,  Node: Missing,  Next: Makefile Conventions,  Prev: Features,  Up: Top
    5051072
    506 Incompatibilities and Missing Features
    507 **************************************
     107313 Incompatibilities and Missing Features
     1074*****************************************
    5081075
    5091076The `make' programs in various other systems support a few features
     
    5451112     imagine what went on in the minds of Unix `make' developers to do
    5461113     this; it is utterly inconsistent with the normal definition of
    547      `$*'.
     1114     `$*'. 
    5481115
    5491116   * In some Unix `make's, implicit rule search (*note Using Implicit
     
    5891156File: make.info,  Node: Makefile Conventions,  Next: Quick Reference,  Prev: Missing,  Up: Top
    5901157
    591 Makefile Conventions
    592 ********************
     115814 Makefile Conventions
     1159***********************
    5931160
    5941161This node describes conventions for writing the Makefiles for GNU
     
    6091176File: make.info,  Node: Makefile Basics,  Next: Utilities in Makefiles,  Up: Makefile Conventions
    6101177
    611 General Conventions for Makefiles
    612 =================================
     117814.1 General Conventions for Makefiles
     1179======================================
    6131180
    6141181Every Makefile should contain this line:
     
    6891256File: make.info,  Node: Utilities in Makefiles,  Next: Command Variables,  Prev: Makefile Basics,  Up: Makefile Conventions
    6901257
    691 Utilities in Makefiles
    692 ======================
     125814.2 Utilities in Makefiles
     1259===========================
    6931260
    6941261Write the Makefile commands (and any shell scripts, such as
     
    7441311File: make.info,  Node: Command Variables,  Next: Directory Variables,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
    7451312
    746 Variables for Specifying Commands
    747 =================================
     131314.3 Variables for Specifying Commands
     1314======================================
    7481315
    7491316Makefiles should provide variables for overriding certain commands,
     
    8241391File: make.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: Command Variables,  Up: Makefile Conventions
    8251392
    826 Variables for Installation Directories
    827 ======================================
     139314.4 Variables for Installation Directories
     1394===========================================
    8281395
    8291396Installation directories should always be named by variables, so it is
    8301397easy to install in a nonstandard place.  The standard names for these
    831 variables are described below.  They are based on a standard filesystem
    832 layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4,
    833 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.
    8341409
    8351410   These two variables set the root for the installation.  All the other
     
    8841459     (If you are using Autoconf, write it as `@libexecdir@'.)
    8851460
     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
    8861467   Data files used by the program during its execution are divided into
    8871468categories in two ways.
     
    9001481architecture-independent, and it is generally not hard.
    9011482
    902    Therefore, here are the variables Makefiles should use to specify
    903 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.
    9041493
    9051494`datadir'
    906      The directory for installing read-only architecture independent
    907      data files.  This should normally be `/usr/local/share', but write
    908      it as `$(prefix)/share'.  (If you are using Autoconf, write it as
    909      `@datadir@'.)  As a special exception, see `$(infodir)' and
    910      `$(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/'.
    9111508
    9121509`sysconfdir'
     
    9411538     `@localstatedir@'.)
    9421539
    943 `libdir'
    944      The directory for object files and libraries of object code.  Do
    945      not install executables here, they probably ought to go in
    946      `$(libexecdir)' instead.  The value of `libdir' should normally be
    947      `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
    948      are using Autoconf, write it as `@libdir@'.)
    949 
    950 `infodir'
    951      The directory for installing the Info files for this package.  By
    952      default, it should be `/usr/local/info', but it should be written
    953      as `$(prefix)/info'.  (If you are using Autoconf, write it as
    954      `@infodir@'.)
    955 
    956 `lispdir'
    957      The directory for installing any Emacs Lisp files in this package.
    958      By default, it should be `/usr/local/share/emacs/site-lisp', but
    959      it should be written as `$(prefix)/share/emacs/site-lisp'.
    960 
    961      If you are using Autoconf, write the default as `@lispdir@'.  In
    962      order to make `@lispdir@' work, you need the following lines in
    963      your `configure.in' file:
    964 
    965           lispdir='${datadir}/emacs/site-lisp'
    966           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'.
    9671544
    9681545`includedir'
     
    10001577     string in the file--part of a comment--and `grep' for that string.
    10011578
     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
    10021634   Unix-style man pages are installed in one of the following:
    10031635
    10041636`mandir'
    10051637     The top-level directory for installing the man pages (if any) for
    1006      this package.  It will normally be `/usr/local/man', but you should
    1007      write it as `$(prefix)/man'.  (If you are using Autoconf, write it
    1008      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@'.)
    10091641
    10101642`man1dir'
     
    10491681     # NOTE: This directory must exist when you start the install.
    10501682     prefix = /usr/local
     1683     datarootdir = $(prefix)/share
     1684     datadir = $(datarootdir)
    10511685     exec_prefix = $(prefix)
    10521686     # Where to put the executable for the command `gcc'.
     
    10551689     libexecdir = $(exec_prefix)/libexec
    10561690     # Where to put the Info files.
    1057      infodir = $(prefix)/info
     1691     infodir = $(datarootdir)/info
    10581692
    10591693   If your program installs a large number of files into one of the
     
    10721706File: make.info,  Node: Standard Targets,  Next: Install Command Categories,  Prev: Directory Variables,  Up: Makefile Conventions
    10731707
    1074 Standard Targets for Users
    1075 ==========================
     170814.5 Standard Targets for Users
     1709===============================
    10761710
    10771711All GNU programs should have the following targets in their Makefiles:
     
    11421776     Categories::.
    11431777
     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
    11441797`uninstall'
    1145      Delete all the installed files--the copies that the `install'
    1146      target creates.
     1798     Delete all the installed files--the copies that the `install' and
     1799     `install-*' targets create.
    11471800
    11481801     This rule should not modify the directories where compilation is
     
    11761829
    11771830`clean'
    1178      Delete all files from the current directory that are normally
    1179      created by building the program.  Don't delete the files that
    1180      record the configuration.  Also preserve files that could be made
    1181      by building, but normally aren't because the distribution comes
    1182      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.
    11831839
    11841840     Delete `.dvi' files here if they are not part of the distribution.
    11851841
    11861842`distclean'
    1187      Delete all files from the current directory that are created by
    1188      configuring or building the program.  If you have unpacked the
    1189      source and built the program without creating any other files,
    1190      `make distclean' should leave only the files that were in the
    1191      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.
    11921850
    11931851`mostlyclean'
     
    11981856
    11991857`maintainer-clean'
    1200      Delete almost everything from the current directory that can be
    1201      reconstructed with this Makefile.  This typically includes
    1202      everything deleted by `distclean', plus more: C source files
    1203      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.
    12041862
    12051863     The reason we say "almost everything" is that running the command
     
    12081866     generally, `make maintainer-clean' should not delete anything that
    12091867     needs to exist in order to run `configure' and then begin to build
    1210      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
    12111871     delete everything else that can be rebuilt.
    12121872
     
    12331893
    12341894          info: foo.info
    1235          
     1895
    12361896          foo.info: foo.texi chap1.texi chap2.texi
    12371897                  $(MAKEINFO) $(srcdir)/foo.texi
     
    12481908
    12491909`dvi'
    1250      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:
    12511915
    12521916          dvi: foo.dvi
    1253          
     1917
    12541918          foo.dvi: foo.texi chap1.texi chap2.texi
    12551919                  $(TEXI2DVI) $(srcdir)/foo.texi
     
    12591923     distribution.(1)  Alternatively, write just the dependencies, and
    12601924     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).
    12611936
    12621937`dist'
     
    13292004File: make.info,  Node: Install Command Categories,  Prev: Standard Targets,  Up: Makefile Conventions
    13302005
    1331 Install Command Categories
    1332 ==========================
     200614.6 Install Command Categories
     2007===============================
    13332008
    13342009When writing the `install' target, you must classify all the commands
     
    14152090   Programs to build binary packages work by extracting the
    14162091pre-installation and post-installation commands.  Here is one way of
    1417 extracting the pre-installation commands:
    1418 
    1419      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 \
    14202096           PRE_INSTALL=pre-install \
    14212097           POST_INSTALL=post-install \
     
    14252101where the file `pre-install.awk' could contain this:
    14262102
    1427      $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0}
     2103     $0 ~ /^(normal-install|post-install)[ \t]*$/ {on = 0}
    14282104     on {print $0}
    1429      $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1}
    1430 
    1431    The resulting file of pre-installation commands is executed as a
    1432 shell script as part of installing the binary package.
     2105     $0 ~ /^pre-install[ \t]*$/ {on = 1}
    14332106
    14342107
    14352108File: make.info,  Node: Quick Reference,  Next: Error Messages,  Prev: Makefile Conventions,  Up: Top
    14362109
    1437 Quick Reference
    1438 ***************
     2110Appendix A Quick Reference
     2111**************************
    14392112
    14402113This appendix summarizes the directives, text manipulation functions,
     
    15042177     directive.
    15052178
    1506    Here is a summary of the text manipulation functions (*note
    1507 Functions::):
     2179   Here is a summary of the built-in functions (*note Functions::):
    15082180
    15092181`$(subst FROM,TO,TEXT)'
     
    15422214     Functions.
    15432215
     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
    15442241`$(dir NAMES...)'
    15452242     Extract the directory part of each file name.
     
    15712268     *Note Functions for File Names: File Name Functions.
    15722269
    1573 `$(word N,TEXT)'
    1574      Extract the Nth word (one-origin) of TEXT.
    1575      *Note Functions for File Names: File Name Functions.
    1576 
    1577 `$(words TEXT)'
    1578      Count the number of words in TEXT.
    1579      *Note Functions for File Names: File Name Functions.
    1580 
    1581 `$(wordlist S,E,TEXT)'
    1582      Returns the list of words in TEXT from S to E.
    1583      *Note Functions for File Names: File Name Functions.
    1584 
    1585 `$(firstword NAMES...)'
    1586      Extract the first word of NAMES.
    1587      *Note Functions for File Names: File Name Functions.
    1588 
    15892270`$(wildcard PATTERN...)'
    15902271     Find file names matching a shell file name pattern (_not_ a `%'
     
    15922273     *Note The Function `wildcard': Wildcard Function.
    15932274
     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
    15942285`$(error TEXT...)'
    15952286     When this function is evaluated, `make' generates a fatal error
     
    16102301     defined.
    16112302     *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.
    16122308
    16132309`$(foreach VAR,WORDS,TEXT)'
     
    17012397     `/bin/sh'.  You can set `SHELL' in the makefile to change the
    17022398     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::.
    17032401
    17042402`MAKESHELL'
    17052403     On MS-DOS only, the name of the command interpreter that is to be
    1706      used by `make'. This value takes precedence over the value of
     2404     used by `make'.  This value takes precedence over the value of
    17072405     `SHELL'.  *Note MAKESHELL variable: Execution.
    17082406
     
    17482446File: make.info,  Node: Error Messages,  Next: Complex Makefile,  Prev: Quick Reference,  Up: Top
    17492447
    1750 Errors Generated by Make
    1751 ************************
     2448Appendix B Errors Generated by Make
     2449***********************************
    17522450
    17532451Here is a list of the more common errors you might see generated by
     
    18222520     on the command line, and `make' couldn't find any makefiles to
    18232521     read in.  The latter means that some makefile was found, but it
    1824      didn't contain any default target and none was given on the
    1825      command line.  GNU `make' has nothing to do in these situations.
    1826      *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.
    18272525
    18282526`Makefile `XXX' was not found.'
     
    19012599File: make.info,  Node: Complex Makefile,  Next: GNU Free Documentation License,  Prev: Error Messages,  Up: Top
    19022600
    1903 Complex Makefile Example
    1904 ************************
     2601Appendix C Complex Makefile Example
     2602***********************************
    19052603
    19062604Here is the makefile for the GNU `tar' program.  This is a moderately
     
    19382636     # Un*x Makefile for GNU tar program.
    19392637     # Copyright (C) 1991 Free Software Foundation, Inc.
    1940      
     2638
    19412639     # This program is free software; you can redistribute
    19422640     # it and/or modify it under the terms of the GNU
     
    19442642     ...
    19452643     ...
    1946      
     2644
    19472645     SHELL = /bin/sh
    1948      
     2646
    19492647     #### Start of system configuration section. ####
    1950      
     2648
    19512649     srcdir = .
    1952      
     2650
    19532651     # If you use gcc, you should either run the
    19542652     # fixincludes script that comes with it or else use
     
    19592657     INSTALL = /usr/local/bin/install -c
    19602658     INSTALLDATA = /usr/local/bin/install -c -m 644
    1961      
     2659
    19622660     # Things you might add to DEFS:
    19632661     # -DSTDC_HEADERS        If you have ANSI C headers and
     
    20102708     # -DXENIX               If you have sys/inode.h
    20112709     #                       and need it 94 to be included.
    2012      
     2710
    20132711     DEFS =  -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
    20142712             -DVPRINTF_MISSING -DBSD42
     
    20192717     DEF_AR_FILE = /dev/rmt8
    20202718     DEFBLOCKING = 20
    2021      
     2719
    20222720     CDEBUG = -g
    20232721     CFLAGS = $(CDEBUG) -I. -I$(srcdir) $(DEFS) \
     
    20252723             -DDEFBLOCKING=$(DEFBLOCKING)
    20262724     LDFLAGS = -g
    2027      
     2725
    20282726     prefix = /usr/local
    20292727     # Prefix for each installed program,
    20302728     # normally empty or `g'.
    20312729     binprefix =
    2032      
     2730
    20332731     # The directory to install tar in.
    20342732     bindir = $(prefix)/bin
    2035      
     2733
    20362734     # The directory to install the info files in.
    20372735     infodir = $(prefix)/info
    2038      
     2736
    20392737     #### End of system configuration section. ####
    2040      
     2738
    20412739     SRC1 =  tar.c create.c extract.c buffer.c \
    20422740             getoldopt.c update.c gnu.c mangle.c
     
    20582756             msd_dir.h msd_dir.c tcexparg.c \
    20592757             level-0 level-1 backup-specs testpad.c
    2060      
     2758
     2759     .PHONY: all
    20612760     all:    tar rmt tar.info
    2062      
     2761
     2762     .PHONY: tar
    20632763     tar:    $(OBJS)
    20642764             $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
    2065      
     2765
    20662766     rmt:    rmt.c
    20672767             $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rmt.c
    2068      
     2768
    20692769     tar.info: tar.texinfo
    20702770             makeinfo tar.texinfo
    2071      
     2771
     2772     .PHONY: install
    20722773     install: all
    20732774             $(INSTALL) tar $(bindir)/$(binprefix)tar
    20742775             -test ! -f rmt || $(INSTALL) rmt /etc/rmt
    20752776             $(INSTALLDATA) $(srcdir)/tar.info* $(infodir)
    2076      
     2777
    20772778     $(OBJS): tar.h port.h testpad.h
    20782779     regex.o buffer.o tar.o: regex.h
    20792780     # getdate.y has 8 shift/reduce conflicts.
    2080      
     2781
    20812782     testpad.h: testpad
    20822783             ./testpad
    2083      
     2784
    20842785     testpad: testpad.o
    20852786             $(CC) -o $@ testpad.o
    2086      
     2787
    20872788     TAGS:   $(SRCS)
    20882789             etags $(SRCS)
    2089      
     2790
     2791     .PHONY: clean
    20902792     clean:
    20912793             rm -f *.o tar rmt testpad testpad.h core
    2092      
     2794
     2795     .PHONY: distclean
    20932796     distclean: clean
    20942797             rm -f TAGS Makefile config.status
    2095      
     2798
     2799     .PHONY: realclean
    20962800     realclean: distclean
    20972801             rm -f tar.info*
    2098      
     2802
     2803     .PHONY: shar
    20992804     shar: $(SRCS) $(AUX)
    21002805             shar $(SRCS) $(AUX) | compress \
     
    21032808                          -e q
    21042809                          version.c`.shar.Z
    2105      
     2810
     2811     .PHONY: dist
    21062812     dist: $(SRCS) $(AUX)
    21072813             echo tar-`sed \
     
    21152821             tar chZf `cat .fname`.tar.Z `cat .fname`
    21162822             -rm -rf `cat .fname` .fname
    2117      
     2823
    21182824     tar.zoo: $(SRCS) $(AUX)
    21192825             -rm -rf tmp.dir
     
    21302836File: make.info,  Node: GNU Free Documentation License,  Next: Concept Index,  Prev: Complex Makefile,  Up: Top
    21312837
    2132 GNU Free Documentation License
    2133 ******************************
    2134 
    2135                         Version 1.1, March 2000
    2136      Copyright (C) 2000 Free Software Foundation, Inc.
    2137      59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
    2138      
     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
    21392846     Everyone is permitted to copy and distribute verbatim copies
    21402847     of this license document, but changing it is not allowed.
     
    21432850
    21442851     The purpose of this License is to make a manual, textbook, or other
    2145      written document "free" in the sense of freedom: to assure everyone
    2146      the effective freedom to copy and redistribute it, with or without
    2147      modifying it, either commercially or noncommercially.  Secondarily,
    2148      this License preserves for the author and publisher a way to get
    2149      credit for their work, while not being considered responsible for
    2150      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.
    21512858
    21522859     This License is a kind of "copyleft", which means that derivative
     
    21662873  1. APPLICABILITY AND DEFINITIONS
    21672874
    2168      This License applies to any manual or other work that contains a
    2169      notice placed by the copyright holder saying it can be distributed
    2170      under the terms of this License.  The "Document", below, refers to
    2171      any such manual or work.  Any member of the public is a licensee,
    2172      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.
    21732884
    21742885     A "Modified Version" of the Document means any work containing the
     
    21762887     modifications and/or translated into another language.
    21772888
    2178      A "Secondary Section" is a named appendix or a front-matter
    2179      section of the Document that deals exclusively with the
    2180      relationship of the publishers or authors of the Document to the
    2181      Document's overall subject (or to related matters) and contains
    2182      nothing that could fall directly within that overall subject.
    2183      (For example, if the Document is in part a textbook of
    2184      mathematics, a Secondary Section may not explain any mathematics.)
    2185      The relationship could be a matter of historical connection with
    2186      the subject or with related matters, or of legal, commercial,
    2187      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.
    21882899
    21892900     The "Invariant Sections" are certain Secondary Sections whose
    21902901     titles are designated, as being those of Invariant Sections, in
    21912902     the notice that says that the Document is released under this
    2192      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.
    21932907
    21942908     The "Cover Texts" are certain short passages of text that are
    21952909     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
    2196      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.
    21972913
    21982914     A "Transparent" copy of the Document means a machine-readable copy,
    21992915     represented in a format whose specification is available to the
    2200      general public, whose contents can be viewed and edited directly
    2201      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
    22022918     composed of pixels) generic paint programs or (for drawings) some
    22032919     widely available drawing editor, and that is suitable for input to
    22042920     text formatters or for automatic translation to a variety of
    22052921     formats suitable for input to text formatters.  A copy made in an
    2206      otherwise Transparent file format whose markup has been designed
    2207      to thwart or discourage subsequent modification by readers is not
    2208      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".
    22092927
    22102928     Examples of suitable formats for Transparent copies include plain
    22112929     ASCII without markup, Texinfo input format, LaTeX input format,
    22122930     SGML or XML using a publicly available DTD, and
    2213      standard-conforming simple HTML designed for human modification.
    2214      Opaque formats include PostScript, PDF, proprietary formats that
    2215      can be read and edited only by proprietary word processors, SGML
    2216      or XML for which the DTD and/or processing tools are not generally
    2217      available, and the machine-generated HTML produced by some word
    2218      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.
    22192938
    22202939     The "Title Page" means, for a printed book, the title page itself,
     
    22242943     Page" means the text near the most prominent appearance of the
    22252944     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.
    22262961
    22272962  2. VERBATIM COPYING
     
    22432978  3. COPYING IN QUANTITY
    22442979
    2245      If you publish printed copies of the Document numbering more than
    2246      100, and the Document's license notice requires Cover Texts, you
    2247      must enclose the copies in covers that carry, clearly and legibly,
    2248      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
    22492985     Back-Cover Texts on the back cover.  Both covers must also clearly
    22502986     and legibly identify you as the publisher of these copies.  The
     
    22643000     numbering more than 100, you must either include a
    22653001     machine-readable Transparent copy along with each Opaque copy, or
    2266      state in or with each Opaque copy a publicly-accessible
    2267      computer-network location containing a complete Transparent copy
    2268      of the Document, free of added material, which the general
    2269      network-using public has access to download anonymously at no
    2270      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
    22713006     latter option, you must take reasonably prudent steps, when you
    22723007     begin distribution of Opaque copies in quantity, to ensure that
     
    23023037          the Modified Version, together with at least five of the
    23033038          principal authors of the Document (all of its principal
    2304           authors, if it has less than five).
     3039          authors, if it has fewer than five), unless they release you
     3040          from this requirement.
    23053041
    23063042       C. State on the Title page the name of the publisher of the
     
    23233059       H. Include an unaltered copy of this License.
    23243060
    2325        I. Preserve the section entitled "History", and its title, and
    2326           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
    23273063          authors, and publisher of the Modified Version as given on
    2328           the Title Page.  If there is no section entitled "History" in
     3064          the Title Page.  If there is no section Entitled "History" in
    23293065          the Document, create one stating the title, year, authors,
    23303066          and publisher of the Document as given on its Title Page,
     
    23413077          it refers to gives permission.
    23423078
    2343        K. In any section entitled "Acknowledgments" or "Dedications",
    2344           preserve the section's title, and preserve in the section all
    2345           the substance and tone of each of the contributor
    2346           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.
    23473083
    23483084       L. Preserve all the Invariant Sections of the Document,
     
    23513087          titles.
    23523088
    2353        M. Delete any section entitled "Endorsements".  Such a section
     3089       M. Delete any section Entitled "Endorsements".  Such a section
    23543090          may not be included in the Modified Version.
    23553091
    2356        N. Do not retitle any existing section as "Endorsements" or to
    2357           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.
    23583097
    23593098     If the Modified Version includes new front-matter sections or
     
    23653104     other section titles.
    23663105
    2367      You may add a section entitled "Endorsements", provided it contains
     3106     You may add a section Entitled "Endorsements", provided it contains
    23683107     nothing but endorsements of your Modified Version by various
    23693108     parties--for example, statements of peer review or that the text
     
    23933132     all of the Invariant Sections of all of the original documents,
    23943133     unmodified, and list them all as Invariant Sections of your
    2395      combined work in its license notice.
     3134     combined work in its license notice, and that you preserve all
     3135     their Warranty Disclaimers.
    23963136
    23973137     The combined work need only contain one copy of this License, and
     
    24053145     combined work.
    24063146
    2407      In the combination, you must combine any sections entitled
     3147     In the combination, you must combine any sections Entitled
    24083148     "History" in the various original documents, forming one section
    2409      entitled "History"; likewise combine any sections entitled
    2410      "Acknowledgments", and any sections entitled "Dedications".  You
    2411      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."
    24123152
    24133153  6. COLLECTIONS OF DOCUMENTS
     
    24303170     A compilation of the Document or its derivatives with other
    24313171     separate and independent documents or works, in or on a volume of
    2432      a storage or distribution medium, does not as a whole count as a
    2433      Modified Version of the Document, provided no compilation
    2434      copyright is claimed for the compilation.  Such a compilation is
    2435      called an "aggregate", and this License does not apply to the
    2436      other self-contained works thus compiled with the Document, on
    2437      account of their being thus compiled, if they are not themselves
    2438      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.
    24393178
    24403179     If the Cover Text requirement of section 3 is applicable to these
    2441      copies of the Document, then if the Document is less than one
    2442      quarter of the entire aggregate, the Document's Cover Texts may be
    2443      placed on covers that surround only the Document within the
    2444      aggregate.  Otherwise they must appear on covers around the whole
    2445      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.
    24463186
    24473187  8. TRANSLATION
     
    24533193     translations of some or all Invariant Sections in addition to the
    24543194     original versions of these Invariant Sections.  You may include a
    2455      translation of this License provided that you also include the
    2456      original English version of this License.  In case of a
    2457      disagreement between the translation and the original English
    2458      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.
    24593207
    24603208  9. TERMINATION
     
    24863234     Free Software Foundation.
    24873235
    2488 ADDENDUM: How to use this License for your documents
    2489 ====================================================
     3236D.1 ADDENDUM: How to use this License for your documents
     3237========================================================
    24903238
    24913239To use this License in a document you have written, include a copy of
     
    24953243       Copyright (C)  YEAR  YOUR NAME.
    24963244       Permission is granted to copy, distribute and/or modify this document
    2497        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
    24983246       or any later version published by the Free Software Foundation;
    2499        with the Invariant Sections being LIST THEIR TITLES, with the
    2500        Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    2501        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
    25023249       Free Documentation License''.
    25033250
    2504    If you have no Invariant Sections, write "with no Invariant Sections"
    2505 instead of saying which ones are invariant.  If you have no Front-Cover
    2506 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
    2507 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.
    25083261
    25093262   If your document contains nontrivial examples of program code, we
     
    25183271*****************
    25193272
     3273[index]
    25203274* Menu:
    25213275
    2522 * # (comments), in commands:             Commands.
    2523 * # (comments), in makefile:             Makefile Contents.
     3276* # (comments), in commands:             Command Syntax.      (line  27)
     3277* # (comments), in makefile:             Makefile Contents.   (line  41)
    25243278* #include:                              Automatic Prerequisites.
    2525 * $$@, support for:                      Automatic Variables.
    2526 * $, in function call:                   Syntax of Functions.
    2527 * $, in rules:                           Rule Syntax.
    2528 * $, in variable name:                   Computed Names.
    2529 * $, in variable reference:              Reference.
    2530 * %, in pattern rules:                   Pattern Intro.
    2531 * %, quoting in patsubst:                Text Functions.
    2532 * %, quoting in static pattern:          Static Usage.
    2533 * %, quoting in vpath:                   Selective Search.
    2534 * %, quoting with \ (backslash) <1>:     Text Functions.
    2535 * %, quoting with \ (backslash) <2>:     Static Usage.
    2536 * %, quoting with \ (backslash):         Selective Search.
    2537 * * (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)
    25383292* +, and command execution:              Instead of Execution.
    2539 * +, and commands:                       MAKE Variable.
    2540 * +, and define:                         Sequences.
    2541 * +=:                                    Appending.
    2542 * +=, expansion:                         Reading Makefiles.
    2543 * ,v (RCS file extension):               Catalogue of Rules.
    2544 * - (in commands):                       Errors.
    2545 * -, and define:                         Sequences.
    2546 * --always-make:                         Options Summary.
    2547 * --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)
    25483303* --assume-new:                          Instead of Execution.
    2549 * --assume-new, and recursion:           Options/Recursion.
    2550 * --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)
    25513307* --assume-old:                          Avoiding Compilation.
    2552 * --assume-old, and recursion:           Options/Recursion.
    2553 * --debug:                               Options Summary.
    2554 * --directory <1>:                       Options Summary.
    2555 * --directory:                           Recursion.
    2556 * --directory, and --print-directory:    -w Option.
    2557 * --directory, and recursion:            Options/Recursion.
    2558 * --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)
    25593317* --dry-run <2>:                         Instead of Execution.
    2560 * --dry-run:                             Echoing.
    2561 * --environment-overrides:               Options Summary.
    2562 * --file <1>:                            Options Summary.
    2563 * --file <2>:                            Makefile Arguments.
    2564 * --file:                                Makefile Names.
    2565 * --file, and recursion:                 Options/Recursion.
    2566 * --help:                                Options Summary.
    2567 * --ignore-errors <1>:                   Options Summary.
    2568 * --ignore-errors:                       Errors.
    2569 * --include-dir <1>:                     Options Summary.
    2570 * --include-dir:                         Include.
    2571 * --jobs <1>:                            Options Summary.
    2572 * --jobs:                                Parallel.
    2573 * --jobs, and recursion:                 Options/Recursion.
    2574 * --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)
    25753334* --just-print <2>:                      Instead of Execution.
    2576 * --just-print:                          Echoing.
    2577 * --keep-going <1>:                      Options Summary.
    2578 * --keep-going <2>:                      Testing.
    2579 * --keep-going:                          Errors.
    2580 * --load-average <1>:                    Options Summary.
    2581 * --load-average:                        Parallel.
    2582 * --makefile <1>:                        Options Summary.
    2583 * --makefile <2>:                        Makefile Arguments.
    2584 * --makefile:                            Makefile Names.
    2585 * --max-load <1>:                        Options Summary.
    2586 * --max-load:                            Parallel.
    2587 * --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)
    25883348* --new-file:                            Instead of Execution.
    2589 * --new-file, and recursion:             Options/Recursion.
    2590 * --no-builtin-rules:                    Options Summary.
    2591 * --no-builtin-variables:                Options Summary.
    2592 * --no-keep-going:                       Options Summary.
    2593 * --no-print-directory <1>:              Options Summary.
    2594 * --no-print-directory:                  -w Option.
    2595 * --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)
    25963357* --old-file:                            Avoiding Compilation.
    2597 * --old-file, and recursion:             Options/Recursion.
    2598 * --print-data-base:                     Options Summary.
    2599 * --print-directory:                     Options Summary.
    2600 * --print-directory, and --directory:    -w Option.
    2601 * --print-directory, and recursion:      -w Option.
    2602 * --print-directory, disabling:          -w Option.
    2603 * --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)
    26043366* --question:                            Instead of Execution.
    2605 * --quiet <1>:                           Options Summary.
    2606 * --quiet:                               Echoing.
    2607 * --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)
    26083371* --recon <2>:                           Instead of Execution.
    2609 * --recon:                               Echoing.
    2610 * --silent <1>:                          Options Summary.
    2611 * --silent:                              Echoing.
    2612 * --stop:                                Options Summary.
    2613 * --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)
    26143378* --touch:                               Instead of Execution.
    2615 * --touch, and recursion:                MAKE Variable.
    2616 * --version:                             Options Summary.
    2617 * --warn-undefined-variables:            Options Summary.
    2618 * --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)
    26193384* --what-if:                             Instead of Execution.
    2620 * -B:                                    Options Summary.
    2621 * -b:                                    Options Summary.
    2622 * -C <1>:                                Options Summary.
    2623 * -C:                                    Recursion.
    2624 * -C, and -w:                            -w Option.
    2625 * -C, and recursion:                     Options/Recursion.
    2626 * -d:                                    Options Summary.
    2627 * -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)
    26283394* -e (shell flag):                       Automatic Prerequisites.
    2629 * -f <1>:                                Options Summary.
    2630 * -f <2>:                                Makefile Arguments.
    2631 * -f:                                    Makefile Names.
    2632 * -f, and recursion:                     Options/Recursion.
    2633 * -h:                                    Options Summary.
    2634 * -I:                                    Options Summary.
    2635 * -i <1>:                                Options Summary.
    2636 * -i:                                    Errors.
    2637 * -I:                                    Include.
    2638 * -j <1>:                                Options Summary.
    2639 * -j:                                    Parallel.
    2640 * -j, and archive update:                Archive Pitfalls.
    2641 * -j, and recursion:                     Options/Recursion.
    2642 * -k <1>:                                Options Summary.
    2643 * -k <2>:                                Testing.
    2644 * -k:                                    Errors.
    2645 * -l:                                    Options Summary.
    2646 * -l (library search):                   Libraries/Search.
    2647 * -l (load average):                     Parallel.
    2648 * -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)
    26493417* -M (to compiler):                      Automatic Prerequisites.
     3418                                                              (line  18)
    26503419* -MM (to GNU compiler):                 Automatic Prerequisites.
    2651 * -n <1>:                                Options Summary.
     3420                                                              (line  68)
     3421* -n <1>:                                Options Summary.     (line 138)
    26523422* -n <2>:                                Instead of Execution.
    2653 * -n:                                    Echoing.
    2654 * -o <1>:                                Options Summary.
     3423                                                              (line  14)
     3424* -n:                                    Echoing.             (line  18)
     3425* -o <1>:                                Options Summary.     (line 145)
    26553426* -o:                                    Avoiding Compilation.
    2656 * -o, and recursion:                     Options/Recursion.
    2657 * -p:                                    Options Summary.
    2658 * -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)
    26593431* -q:                                    Instead of Execution.
    2660 * -R:                                    Options Summary.
    2661 * -r:                                    Options Summary.
    2662 * -S:                                    Options Summary.
    2663 * -s <1>:                                Options Summary.
    2664 * -s:                                    Echoing.
    2665 * -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)
    26663439* -t:                                    Instead of Execution.
    2667 * -t, and recursion:                     MAKE Variable.
    2668 * -v:                                    Options Summary.
    2669 * -W:                                    Options Summary.
    2670 * -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)
    26713445* -W:                                    Instead of Execution.
    2672 * -w, and -C:                            -w Option.
    2673 * -w, and recursion:                     -w Option.
    2674 * -W, and recursion:                     Options/Recursion.
    2675 * -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)
    26763451* .a (archives):                         Archive Suffix Rules.
    2677 * .C:                                    Catalogue of Rules.
    2678 * .c:                                    Catalogue of Rules.
    2679 * .cc:                                   Catalogue of Rules.
    2680 * .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)
    26813458* .d:                                    Automatic Prerequisites.
    2682 * .def:                                  Catalogue of Rules.
    2683 * .dvi:                                  Catalogue of Rules.
    2684 * .F:                                    Catalogue of Rules.
    2685 * .f:                                    Catalogue of Rules.
    2686 * .info:                                 Catalogue of Rules.
    2687 * .l:                                    Catalogue of Rules.
    2688 * .LIBPATTERNS, and link libraries:      Libraries/Search.
    2689 * .ln:                                   Catalogue of Rules.
    2690 * .mod:                                  Catalogue of Rules.
    2691 * .o:                                    Catalogue of Rules.
    2692 * .p:                                    Catalogue of Rules.
    2693 * .PRECIOUS intermediate files:          Chained Rules.
    2694 * .r:                                    Catalogue of Rules.
    2695 * .S:                                    Catalogue of Rules.
    2696 * .s:                                    Catalogue of Rules.
    2697 * .sh:                                   Catalogue of Rules.
    2698 * .sym:                                  Catalogue of Rules.
    2699 * .tex:                                  Catalogue of Rules.
    2700 * .texi:                                 Catalogue of Rules.
    2701 * .texinfo:                              Catalogue of Rules.
    2702 * .txinfo:                               Catalogue of Rules.
    2703 * .w:                                    Catalogue of Rules.
    2704 * .web:                                  Catalogue of Rules.
    2705 * .y:                                    Catalogue of Rules.
    2706 * :: rules (double-colon):               Double-Colon.
    2707 * := <1>:                                Setting.
    2708 * :=:                                    Flavors.
    2709 * = <1>:                                 Setting.
    2710 * =:                                     Flavors.
    2711 * =, expansion:                          Reading Makefiles.
    2712 * ? (wildcard character):                Wildcards.
    2713 * ?= <1>:                                Setting.
    2714 * ?=:                                    Flavors.
    2715 * ?=, expansion:                         Reading Makefiles.
    2716 * @ (in commands):                       Echoing.
    2717 * @, and define:                         Sequences.
    2718 * [...] (wildcard characters):           Wildcards.
    2719 * \ (backslash), for continuation lines: Simple Makefile.
    2720 * \ (backslash), in commands:            Execution.
    2721 * \ (backslash), to quote % <1>:         Text Functions.
    2722 * \ (backslash), to quote % <2>:         Static Usage.
    2723 * \ (backslash), to quote %:             Selective Search.
    2724 * __.SYMDEF:                             Archive Symbols.
    2725 * algorithm for directory search:        Search Algorithm.
    2726 * all (standard target):                 Goals.
    2727 * appending to variables:                Appending.
    2728 * ar:                                    Implicit Variables.
    2729 * archive:                               Archives.
    2730 * archive member targets:                Archive Members.
    2731 * archive symbol directory updating:     Archive Symbols.
    2732 * archive, and -j:                       Archive Pitfalls.
    2733 * 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)
    27343513* archive, suffix rule for:              Archive Suffix Rules.
    2735 * Arg list too long:                     Options/Recursion.
    2736 * arguments of functions:                Syntax of Functions.
    2737 * as <1>:                                Implicit Variables.
    2738 * as:                                    Catalogue of Rules.
    2739 * 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)
    27403520* automatic generation of prerequisites <1>: Automatic Prerequisites.
    2741 * automatic generation of prerequisites: Include.
    2742 * automatic variables:                   Automatic Variables.
    2743 * automatic variables in prerequisites:  Automatic Variables.
    2744 * backquotes:                            Shell Function.
    2745 * backslash (\), for continuation lines: Simple Makefile.
    2746 * backslash (\), in commands:            Execution.
    2747 * backslash (\), to quote % <1>:         Text Functions.
    2748 * backslash (\), to quote % <2>:         Static Usage.
    2749 * 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)
    27503531* backslashes in pathnames and wildcard expansion: Wildcard Pitfall.
    2751 * basename:                              File Name Functions.
     3532                                                              (line  31)
     3533* basename:                              File Name Functions. (line  57)
    27523534* binary packages:                       Install Command Categories.
    2753 * broken pipe:                           Parallel.
    2754 * bugs, reporting:                       Bugs.
    2755 * built-in special targets:              Special Targets.
    2756 * C++, rule to compile:                  Catalogue of Rules.
    2757 * C, rule to compile:                    Catalogue of Rules.
    2758 * cc <1>:                                Implicit Variables.
    2759 * cc:                                    Catalogue of Rules.
    2760 * cd (shell command) <1>:                MAKE Variable.
    2761 * cd (shell command):                    Execution.
    2762 * chains of rules:                       Chained Rules.
    2763 * check (standard target):               Goals.
    2764 * clean (standard target):               Goals.
    2765 * clean target <1>:                      Cleanup.
    2766 * clean target:                          Simple Makefile.
    2767 * cleaning up:                           Cleanup.
    2768 * clobber (standard target):             Goals.
    2769 * co <1>:                                Implicit Variables.
    2770 * 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)
    27713554* combining rules by prerequisite:       Combine By Prerequisite.
     3555                                                              (line   6)
    27723556* command line variable definitions, and recursion: Options/Recursion.
    2773 * command line variables:                Overriding.
    2774 * commands:                              Rule Syntax.
    2775 * commands, backslash (\) in:            Execution.
    2776 * commands, comments in:                 Commands.
    2777 * commands, echoing:                     Echoing.
    2778 * commands, empty:                       Empty Commands.
    2779 * commands, errors in:                   Errors.
    2780 * commands, execution:                   Execution.
    2781 * commands, execution in parallel:       Parallel.
    2782 * commands, expansion:                   Shell Function.
    2783 * 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)
    27843571* commands, instead of executing:        Instead of Execution.
    2785 * commands, introduction to:             Rule Introduction.
    2786 * commands, quoting newlines in:         Execution.
    2787 * commands, sequences of:                Sequences.
    2788 * comments, in commands:                 Commands.
    2789 * comments, in makefile:                 Makefile Contents.
    2790 * compatibility:                         Features.
    2791 * compatibility in exporting:            Variables/Recursion.
    2792 * compilation, testing:                  Testing.
    2793 * computed variable name:                Computed Names.
    2794 * conditional expansion:                 If Function.
    2795 * conditional variable assignment:       Flavors.
    2796 * conditionals:                          Conditionals.
    2797 * 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)
    27983590* controlling make:                      Make Control Functions.
     3591                                                              (line   6)
    27993592* conventions for makefiles:             Makefile Conventions.
    2800 * ctangle <1>:                           Implicit Variables.
    2801 * ctangle:                               Catalogue of Rules.
    2802 * cweave <1>:                            Implicit Variables.
    2803 * cweave:                                Catalogue of Rules.
    2804 * data base of make rules:               Options Summary.
    2805 * deducing commands (implicit rules):    make Deduces.
    2806 * default directories for included makefiles: Include.
    2807 * default goal <1>:                      Rules.
    2808 * default goal:                          How Make Works.
    2809 * default makefile name:                 Makefile Names.
    2810 * default rules, last-resort:            Last Resort.
    2811 * define, expansion:                     Reading Makefiles.
    2812 * defining variables verbatim:           Defining.
    2813 * deletion of target files <1>:          Interrupts.
    2814 * deletion of target files:              Errors.
    2815 * directive:                             Makefile Contents.
    2816 * directories, printing them:            -w Option.
    2817 * directories, updating archive symbol:  Archive Symbols.
    2818 * directory part:                        File Name Functions.
    2819 * 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)
    28203614* directory search (VPATH), and implicit rules: Implicit/Search.
     3615                                                              (line   6)
    28213616* directory search (VPATH), and link libraries: Libraries/Search.
     3617                                                              (line   6)
    28223618* directory search (VPATH), and shell commands: Commands/Search.
    2823 * directory search algorithm:            Search Algorithm.
    2824 * directory search, traditional (GPATH): Search Algorithm.
    2825 * dist (standard target):                Goals.
    2826 * distclean (standard target):           Goals.
    2827 * dollar sign ($), in function call:     Syntax of Functions.
    2828 * dollar sign ($), in rules:             Rule Syntax.
    2829 * dollar sign ($), in variable name:     Computed Names.
    2830 * dollar sign ($), in variable reference: Reference.
    2831 * double-colon rules:                    Double-Colon.
    2832 * duplicate words, removing:             Text Functions.
    2833 * E2BIG:                                 Options/Recursion.
    2834 * echoing of commands:                   Echoing.
    2835 * editor:                                Introduction.
    2836 * Emacs (M-x compile):                   Errors.
    2837 * empty commands:                        Empty Commands.
    2838 * empty targets:                         Empty Targets.
    2839 * environment:                           Environment.
    2840 * environment, and recursion:            Variables/Recursion.
    2841 * 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)
    28423640* error, stopping on:                    Make Control Functions.
    2843 * errors (in commands):                  Errors.
    2844 * errors with wildcards:                 Wildcard Pitfall.
    2845 * evaluating makefile syntax:            Eval Function.
    2846 * 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)
    28473646* execution, instead of:                 Instead of Execution.
    2848 * execution, of commands:                Execution.
    2849 * exit status (errors):                  Errors.
    2850 * explicit rule, definition of:          Makefile Contents.
    2851 * explicit rule, expansion:              Reading Makefiles.
    2852 * exporting variables:                   Variables/Recursion.
    2853 * f77 <1>:                               Implicit Variables.
    2854 * 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)
    28553659* FDL, GNU Free Documentation License:   GNU Free Documentation License.
    2856 * features of GNU make:                  Features.
    2857 * features, missing:                     Missing.
    2858 * file name functions:                   File Name Functions.
    2859 * file name of makefile:                 Makefile Names.
    2860 * file name of makefile, how to specify: Makefile Names.
    2861 * file name prefix, adding:              File Name Functions.
    2862 * file name suffix:                      File Name Functions.
    2863 * file name suffix, adding:              File Name Functions.
    2864 * file name with wildcards:              Wildcards.
    2865 * file name, basename of:                File Name Functions.
    2866 * file name, directory part:             File Name Functions.
    2867 * 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)
    28683675* files, assuming new:                   Instead of Execution.
     3676                                                              (line  33)
    28693677* files, assuming old:                   Avoiding Compilation.
     3678                                                              (line   6)
    28703679* files, avoiding recompilation of:      Avoiding Compilation.
    2871 * files, intermediate:                   Chained Rules.
    2872 * filtering out words:                   Text Functions.
    2873 * filtering words:                       Text Functions.
    2874 * finding strings:                       Text Functions.
    2875 * flags:                                 Options Summary.
    2876 * flags for compilers:                   Implicit Variables.
    2877 * flavors of variables:                  Flavors.
    2878 * FORCE:                                 Force Targets.
    2879 * force targets:                         Force Targets.
    2880 * Fortran, rule to compile:              Catalogue of Rules.
    2881 * 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)
    28823693* functions, for controlling make:       Make Control Functions.
    2883 * functions, for file names:             File Name Functions.
    2884 * functions, for text:                   Text Functions.
    2885 * functions, syntax of:                  Syntax of Functions.
    2886 * functions, user defined:               Call Function.
    2887 * g++ <1>:                               Implicit Variables.
    2888 * g++:                                   Catalogue of Rules.
    2889 * 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)
    28903702* generating prerequisites automatically <1>: Automatic Prerequisites.
    2891 * generating prerequisites automatically: Include.
    2892 * get <1>:                               Implicit Variables.
    2893 * get:                                   Catalogue of Rules.
    2894 * globbing (wildcards):                  Wildcards.
    2895 * goal:                                  How Make Works.
    2896 * goal, default <1>:                     Rules.
    2897 * goal, default:                         How Make Works.
    2898 * goal, how to specify:                  Goals.
    2899 * home directory:                        Wildcards.
    2900 * IEEE Standard 1003.2:                  Overview.
    2901 * ifdef, expansion:                      Reading Makefiles.
    2902 * ifeq, expansion:                       Reading Makefiles.
    2903 * ifndef, expansion:                     Reading Makefiles.
    2904 * ifneq, expansion:                      Reading Makefiles.
    2905 * implicit rule:                         Implicit Rules.
    2906 * implicit rule, and directory search:   Implicit/Search.
    2907 * implicit rule, and VPATH:              Implicit/Search.
    2908 * implicit rule, definition of:          Makefile Contents.
    2909 * implicit rule, expansion:              Reading Makefiles.
    2910 * implicit rule, how to use:             Using Implicit.
    2911 * implicit rule, introduction to:        make Deduces.
    2912 * 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)
    29133726* implicit rule, search algorithm:       Implicit Rule Search.
    2914 * 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)
    29153731* including (MAKEFILE_LIST variable):    MAKEFILE_LIST Variable.
    2916 * including (MAKEFILES variable):        MAKEFILES Variable.
    2917 * including other makefiles:             Include.
    2918 * incompatibilities:                     Missing.
    2919 * Info, rule to format:                  Catalogue of Rules.
    2920 * install (standard target):             Goals.
    2921 * intermediate files:                    Chained Rules.
    2922 * intermediate files, preserving:        Chained Rules.
    2923 * intermediate targets, explicit:        Special Targets.
    2924 * interrupt:                             Interrupts.
    2925 * job slots:                             Parallel.
    2926 * job slots, and recursion:              Options/Recursion.
    2927 * jobs, limiting based on load:          Parallel.
    2928 * joining lists of words:                File Name Functions.
    2929 * killing (interruption):                Interrupts.
    2930 * last-resort default rules:             Last Resort.
    2931 * ld:                                    Catalogue of Rules.
    2932 * lex <1>:                               Implicit Variables.
    2933 * lex:                                   Catalogue of Rules.
    2934 * Lex, rule to run:                      Catalogue of Rules.
    2935 * 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)
    29363753* library archive, suffix rule for:      Archive Suffix Rules.
    2937 * limiting jobs based on load:           Parallel.
    2938 * link libraries, and directory search:  Libraries/Search.
    2939 * link libraries, patterns matching:     Libraries/Search.
    2940 * linking, predefined rule for:          Catalogue of Rules.
    2941 * lint:                                  Catalogue of Rules.
    2942 * lint, rule to run:                     Catalogue of Rules.
    2943 * list of all prerequisites:             Automatic Variables.
    2944 * list of changed prerequisites:         Automatic Variables.
    2945 * load average:                          Parallel.
    2946 * loops in variable expansion:           Flavors.
    2947 * lpr (shell command) <1>:               Empty Targets.
    2948 * lpr (shell command):                   Wildcard Examples.
    2949 * m2c:                                   Catalogue of Rules.
    2950 * 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)
    29513771* make depend:                           Automatic Prerequisites.
    2952 * MAKECMDGOALS:                          Goals.
    2953 * makefile:                              Introduction.
    2954 * makefile name:                         Makefile Names.
    2955 * makefile name, how to specify:         Makefile Names.
    2956 * makefile rule parts:                   Rule Introduction.
    2957 * makefile syntax, evaluating:           Eval Function.
    2958 * 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)
    29593779* makefile, conventions for:             Makefile Conventions.
    2960 * makefile, how make processes:          How Make Works.
    2961 * makefile, how to write:                Makefiles.
    2962 * 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)
    29633784* makefile, overriding:                  Overriding Makefiles.
    2964 * makefile, parsing:                     Reading Makefiles.
    2965 * makefile, remaking of:                 Remaking Makefiles.
    2966 * 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)
    29673789* makefiles, and MAKEFILE_LIST variable: MAKEFILE_LIST Variable.
    2968 * makefiles, and special variables:      Special Variables.
    2969 * makeinfo <1>:                          Implicit Variables.
    2970 * 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)
    29713794* match-anything rule:                   Match-Anything Rules.
     3795                                                              (line   6)
    29723796* match-anything rule, used to override: Overriding Makefiles.
    2973 * missing features:                      Missing.
    2974 * mistakes with wildcards:               Wildcard Pitfall.
    2975 * modified variable reference:           Substitution Refs.
    2976 * Modula-2, rule to compile:             Catalogue of Rules.
    2977 * mostlyclean (standard target):         Goals.
    2978 * multiple rules for one target:         Multiple Rules.
    2979 * multiple rules for one target (::):    Double-Colon.
    2980 * multiple targets:                      Multiple Targets.
    2981 * multiple targets, in pattern rule:     Pattern Intro.
    2982 * name of makefile:                      Makefile Names.
    2983 * name of makefile, how to specify:      Makefile Names.
    2984 * nested variable reference:             Computed Names.
    2985 * newline, quoting, in commands:         Execution.
    2986 * newline, quoting, in makefile:         Simple Makefile.
    2987 * nondirectory part:                     File Name Functions.
    2988 * normal prerequisites:                  Prerequisite Types.
    2989 * OBJ:                                   Variables Simplify.
    2990 * obj:                                   Variables Simplify.
    2991 * OBJECTS:                               Variables Simplify.
    2992 * objects:                               Variables Simplify.
    2993 * OBJS:                                  Variables Simplify.
    2994 * objs:                                  Variables Simplify.
    2995 * old-fashioned suffix rules:            Suffix Rules.
    2996 * options:                               Options Summary.
    2997 * options, and recursion:                Options/Recursion.
    2998 * options, setting from environment:     Options/Recursion.
    2999 * options, setting in makefiles:         Options/Recursion.
    3000 * order of pattern rules:                Pattern Intro.
    3001 * order-only prerequisites:              Prerequisite Types.
    3002 * 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)
    30033828* overriding makefiles:                  Overriding Makefiles.
    3004 * overriding variables with arguments:   Overriding.
    3005 * overriding with override:              Override Directive.
    3006 * parallel execution:                    Parallel.
    3007 * parallel execution, and archive update: Archive Pitfalls.
    3008 * parallel execution, overriding:        Special Targets.
    3009 * parts of makefile rule:                Rule Introduction.
    3010 * Pascal, rule to compile:               Catalogue of Rules.
    3011 * pattern rule:                          Pattern Intro.
    3012 * pattern rule, expansion:               Reading Makefiles.
    3013 * pattern rules, order of:               Pattern Intro.
    3014 * pattern rules, static (not implicit):  Static Pattern.
    3015 * pattern rules, static, syntax of:      Static Usage.
    3016 * pattern-specific variables:            Pattern-specific.
    3017 * pc <1>:                                Implicit Variables.
    3018 * pc:                                    Catalogue of Rules.
    3019 * phony targets:                         Phony Targets.
    3020 * pitfalls of wildcards:                 Wildcard Pitfall.
    3021 * portability:                           Features.
    3022 * POSIX:                                 Overview.
    3023 * 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)
    30243850* post-installation commands:            Install Command Categories.
     3851                                                              (line   6)
    30253852* pre-installation commands:             Install Command Categories.
    3026 * precious targets:                      Special Targets.
    3027 * predefined rules and variables, printing: Options Summary.
    3028 * prefix, adding:                        File Name Functions.
    3029 * prerequisite:                          Rules.
    3030 * prerequisite pattern, implicit:        Pattern Intro.
    3031 * prerequisite pattern, static (not implicit): Static Usage.
    3032 * prerequisite types:                    Prerequisite Types.
    3033 * prerequisite, expansion:               Reading Makefiles.
    3034 * 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)
    30353863* prerequisites, and automatic variables: Automatic Variables.
     3864                                                              (line  17)
    30363865* prerequisites, automatic generation <1>: Automatic Prerequisites.
    3037 * prerequisites, automatic generation:   Include.
    3038 * prerequisites, introduction to:        Rule Introduction.
    3039 * prerequisites, list of all:            Automatic Variables.
    3040 * prerequisites, list of changed:        Automatic Variables.
    3041 * prerequisites, normal:                 Prerequisite Types.
    3042 * prerequisites, order-only:             Prerequisite Types.
    3043 * prerequisites, varying (static pattern): Static Pattern.
    3044 * preserving intermediate files:         Chained Rules.
    3045 * preserving with .PRECIOUS <1>:         Chained Rules.
    3046 * preserving with .PRECIOUS:             Special Targets.
    3047 * preserving with .SECONDARY:            Special Targets.
    3048 * print (standard target):               Goals.
    3049 * print target <1>:                      Empty Targets.
    3050 * print target:                          Wildcard Examples.
    3051 * printing directories:                  -w Option.
    3052 * 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)
    30533885* printing user warnings:                Make Control Functions.
    3054 * problems and bugs, reporting:          Bugs.
    3055 * problems with wildcards:               Wildcard Pitfall.
    3056 * 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)
    30573890* question mode:                         Instead of Execution.
    3058 * quoting %, in patsubst:                Text Functions.
    3059 * quoting %, in static pattern:          Static Usage.
    3060 * quoting %, in vpath:                   Selective Search.
    3061 * quoting newline, in commands:          Execution.
    3062 * quoting newline, in makefile:          Simple Makefile.
    3063 * Ratfor, rule to compile:               Catalogue of Rules.
    3064 * RCS, rule to extract from:             Catalogue of Rules.
    3065 * reading makefiles:                     Reading Makefiles.
    3066 * README:                                Makefile Names.
    3067 * realclean (standard target):           Goals.
    3068 * 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)
    30693904* recompilation, avoiding:               Avoiding Compilation.
    3070 * recording events with empty targets:   Empty Targets.
    3071 * recursion:                             Recursion.
    3072 * recursion, and -C:                     Options/Recursion.
    3073 * recursion, and -f:                     Options/Recursion.
    3074 * recursion, and -j:                     Options/Recursion.
    3075 * recursion, and -o:                     Options/Recursion.
    3076 * recursion, and -t:                     MAKE Variable.
    3077 * recursion, and -w:                     -w Option.
    3078 * 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)
    30793915* recursion, and command line variable definitions: Options/Recursion.
    3080 * recursion, and environment:            Variables/Recursion.
    3081 * recursion, and MAKE variable:          MAKE Variable.
    3082 * recursion, and MAKEFILES variable:     MAKEFILES Variable.
    3083 * recursion, and options:                Options/Recursion.
    3084 * recursion, and printing directories:   -w Option.
    3085 * recursion, and variables:              Variables/Recursion.
    3086 * recursion, level of:                   Variables/Recursion.
    3087 * recursive variable expansion <1>:      Flavors.
    3088 * recursive variable expansion:          Using Variables.
    3089 * recursively expanded variables:        Flavors.
    3090 * reference to variables <1>:            Advanced.
    3091 * reference to variables:                Reference.
    3092 * relinking:                             How Make Works.
    3093 * remaking makefiles:                    Remaking Makefiles.
    3094 * removal of target files <1>:           Interrupts.
    3095 * removal of target files:               Errors.
    3096 * removing duplicate words:              Text Functions.
    3097 * removing targets on failure:           Special Targets.
    3098 * removing, to clean up:                 Cleanup.
    3099 * reporting bugs:                        Bugs.
    3100 * rm:                                    Implicit Variables.
    3101 * rm (shell command) <1>:                Errors.
    3102 * rm (shell command) <2>:                Phony Targets.
    3103 * rm (shell command) <3>:                Wildcard Examples.
    3104 * rm (shell command):                    Simple Makefile.
    3105 * rule commands:                         Commands.
    3106 * rule prerequisites:                    Rule Syntax.
    3107 * rule syntax:                           Rule Syntax.
    3108 * rule targets:                          Rule Syntax.
    3109 * rule, and $:                           Rule Syntax.
    3110 * rule, double-colon (::):               Double-Colon.
    3111 * rule, explicit, definition of:         Makefile Contents.
    3112 * rule, how to write:                    Rules.
    3113 * rule, implicit:                        Implicit Rules.
    3114 * rule, implicit, and directory search:  Implicit/Search.
    3115 * rule, implicit, and VPATH:             Implicit/Search.
    3116 * rule, implicit, chains of:             Chained Rules.
    3117 * rule, implicit, definition of:         Makefile Contents.
    3118 * rule, implicit, how to use:            Using Implicit.
    3119 * rule, implicit, introduction to:       make Deduces.
    3120 * rule, implicit, predefined:            Catalogue of Rules.
    3121 * rule, introduction to:                 Rule Introduction.
    3122 * rule, multiple for one target:         Multiple Rules.
    3123 * rule, no commands or prerequisites:    Force Targets.
    3124 * rule, pattern:                         Pattern Intro.
    3125 * 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)
    31263962* rule, static pattern versus implicit:  Static versus Implicit.
    3127 * rule, with multiple targets:           Multiple Targets.
    3128 * s. (SCCS file prefix):                 Catalogue of Rules.
    3129 * 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)
    31303968* search algorithm, implicit rule:       Implicit Rule Search.
    3131 * search path for prerequisites (VPATH): Directory Search.
     3969                                                              (line   6)
     3970* search path for prerequisites (VPATH): Directory Search.    (line   6)
    31323971* search path for prerequisites (VPATH), and implicit rules: Implicit/Search.
     3972                                                              (line   6)
    31333973* search path for prerequisites (VPATH), and link libraries: Libraries/Search.
    3134 * searching for strings:                 Text Functions.
    3135 * secondary files:                       Chained Rules.
    3136 * 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)
    31373985* sed (shell command):                   Automatic Prerequisites.
    3138 * selecting a word:                      Text Functions.
    3139 * selecting word lists:                  Text Functions.
    3140 * sequences of commands:                 Sequences.
    3141 * setting options from environment:      Options/Recursion.
    3142 * setting options in makefiles:          Options/Recursion.
    3143 * setting variables:                     Setting.
    3144 * several rules for one target:          Multiple Rules.
    3145 * several targets in a rule:             Multiple Targets.
    3146 * shar (standard target):                Goals.
    3147 * shell command:                         Simple Makefile.
    3148 * shell command, and directory search:   Commands/Search.
    3149 * shell command, execution:              Execution.
    3150 * shell command, function for:           Shell Function.
    3151 * shell file name pattern (in include):  Include.
    3152 * shell wildcards (in include):          Include.
    3153 * SHELL, MS-DOS specifics:               Execution.
    3154 * signal:                                Interrupts.
    3155 * silent operation:                      Echoing.
    3156 * simple makefile:                       Simple Makefile.
    3157 * simple variable expansion:             Using Variables.
    3158 * simplifying with variables:            Variables Simplify.
    3159 * simply expanded variables:             Flavors.
    3160 * sorting words:                         Text Functions.
    3161 * spaces, in variable values:            Flavors.
    3162 * spaces, stripping:                     Text Functions.
    3163 * special targets:                       Special Targets.
    3164 * special variables:                     Special Variables.
    3165 * specifying makefile name:              Makefile Names.
    3166 * standard input:                        Parallel.
    3167 * 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)
    31684024* standards for makefiles:               Makefile Conventions.
    3169 * static pattern rule:                   Static Pattern.
    3170 * 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)
    31714028* static pattern rule, versus implicit:  Static versus Implicit.
    3172 * stem <1>:                              Pattern Match.
    3173 * stem:                                  Static Usage.
    3174 * 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)
    31754035* stopping make:                         Make Control Functions.
    3176 * strings, searching for:                Text Functions.
    3177 * stripping whitespace:                  Text Functions.
    3178 * sub-make:                              Variables/Recursion.
    3179 * subdirectories, recursion for:         Recursion.
    3180 * substitution variable reference:       Substitution Refs.
    3181 * 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)
    31824043* suffix rule, for archive:              Archive Suffix Rules.
    3183 * suffix, adding:                        File Name Functions.
    3184 * suffix, function to find:              File Name Functions.
    3185 * suffix, substituting in variables:     Substitution Refs.
    3186 * switches:                              Options Summary.
    3187 * symbol directories, updating archive:  Archive Symbols.
    3188 * syntax of rules:                       Rule Syntax.
    3189 * tab character (in commands):           Rule Syntax.
    3190 * tabs in rules:                         Rule Introduction.
    3191 * TAGS (standard target):                Goals.
    3192 * tangle <1>:                            Implicit Variables.
    3193 * tangle:                                Catalogue of Rules.
    3194 * tar (standard target):                 Goals.
    3195 * target:                                Rules.
    3196 * target pattern, implicit:              Pattern Intro.
    3197 * target pattern, static (not implicit): Static Usage.
    3198 * target, deleting on error:             Errors.
    3199 * target, deleting on interrupt:         Interrupts.
    3200 * target, expansion:                     Reading Makefiles.
    3201 * target, multiple in pattern rule:      Pattern Intro.
    3202 * 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)
    32034066* target, touching:                      Instead of Execution.
    3204 * target-specific variables:             Target-specific.
    3205 * targets:                               Rule Syntax.
    3206 * targets without a file:                Phony Targets.
    3207 * targets, built-in special:             Special Targets.
    3208 * targets, empty:                        Empty Targets.
    3209 * targets, force:                        Force Targets.
    3210 * targets, introduction to:              Rule Introduction.
    3211 * targets, multiple:                     Multiple Targets.
    3212 * 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)
    32134077* terminal rule:                         Match-Anything Rules.
    3214 * test (standard target):                Goals.
    3215 * testing compilation:                   Testing.
    3216 * tex <1>:                               Implicit Variables.
    3217 * tex:                                   Catalogue of Rules.
    3218 * TeX, rule to run:                      Catalogue of Rules.
    3219 * texi2dvi <1>:                          Implicit Variables.
    3220 * texi2dvi:                              Catalogue of Rules.
    3221 * Texinfo, rule to format:               Catalogue of Rules.
    3222 * tilde (~):                             Wildcards.
    3223 * touch (shell command) <1>:             Empty Targets.
    3224 * 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)
    32254090* touching files:                        Instead of Execution.
    3226 * traditional directory search (GPATH):  Search Algorithm.
    3227 * types of prerequisites:                Prerequisite Types.
    3228 * undefined variables, warning message:  Options Summary.
    3229 * updating archive symbol directories:   Archive Symbols.
    3230 * updating makefiles:                    Remaking Makefiles.
    3231 * user defined functions:                Call Function.
    3232 * value:                                 Using Variables.
    3233 * value, how a variable gets it:         Values.
    3234 * variable:                              Using Variables.
    3235 * variable definition:                   Makefile Contents.
    3236 * variables:                             Variables Simplify.
    3237 * variables, $ in name:                  Computed Names.
    3238 * variables, and implicit rule:          Automatic Variables.
    3239 * variables, appending to:               Appending.
    3240 * variables, automatic:                  Automatic Variables.
    3241 * variables, command line:               Overriding.
    3242 * variables, command line, and recursion: Options/Recursion.
    3243 * variables, computed names:             Computed Names.
    3244 * variables, conditional assignment:     Flavors.
    3245 * variables, defining verbatim:          Defining.
    3246 * variables, environment <1>:            Environment.
    3247 * variables, environment:                Variables/Recursion.
    3248 * variables, exporting:                  Variables/Recursion.
    3249 * variables, flavors:                    Flavors.
    3250 * variables, how they get their values:  Values.
    3251 * variables, how to reference:           Reference.
    3252 * variables, loops in expansion:         Flavors.
    3253 * variables, modified reference:         Substitution Refs.
    3254 * variables, nested references:          Computed Names.
    3255 * variables, origin of:                  Origin Function.
    3256 * variables, overriding:                 Override Directive.
    3257 * variables, overriding with arguments:  Overriding.
    3258 * variables, pattern-specific:           Pattern-specific.
    3259 * variables, recursively expanded:       Flavors.
    3260 * variables, setting:                    Setting.
    3261 * variables, simply expanded:            Flavors.
    3262 * variables, spaces in values:           Flavors.
    3263 * variables, substituting suffix in:     Substitution Refs.
    3264 * variables, substitution reference:     Substitution Refs.
    3265 * variables, target-specific:            Target-specific.
    3266 * variables, unexpanded value:           Value Function.
    3267 * variables, warning for undefined:      Options Summary.
    3268 * varying prerequisites:                 Static Pattern.
    3269 * verbatim variable definition:          Defining.
    3270 * vpath:                                 Directory Search.
    3271 * VPATH, and implicit rules:             Implicit/Search.
    3272 * 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)
    32734142* warnings, printing:                    Make Control Functions.
    3274 * weave <1>:                             Implicit Variables.
    3275 * weave:                                 Catalogue of Rules.
    3276 * 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)
    32774147* what if:                               Instead of Execution.
    3278 * whitespace, in variable values:        Flavors.
    3279 * whitespace, stripping:                 Text Functions.
    3280 * wildcard:                              Wildcards.
    3281 * wildcard pitfalls:                     Wildcard Pitfall.
    3282 * wildcard, function:                    File Name Functions.
    3283 * wildcard, in archive member:           Archive Members.
    3284 * 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)
    32854156* wildcards and MS-DOS/MS-Windows backslashes: Wildcard Pitfall.
    3286 * word, selecting a:                     Text Functions.
    3287 * words, extracting first:               Text Functions.
    3288 * words, filtering:                      Text Functions.
    3289 * words, filtering out:                  Text Functions.
    3290 * words, finding number:                 Text Functions.
    3291 * words, iterating over:                 Foreach Function.
    3292 * words, joining lists:                  File Name Functions.
    3293 * words, removing duplicates:            Text Functions.
    3294 * words, selecting lists of:             Text Functions.
    3295 * writing rule commands:                 Commands.
    3296 * writing rules:                         Rules.
    3297 * yacc <1>:                              Implicit Variables.
    3298 * yacc <2>:                              Catalogue of Rules.
    3299 * yacc:                                  Sequences.
    3300 * Yacc, rule to run:                     Catalogue of Rules.
    3301 * ~ (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)
    33024176
    33034177
     
    33074181*******************************************
    33084182
     4183[index]
    33094184* Menu:
    33104185
    3311 * $$(@D):                                Automatic Variables.
    3312 * $$(@F):                                Automatic Variables.
    3313 * $$@:                                   Automatic Variables.
    3314 * $%:                                    Automatic Variables.
    3315 * $(%D):                                 Automatic Variables.
    3316 * $(%F):                                 Automatic Variables.
    3317 * $(*D):                                 Automatic Variables.
    3318 * $(*F):                                 Automatic Variables.
    3319 * $(+D):                                 Automatic Variables.
    3320 * $(+F):                                 Automatic Variables.
    3321 * $(.VARIABLES):                         Special Variables.
    3322 * $(<D):                                 Automatic Variables.
    3323 * $(<F):                                 Automatic Variables.
    3324 * $(?D):                                 Automatic Variables.
    3325 * $(?F):                                 Automatic Variables.
    3326 * $(@D):                                 Automatic Variables.
    3327 * $(@F):                                 Automatic Variables.
    3328 * $(^D):                                 Automatic Variables.
    3329 * $(^F):                                 Automatic Variables.
    3330 * $*:                                    Automatic Variables.
    3331 * $*, and static pattern:                Static Usage.
    3332 * $+:                                    Automatic Variables.
    3333 * $<:                                    Automatic Variables.
    3334 * $?:                                    Automatic Variables.
    3335 * $@:                                    Automatic Variables.
    3336 * $^:                                    Automatic Variables.
    3337 * % (automatic variable):                Automatic Variables.
    3338 * %D (automatic variable):               Automatic Variables.
    3339 * %F (automatic variable):               Automatic Variables.
    3340 * * (automatic variable):                Automatic Variables.
    3341 * * (automatic variable), unsupported bizarre usage: Missing.
    3342 * *D (automatic variable):               Automatic Variables.
    3343 * *F (automatic variable):               Automatic Variables.
    3344 * + (automatic variable):                Automatic Variables.
    3345 * +D (automatic variable):               Automatic Variables.
    3346 * +F (automatic variable):               Automatic Variables.
    3347 * .DEFAULT <1>:                          Last Resort.
    3348 * .DEFAULT:                              Special Targets.
    3349 * .DEFAULT, and empty commands:          Empty Commands.
    3350 * .DELETE_ON_ERROR <1>:                  Errors.
    3351 * .DELETE_ON_ERROR:                      Special Targets.
    3352 * .EXPORT_ALL_VARIABLES <1>:             Variables/Recursion.
    3353 * .EXPORT_ALL_VARIABLES:                 Special Targets.
    3354 * .IGNORE <1>:                           Errors.
    3355 * .IGNORE:                               Special Targets.
    3356 * .INTERMEDIATE:                         Special Targets.
    3357 * .LIBPATTERNS:                          Libraries/Search.
    3358 * .LOW_RESOLUTION_TIME:                  Special Targets.
    3359 * .NOTPARALLEL:                          Special Targets.
    3360 * .PHONY <1>:                            Special Targets.
    3361 * .PHONY:                                Phony Targets.
    3362 * .POSIX:                                Options/Recursion.
    3363 * .PRECIOUS <1>:                         Interrupts.
    3364 * .PRECIOUS:                             Special Targets.
    3365 * .SECONDARY:                            Special Targets.
    3366 * .SILENT <1>:                           Echoing.
    3367 * .SILENT:                               Special Targets.
    3368 * .SUFFIXES <1>:                         Suffix Rules.
    3369 * .SUFFIXES:                             Special Targets.
    3370 * .VARIABLES (list of variables):        Special Variables.
    3371 * /usr/gnu/include:                      Include.
    3372 * /usr/include:                          Include.
    3373 * /usr/local/include:                    Include.
    3374 * < (automatic variable):                Automatic Variables.
    3375 * <D (automatic variable):               Automatic Variables.
    3376 * <F (automatic variable):               Automatic Variables.
    3377 * ? (automatic variable):                Automatic Variables.
    3378 * ?D (automatic variable):               Automatic Variables.
    3379 * ?F (automatic variable):               Automatic Variables.
    3380 * @ (automatic variable):                Automatic Variables.
    3381 * @D (automatic variable):               Automatic Variables.
    3382 * @F (automatic variable):               Automatic Variables.
    3383 * ^ (automatic variable):                Automatic Variables.
    3384 * ^D (automatic variable):               Automatic Variables.
    3385 * ^F (automatic variable):               Automatic Variables.
    3386 * addprefix:                             File Name Functions.
    3387 * addsuffix:                             File Name Functions.
    3388 * AR:                                    Implicit Variables.
    3389 * ARFLAGS:                               Implicit Variables.
    3390 * AS:                                    Implicit Variables.
    3391 * ASFLAGS:                               Implicit Variables.
    3392 * basename:                              File Name Functions.
    3393 * bindir:                                Directory Variables.
    3394 * call:                                  Call Function.
    3395 * CC:                                    Implicit Variables.
    3396 * CFLAGS:                                Implicit Variables.
    3397 * CO:                                    Implicit Variables.
    3398 * COFLAGS:                               Implicit Variables.
    3399 * COMSPEC:                               Execution.
    3400 * CPP:                                   Implicit Variables.
    3401 * CPPFLAGS:                              Implicit Variables.
    3402 * CTANGLE:                               Implicit Variables.
    3403 * CURDIR:                                Recursion.
    3404 * CWEAVE:                                Implicit Variables.
    3405 * CXX:                                   Implicit Variables.
    3406 * CXXFLAGS:                              Implicit Variables.
    3407 * define:                                Defining.
    3408 * dir:                                   File Name Functions.
    3409 * else:                                  Conditional Syntax.
    3410 * endef:                                 Defining.
    3411 * 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)
    34124293* error:                                 Make Control Functions.
    3413 * eval:                                  Eval Function.
    3414 * exec_prefix:                           Directory Variables.
    3415 * export:                                Variables/Recursion.
    3416 * FC:                                    Implicit Variables.
    3417 * FFLAGS:                                Implicit Variables.
    3418 * filter:                                Text Functions.
    3419 * filter-out:                            Text Functions.
    3420 * findstring:                            Text Functions.
    3421 * firstword:                             Text Functions.
    3422 * foreach:                               Foreach Function.
    3423 * GET:                                   Implicit Variables.
    3424 * GFLAGS:                                Implicit Variables.
    3425 * GNUmakefile:                           Makefile Names.
    3426 * GPATH:                                 Search Algorithm.
    3427 * if:                                    If Function.
    3428 * ifdef:                                 Conditional Syntax.
    3429 * ifeq:                                  Conditional Syntax.
    3430 * ifndef:                                Conditional Syntax.
    3431 * ifneq:                                 Conditional Syntax.
    3432 * include:                               Include.
    3433 * join:                                  File Name Functions.
    3434 * LDFLAGS:                               Implicit Variables.
    3435 * LEX:                                   Implicit Variables.
    3436 * LFLAGS:                                Implicit Variables.
    3437 * libexecdir:                            Directory Variables.
    3438 * MAKE <1>:                              Flavors.
    3439 * MAKE:                                  MAKE Variable.
    3440 * MAKECMDGOALS:                          Goals.
    3441 * makefile:                              Makefile Names.
    3442 * Makefile:                              Makefile Names.
    3443 * MAKEFILES <1>:                         Variables/Recursion.
    3444 * MAKEFILES:                             MAKEFILES Variable.
    3445 * MAKEFLAGS:                             Options/Recursion.
    3446 * MAKEINFO:                              Implicit Variables.
    3447 * MAKELEVEL <1>:                         Flavors.
    3448 * MAKELEVEL:                             Variables/Recursion.
    3449 * MAKEOVERRIDES:                         Options/Recursion.
    3450 * MFLAGS:                                Options/Recursion.
    3451 * notdir:                                File Name Functions.
    3452 * origin:                                Origin Function.
    3453 * OUTPUT_OPTION:                         Catalogue of Rules.
    3454 * override:                              Override Directive.
    3455 * patsubst <1>:                          Text Functions.
    3456 * patsubst:                              Substitution Refs.
    3457 * PC:                                    Implicit Variables.
    3458 * PFLAGS:                                Implicit Variables.
    3459 * prefix:                                Directory Variables.
    3460 * RFLAGS:                                Implicit Variables.
    3461 * RM:                                    Implicit Variables.
    3462 * sbindir:                               Directory Variables.
    3463 * shell:                                 Shell Function.
    3464 * SHELL:                                 Execution.
    3465 * SHELL (command execution):             Execution.
    3466 * sort:                                  Text Functions.
    3467 * strip:                                 Text Functions.
    3468 * subst <1>:                             Text Functions.
    3469 * subst:                                 Multiple Targets.
    3470 * suffix:                                File Name Functions.
    3471 * SUFFIXES:                              Suffix Rules.
    3472 * TANGLE:                                Implicit Variables.
    3473 * TEX:                                   Implicit Variables.
    3474 * TEXI2DVI:                              Implicit Variables.
    3475 * unexport:                              Variables/Recursion.
    3476 * value:                                 Value Function.
    3477 * vpath:                                 Selective Search.
    3478 * VPATH:                                 General Search.
    3479 * vpath:                                 Directory Search.
    3480 * 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)
    34814381* warning:                               Make Control Functions.
    3482 * WEAVE:                                 Implicit Variables.
    3483 * wildcard <1>:                          File Name Functions.
    3484 * wildcard:                              Wildcard Function.
    3485 * word:                                  Text Functions.
    3486 * wordlist:                              Text Functions.
    3487 * words:                                 Text Functions.
    3488 * YACC:                                  Implicit Variables.
    3489 * YACCR:                                 Implicit Variables.
    3490 * YFLAGS:                                Implicit Variables.
    3491 
    3492 
     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
  • vendor/gnumake/current/doc/make.texi

    r280 r501  
    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.