]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* Some doc and help changes.
authorPaul Smith <psmith@gnu.org>
Mon, 6 Sep 1999 05:21:52 +0000 (05:21 +0000)
committerPaul Smith <psmith@gnu.org>
Mon, 6 Sep 1999 05:21:52 +0000 (05:21 +0000)
ChangeLog
main.c
make.texinfo
remake.c

index 4e69369dd7e10cfd61be8ad6e67bb4b591e909c4..93ed16c03bd37c9bd1b3312edcb490cc97d6b1eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+1999-09-05  Paul D. Smith  <psmith@gnu.org>
+
+       * make.texinfo (Make Errors): Document some new jobserver error
+       messages.
+
+1999-09-04  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * make.texinfo (Make Errors): Document the hint about 8 spaces
+       instead of a TAB.
+       (Call Function, Quick Reference): Use @code{$(1)}, not @var.
+
+       * main.c (main) [__MSDOS__]: Say "on this platform" instead of "on
+       MS-DOS", since the MSDOS version could run on Windows.
+
 1999-09-03  Paul D. Smith  <psmith@gnu.org>
 
        * remake.c (notice_finished_file): Always set mtime_before_update
diff --git a/main.c b/main.c
index 802e889bbcd212c26b3f1c5a9781e760da072ef5..226fa9128d01f9ba847ef6507305be36bb7fc9af 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1300,8 +1300,9 @@ int main (int argc, char ** argv)
 #ifdef __MSDOS__
   if (job_slots != 1)
     {
-      error (NILF, _("Parallel jobs (-j) are not supported on MS-DOS."));
-      error (NILF, _("Resetting to single job mode."));
+      error (NILF,
+             _("Parallel jobs (-j) are not supported on this platform."));
+      error (NILF, _("Resetting to single job (-j1) mode."));
       job_slots = 1;
     }
 #endif
index 7605994b6caca560dd279647f0c0382d2cca5b16..45de76305cc512ca5c2720d90e257fdeaf8793a3 100644 (file)
@@ -6025,13 +6025,13 @@ $(call @var{variable},@var{param},@var{param},@dots{})
 @end example
 
 When @code{make} expands this function, it assigns each @var{param} to
-temporary variables @var{$(1)}, @var{$(2)}, etc.  The variable
-@var{$(0)} will contain @var{variable}.  There is no maximum number of
+temporary variables @code{$(1)}, @code{$(2)}, etc.  The variable
+@code{$(0)} will contain @var{variable}.  There is no maximum number of
 parameter arguments.  There is no minimum, either, but it doesn't make
 sense to use @code{call} with no parameters.
 
 Then @var{variable} is expanded as a @code{make} variable in the context
-of these temporary assignments.  Thus, any reference to @var{$(1)} in
+of these temporary assignments.  Thus, any reference to @code{$(1)} in
 the value of @var{variable} will resolve to the first @var{param} in the
 invocation of @code{call}.
 
@@ -6050,7 +6050,7 @@ Some examples may make this clearer.
 This macro simply reverses its arguments:
 
 @smallexample
-reverse = $2 $1
+reverse = $(2) $(1)
 
 foo = a b
 bar = $(call reverse,$(foo))
@@ -6063,7 +6063,7 @@ This one is slightly more interesting: it defines a macro to search for
 the first instance of a program in @code{PATH}:
 
 @smallexample
-pathsearch = $(firstword $(wildcard $(addsufix /$1,$(subst :, ,$(PATH)))))
+pathsearch = $(firstword $(wildcard $(addsufix /$(1),$(subst :, ,$(PATH)))))
 
 LS := $(call pathsearch,ls)
 @end smallexample
@@ -6072,12 +6072,12 @@ LS := $(call pathsearch,ls)
 Now the variable LS contains @code{/bin/ls} or similar.
 
 The @code{call} function can be nested.  Each recursive invocation gets
-its own local values for @var{$(1)}, etc. that mask the values of
+its own local values for @code{$(1)}, etc. that mask the values of
 higher-level @code{call}.  For example, here is an implementation of a
 @dfn{map} function:
 
 @smallexample
-map = $(foreach a,$2,$(call $1,$a))
+map = $(foreach a,$(2),$(call $(1),$(a)))
 @end smallexample
 
 Now you can @var{map} a function that normally takes only one argument,
