VirtualBox

Changeset 903 in kBuild for trunk/src/gmakenew/doc


Ignore:
Timestamp:
May 23, 2007 5:31:19 AM (18 years ago)
Author:
bird
Message:

Merged with the 2007-05-23 CVS. Added rsort and fixed a couple of windows build issues.

Location:
trunk/src/gmakenew/doc
Files:
8 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmakenew/doc/make.texi

    r503 r903  
    55@include version.texi
    66@set EDITION 0.70
    7 @set RCSID $Id: make.texi,v 1.45 2006/04/01 06:36:40 psmith Exp $
     7@set RCSID $Id: make.texi,v 1.47 2007/05/11 20:57:21 psmith Exp $
    88
    99@settitle GNU @code{make}
     
    5151
    5252
    53 @dircategory GNU Packages
     53@dircategory Software development
    5454@direntry
    5555* Make: (make).            Remake files automatically.
     
    10101010specially in certain situations.
    10111011
     1012You cannot use comments within variable references or function calls:
     1013any instance of @code{#} will be treated literally (rather than as the
     1014start of a comment) inside a variable reference or function call.
     1015
    10121016Within a command script (if the line begins with a TAB character) the
    10131017entire line is passed to the shell, just as with any other line that
     
    12521256@end example
    12531257
    1254 @xref{Text Functions}, for more information on the @code{word} and
    1255 @code{words} functions used above.  @xref{Flavors, The Two Flavors of
    1256 Variables}, for more information on simply-expanded (@code{:=})
    1257 variable definitions.
     1258@xref{Text Functions}, for more information on the @code{lastword}
     1259function used above.  @xref{Flavors, The Two Flavors of Variables},
     1260for more information on simply-expanded (@code{:=}) variable
     1261definitions.
    12581262
    12591263@node Special Variables, Remaking Makefiles, MAKEFILE_LIST Variable, Makefiles
     
    17451749@code{foo.1 bar.1} respectively.  In the third they will have values
    17461750@code{foo.1}, @code{foo.1 bar.1 foo.2 bar.2}, and @code{foo.1 bar.1
    1747 foo.2 bar.2} respectively.
     1751foo.2 bar.2 foo.1 foo.1 bar.1 foo.1 bar.1} respectively.
    17481752
    17491753Rules undergo secondary expansion in makefile order, except that
     
    19381942Variables, ,How to Use Variables}).  If you have enabled secondary
    19391943expansion (@pxref{Secondary Expansion}) and you want a literal dollar
    1940 sign in the prerequisites lise, you must actually write @emph{four}
     1944sign in the prerequisites list, you must actually write @emph{four}
    19411945dollar signs (@samp{$$$$}).
    19421946
     
    20012005The normal prerequisites section may of course be empty.  Also, you
    20022006may still declare multiple lines of prerequisites for the same target:
    2003 they are appended appropriately.  Note that if you declare the same
    2004 file to be both a normal and an order-only prerequisite, the normal
    2005 prerequisite takes precedence (since they are a strict superset of the
    2006 behavior of an order-only prerequisite).
     2007they are appended appropriately (normal prerequisites are appended to
     2008the list of normal prerequisites; order-only prerequisites are
     2009appended to the list of order-only prerequisites).  Note that if you
     2010declare the same file to be both a normal and an order-only
     2011prerequisite, the normal prerequisite takes precedence (since they
     2012have a strict superset of the behavior of an order-only prerequisite).
     2013
     2014Consider an example where your targets are to be placed in a separate
     2015directory, and that directory might not exist before @code{make} is
     2016run.  In this situation, you want the directory to be created before
     2017any targets are placed into it but, because the timestamps on
     2018directories change whenever a file is added, removed, or renamed, we
     2019certainly don't want to rebuild all the targets whenever the
     2020directory's timestamp changes.  One way to manage this is with
     2021order-only prerequisites: make the directory an order-only
     2022prerequisite on all the targets:
     2023
     2024@example
     2025OBJDIR := objdir
     2026OBJS := $(addprefix $(OBJDIR)/,foo.o bar.o baz.o)
     2027
     2028$(OBJDIR)/%.o : %.c
     2029        $(COMPILE.c) $(OUTPUT_OPTION) $<
     2030
     2031all: $(OBJS)
     2032
     2033$(OBJS): | $(OBJDIR)
     2034
     2035$(OBJDIR):
     2036        mkdir $(OBJDIR)
     2037@end example
     2038
     2039Now the rule to create the @file{objdir} directory will be run, if
     2040needed, before any @samp{.o} is built, but no @samp{.o} will be built
     2041because the @file{objdir} directory timestamp changed.
    20072042
    20082043@node Wildcards, Directory Search, Prerequisite Types, Rules
     
    29062941@xref{Secondary Expansion, ,Secondary Expansion}.
    29072942
    2908 The prerequisites of the special target @code{.SUFFIXES} are the list
    2909 of suffixes to be used in checking for suffix rules.
    2910 @xref{Suffix Rules, , Old-Fashioned Suffix Rules}.
    2911 
    29122943@findex .DELETE_ON_ERROR
    29132944@item .DELETE_ON_ERROR
     
    29963027@cindex parallel execution, overriding
    29973028
    2998 If @code{.NOTPARALLEL} is mentioned as a target, then this invocation of
    2999 @code{make} will be run serially, even if the @samp{-j} option is
    3000 given.  Any recursively invoked @code{make} command will still be run in
    3001 parallel (unless its makefile contains this target).  Any prerequisites
    3002 on this target are ignored.
     3029If @code{.NOTPARALLEL} is mentioned as a target, then this invocation
     3030of @code{make} will be run serially, even if the @samp{-j} option is
     3031given.  Any recursively invoked @code{make} command will still run
     3032commands in parallel (unless its makefile also contains this target).
     3033Any prerequisites on this target are ignored.
    30033034@end table
    30043035
     
    30943125if the file's name begins with a dot, no error message is printed.
    30953126This odd behavior is only for compatibility with other implementations
    3096 of @code{make}... you should avoid using it).  Occasionally it is
     3127of @code{make}@dots{} you should avoid using it).  Occasionally it is
    30973128useful to have the same target invoke multiple commands which are
    30983129defined in different parts of your makefile; you can use
     
    36533684
    36543685@noindent
    3655 Notice how the backslash/newline pair was removed inside the string quoted
    3656 with double quotes (@code{"..."}), but not from the string quoted with single
    3657 quotes (@code{'...'}).  This is the way the default shell (@file{/bin/sh})
    3658 handles backslash/newline pairs.  If you specify a different shell in your
    3659 makefiles it may treat them differently.
     3686Notice how the backslash/newline pair was removed inside the string
     3687quoted with double quotes (@code{"@dots{}"}), but not from the string
     3688quoted with single quotes (@code{'@dots{}'}).  This is the way the
     3689default shell (@file{/bin/sh}) handles backslash/newline pairs.  If
     3690you specify a different shell in your makefiles it may treat them
     3691differently.
    36603692
    36613693Sometimes you want to split a long line inside of single quotes, but
     
    39433975for it to finish before executing the next.  However, the @samp{-j} or
    39443976@samp{--jobs} option tells @code{make} to execute many commands
    3945 simultaneously.@refill
     3977simultaneously.  You can inhibit parallelism in a particular makefile
     3978with the @code{.NOTPARALLEL} pseudo-target (@pxref{Special
     3979Targets,Special Built-in Target Names}).@refill
    39463980
    39473981On MS-DOS, the @samp{-j} option has no effect, since that system doesn't
     
    83538387the special target @code{.SUFFIXES}).  The default suffix list is:
    83548388@code{.out}, @code{.a}, @code{.ln}, @code{.o}, @code{.c}, @code{.cc},
    8355 @code{.C}, @code{.cpp}, @code{.p}, @code{.f}, @code{.F}, @code{.r}, @code{.y},
    8356 @code{.l}, @code{.s}, @code{.S}, @code{.mod}, @code{.sym}, @code{.def},
    8357 @code{.h}, @code{.info}, @code{.dvi}, @code{.tex}, @code{.texinfo},
    8358 @code{.texi}, @code{.txinfo}, @code{.w}, @code{.ch} @code{.web},
    8359 @code{.sh}, @code{.elc}, @code{.el}.  All of the implicit rules
    8360 described below whose prerequisites have one of these suffixes are
    8361 actually suffix rules.  If you modify the suffix list, the only
    8362 predefined suffix rules in effect will be those named by one or two of
    8363 the suffixes that are on the list you specify; rules whose suffixes fail
    8364 to be on the list are disabled.  @xref{Suffix Rules, ,Old-Fashioned
    8365 Suffix Rules}, for full details on suffix rules.
     8389@code{.C}, @code{.cpp}, @code{.p}, @code{.f}, @code{.F}, @code{.m},
     8390@code{.r}, @code{.y}, @code{.l}, @code{.ym}, @code{.lm}, @code{.s},
     8391@code{.S}, @code{.mod}, @code{.sym}, @code{.def}, @code{.h},
     8392@code{.info}, @code{.dvi}, @code{.tex}, @code{.texinfo}, @code{.texi},
     8393@code{.txinfo}, @code{.w}, @code{.ch} @code{.web}, @code{.sh},
     8394@code{.elc}, @code{.el}.  All of the implicit rules described below
     8395whose prerequisites have one of these suffixes are actually suffix
     8396rules.  If you modify the suffix list, the only predefined suffix
     8397rules in effect will be those named by one or two of the suffixes that
     8398are on the list you specify; rules whose suffixes fail to be on the
     8399list are disabled.  @xref{Suffix Rules, ,Old-Fashioned Suffix Rules},
     8400for full details on suffix rules.
    83668401
    83678402@table @asis
     
    86948729@pindex cc
    86958730
    8696 @item CO
    8697 @vindex CO
    8698 Program for checking out files from RCS; default @samp{co}.
    8699 @pindex cc
    8700 
    87018731@item CXX
    87028732@vindex CXX
    87038733Program for compiling C++ programs; default @samp{g++}.
    87048734@pindex g++
    8705 
    8706 @item CO
    8707 @vindex CO
    8708 Program for extracting a file from RCS; default @samp{co}.
    8709 @pindex co
    87108735
    87118736@item CPP
     
    87208745@pindex f77
    87218746
     8747@item M2C
     8748@vindex M2C
     8749Program to use to compile Modula-2 source code; default @samp{m2c}.
     8750@pindex m2c
     8751
     8752@item PC
     8753@vindex PC
     8754Program for compiling Pascal programs; default @samp{pc}.
     8755@pindex pc
     8756
     8757@item CO
     8758@vindex CO
     8759Program for extracting a file from RCS; default @samp{co}.
     8760@pindex co
     8761
    87228762@item GET
    87238763@vindex GET
     
    87398779Program to use to run lint on source code; default @samp{lint}.
    87408780@pindex lint
    8741 
    8742 @item M2C
    8743 @vindex M2C
    8744 Program to use to compile Modula-2 source code; default @samp{m2c}.
    8745 @pindex m2c
    8746 
    8747 @item PC
    8748 @vindex PC
    8749 Program for compiling Pascal programs; default @samp{pc}.
    8750 @pindex pc
    87518781
    87528782@item MAKEINFO
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette