help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with multiple threads need some advise


From: John Graham-Cumming
Subject: Re: Problem with multiple threads need some advise
Date: Wed, 26 Apr 2006 15:57:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

PATTON, BILLY (SBCSI) wrote:
But I use makedepend for the c,c++,pro-c.  It apparently opens the file
for writing. Nothing else can get to it and I don't know how to make it wait. Running serially would take too long.

Any suggestions on how to get around this problem?

I assume when you say "It apparently opens the file for writing" you mean that makedepend opens the output file (either Makefile, makefile or whatever is specified with -f) for writing. That would make sense since it has to write to it, and it would create a problem if you try to run multiple makedepends. Looking at the source code of makedepend reveals that it opens the output file once and keeps it open while it processes the files.

So your options are:

1. Modify makedepend so that it opens and closes the Makefile only when it needs to write out and behaves nicely if someone else has the Makefile locked.

2. Specify multiple makedepend processes each with a different Makefile output (use -f for that) so that there's no contention and then include each of the different Makefiles thus generated.

John.
--
John Graham-Cumming
address@hidden

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]