Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!deltam.com!mark From: mark@deltam.com (mark galbraith) Newsgroups: gnu.utils.bug Subject: Bug in GNU Make Message-ID: <9001180502.AA00631@flyer.deltam.com> Date: 18 Jan 90 05:02:17 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 When using the -j command line option on a target with many dependancies (e.g., linking several .o files into a single executable), make is not waiting for the jobs building the dependacy files to finish before attempting to start the final target build. In example, consider the following entry in a Makefile: prog: modulea.o moduleb.o modulec.o Even by using the default rules for everything, if you start make with the -j option set to 4, make will start the three compiles for modulea, moduleb, and modulec; and then, without waiting for those jobs to finish, will also start the link of prog. What I would have expected to occur is that the make checks to see if a job is dependant on one or more jobs still running. If so, skip this job for now, leaving it at the top of the list of jobs that must be done, and start the next job on the job list. Each time a job finishes, check from the top of the list down to find the first job that can be run, that doesn't depend on a job that is currently running. If no job can be found, sleep until the next job terminates. Eventually all of the dependancy jobs will finish for the target, and the dependant job will be run. What I am asking for may be too much to ask (I haven't had much of a chance to look into the code that handles jobs), but I would be interested in devoting what time I have in fixing this problem. I can't guarantee much, but what is available will have to do. Let me know if you would like me to pursue this bug. -- Mark Galbraith Voice: 415-449-6881 Programmer/Postmaster UUCP: uunet!deltam!mark System Administrator Domain: mark@deltam.com