🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #879

parallel make-3.62

#879
From: Tom McConnell
Date: Fri, 09 Oct 1992 02:58
43 lines
2254 bytes
  I am confused about the number of jobs that can be run when running a make
with makefiles in the subdirectories.

  If I start make with this:

    % make -j4

and there are multiple makefiles in the target,  MFLAGS will be set to "1"
via the "update_goal_chain" command.

  This was intentionally done, so this is not technically a "bug", but it
removes the usefullness of having a parallel make. Running on a four CPU
Solbourne, the compile time drops linearly with the number of processors 
(1 CPU compile time = X, 2 CPU compile time - X/2). To get this, I need to
add:

  MFLAGS = -j4

by hand to the Makefile. Otherwise MFLAGS get set to "1".

 The comment for "update_goal_chain" in remake.c reads:

/* Remake all the goals in the `struct dep' chain GOALS.  Return -1 if nothing
   was done, 0 if all goals were updated successfully, or 1 if a goal failed.
   If MAKEFILES is nonzero, these goals are makefiles, so -t, -q, and -n should
   be disabled for them unless they were also command-line targets, and we
   should only make one goal at a time and return as soon as one goal whose
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   `changed' member is nonzero is successfully made.  */

  I don't understand why I should not be able to override this on the command
line (can I?). I can (almost) understand why I would only want to follow one
subdirectory, but the way it seems to work is that when I use the makefile in
the subdirectory, MFLAGS is still "-j1", so I am no longer parallel.

    Cheers,

    Tom McConnell

 Tom McConnell          |     Internet: tmcconne@sedona.intel.com
 Intel, Corp. C3-91     |     Phone: (602)-554-8229
 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
 Chandler, AZ  85226    | their right mind would claim them.
Technical Details
Message-ID: <9210091658.AA14911@thunder.intel.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sedona.intel.com!tmcconne

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sedona.intel.com!tmcconne
From: tmcconne@sedona.intel.com (Tom McConnell)
Subject: parallel make-3.62
Message-ID: <9210091658.AA14911@thunder.intel.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 9 Oct 1992 02:58:37 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 44