gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] parallel compilation


From: James K. Lowden
Subject: Re: [open-cobol-list] parallel compilation
Date: Mon, 19 Sep 2016 16:03:23 -0400

On Mon, 19 Sep 2016 20:45:22 +0200
"Simon Sobisch" <address@hidden> wrote:

> This is defined in common.c around line 3281 and uses:
> 
>     cob_gettmpdir(), SLASH_CHAR, cob_sys_getpid(),
> cob_temp_iteration, ext 
> You can override the temporary direcory which you did (first part),
> but this shouldn't be necessary as the second part is the process-id
> which shouldn't be reused within a time frame needed for compilation.
> 
> This is quite strange and should be investigated further!

+1.  I looked at the same code briefly, and it appears to use the pid
as part of the temporary filename.  It would be better, though, to use
tempnam(3).  

> BTW: if you want to do parallel builds I suggest not to do this
> manually but use a small makefile

If I may, I would add that this is what make was invented for!  

My GNU Makefile often starts with some variation of 

        COB.SRC = $(wildcard $(COB.DIR)/*.cbl)
        COB.BAS = $(basename $(COB.SRC))
        cobol: $(COB.BAS)

Then "make -j8" runs the build in parallel, only remaking what's out of
date.  

--jkl


reply via email to

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