@@ -9280,8 +9280,8 @@ and concatenate the results.@*
 
 @item $(call @var{var},@var{param},@dots{})
 
-Evaluate the variable @var{var} replacing any references to @var{$(1)},
-@var{$(2)} with the first, second, etc. @var{param} values.@*
+Evaluate the variable @var{var} replacing any references to @code{$(1)},
+@code{$(2)} with the first, second, etc. @var{param} values.@*
 @xref{Call Function, ,The @code{call} Function}.
 @end table
 
@@ -9444,6 +9444,7 @@ but the rule in the makefile was prefixed with the @code{-} special
 character, so @code{make} ignored the error.
 
 @item missing separator.  Stop.
+@itemx missing separator (did you mean TAB instead of 8 spaces?).  Stop.
 This means that @code{make} could not understand much of anything about
 the command line it just read.  GNU @code{make} looks for various kinds
 of separators (@code{:}, @code{=}, TAB characters, etc.) to help it
@@ -9453,8 +9454,10 @@ find a valid one.
 One of the most common reasons for this message is that you (or perhaps
 your oh-so-helpful editor, as is the case with many MS-Windows editors)
 have attempted to indent your command scripts with spaces instead of a
-TAB character.  Remember that every line in the command script must
-begin with a TAB character.  Eight spaces do not count.  @xref{Rule Syntax}.
+TAB character.  In this case, @code{make} will use the second form of
+the error above. Remember that every line in the command script must
+begin with a TAB character.  Eight spaces do not count.  @xref{Rule
+Syntax}.
 
 @item commands commence before first target.  Stop.
 @itemx missing rule before commands.  Stop.
@@ -9501,7 +9504,7 @@ which already has been defined to have commands, this warning is issued
 and the second set of commands will overwrite the first set.
 @xref{Multiple Rules, ,Multiple Rules for One Target}.
 
-@item Circular @var{xxx} <- @var{yyy} prerequisite dropped.
+@item Circular @var{xxx} <- @var{yyy} dependency dropped.
 This means that @code{make} detected a loop in the dependency graph:
 after tracing the prerequisite @var{yyy} of target @var{xxx}, and its
 prerequisites, etc., one of them depended on @var{xxx} again.
@@ -9531,6 +9534,30 @@ there are multiple patterns in the target section, and the third means
 the target doesn't contain a pattern character (@code{%}).  @xref{Static
 Usage, ,Syntax of Static Pattern Rules}.
 
+@item warning: -jN forced in submake: disabling jobserver mode.
+This warning and the next are generated if @code{make} detects error
+conditions related to parallel processing on systems where
+sub-@code{make}s can communicate (@pxref{Options/Recursion,
+,Communicating Options to a Sub-@code{make}}).  This warning is
+generated if a recursive invocation of a @code{make} process is forced
+to have @samp{-j@var{N}} in its argument list (where @var{N} is greater
+than one).  This could happen, for example, if you set the @code{MAKE}
+environment variable to @samp{make -j2}.  In this case, the
+sub-@code{make} doesn't communicate with other @code{make} processes and
+will simply pretend it has two jobs of its own.
+
+@item warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
+In order for @code{make} processes to communicate, the parent will pass
+information to the child.  Since this could result in problems if the
+child process isn't actually a @code{make}, the parent will only do this
+if it thinks the child is a @code{make}.  The parent uses the normal
+algorithms to determine this (@pxref{MAKE Variable, ,How the @code{MAKE}
+Variable Works}).  If the makefile is constructed such that the parent
+doesn't know the child is a @code{make} process, then the child will
+receive only part of the information necessary.  In this case, the child
+will generate this warning message and proceed with its build in a
+sequential manner.
+
 @end table
 
 @node Complex Makefile, Concept Index, Make Errors, Top
index fe9b7ffe9bc6a656940d0347885151b6d713e5d2..7d7fd3675013cddd8fff7b85fa64e830ff492a4b 100644 (file)
--- a/remake.c
+++ b/remake.c
@@ -159,49 +159,47 @@ update_goal_chain (goals, makefiles)
                 decide when to give an "up to date" diagnostic.  */
              g->changed += commands_started - ocommands_started;
 
-             stop = 0;
-             if (x != 0 || file->updated)
-               {
-                 /* If STATUS was not already 1, set it to 1 if
-                    updating failed, or to 0 if updating succeeded.
-                    Leave STATUS as it is if no updating was done.  */
+              /* If we updated a file and STATUS was not already 1, set it to
+                 1 if updating failed, or to 0 if updating succeeded.  Leave
+                 STATUS as it is if no updating was done.  */
 
-                 if (status < 1)
-                   {
-                     if (file->update_status != 0)
-                       {
-                         /* Updating failed, or -q triggered.
-                            The STATUS value tells our caller which.  */
-                         status = file->update_status;
-                         /* If -q just triggered, stop immediately.
-                            It doesn't matter how much more we run,
-                            since we already know the answer to return.  */
-                         stop = (!keep_going_flag && !question_flag
-                                 && !makefiles);
-                       }
-                     else
+             stop = 0;
+             if ((x != 0 || file->updated) && status < 1)
+                {
+                  if (file->update_status != 0)
+                    {
+                      /* Updating failed, or -q triggered.  The STATUS value
+                         tells our caller which.  */
+                      status = file->update_status;
+                      /* If -q just triggered, stop immediately.  It doesn't
+                         matter how much more we run, since we already know
+                         the answer to return.  */
+                      stop = (!keep_going_flag && !question_flag
+                              && !makefiles);
+                    }
+                  else
+                    {
+                      FILE_TIMESTAMP mtime = MTIME (file);
+                      check_renamed (file);
+
+                      if (file->updated && g->changed &&
+                           mtime != file->mtime_before_update)
                         {
-                          FILE_TIMESTAMP mtime = MTIME (file);
-                          check_renamed (file);
-                          if (file->updated && g->changed &&
-                               mtime != file->mtime_before_update)
-                          {
-                            /* Updating was done.  If this is a makefile and
-                               just_print_flag or question_flag is set
-                               (meaning -n or -q was given and this file was
-                               specified as a command-line target), don't
-                               change STATUS.  If STATUS is changed, we will
-                               get re-exec'd, and enter an infinite loop.  */
-                            if (!makefiles
-                                || (!just_print_flag && !question_flag))
-                              status = 0;
-                            if (makefiles && file->dontcare)
-                              /* This is a default makefile; stop remaking.  */
-                              stop = 1;
-                          }
+                          /* Updating was done.  If this is a makefile and
+                             just_print_flag or question_flag is set (meaning
+                             -n or -q was given and this file was specified
+                             as a command-line target), don't change STATUS.
+                             If STATUS is changed, we will get re-exec'd, and
+                             enter an infinite loop.  */
+                          if (!makefiles
+                              || (!just_print_flag && !question_flag))
+                            status = 0;
+                          if (makefiles && file->dontcare)
+                            /* This is a default makefile; stop remaking.  */
+                            stop = 1;
                         }
-                   }
-               }
+                    }
+                }
 
              /* Keep track if any double-colon entry is not finished.
                  When they are all finished, the goal is finished.  */
@@ -457,7 +455,7 @@ update_file_1 (file, depth)
 
       if (d->file->updating)
        {
-         error (NILF, _("Circular %s <- %s prerequisite dropped."),
+         error (NILF, _("Circular %s <- %s dependency dropped."),
                 file->name, d->file->name);
          /* We cannot free D here because our the caller will still have
             a reference to it when we were called recursively via
@@ -857,7 +855,7 @@ check_dep (file, depth, this_mtime, must_make_ptr)
            {
              if (d->file->updating)
                {
-                 error (NILF, _("Circular %s <- %s prerequisite dropped."),
+                 error (NILF, _("Circular %s <- %s dependency dropped."),
                         file->name, d->file->name);
                  if (lastd == 0)
                    {
@@ -875,7 +873,8 @@ check_dep (file, depth, this_mtime, must_make_ptr)
                }
 
              d->file->parent = file;
-             dep_status |= check_dep (d->file, depth, this_mtime, must_make_ptr);
+             dep_status |= check_dep (d->file, depth, this_mtime,
+                                       must_make_ptr);
              check_renamed (d->file);
              if (dep_status != 0 && !keep_going_flag)
                break;