Boost logo

Boost-Build :

From: Anichini, Steve (Sanichini_at_[hidden])
Date: 2002-03-12 17:24:01

Trying echo inside an action in a jamfile stops short way before 4095 (in
fact, the 2047 limit seems about right).

I think there is just something screwy with the way jam shells out commands
on NT, because if a Python script can call os.system("echo...") with up to
4095 chars, there's no reason jam shouldn't be able to also.

Delving deep into python's source, it looks like its just calling the C
runtime system() call when os.system() is called.

So a short table from my tests:
(* = filler for a lot of characters)

method command
python os.system() "cmd.exe /q/c echo"*">foo.txt" 4095 chars
batch file "echo "*">foo.txt"
~2047 chars
jam "echo "*">foo.txt"
~2047 chars

So it seems that the batch file is the limiting factor. It does seem a shame
since once could double the length of commands if jam didn't use batch files
and invoked cmd.exe directly. It would make the implementation for
multi-line commands very tricky tho, and maybe not worth the risk or pain.

anyway, looking at what the "piecemeal" keyword does, i think i can solve
the problem we were having and set the maxline() back to where it was.


> -----Original Message-----
> From: David Abrahams [mailto:david.abrahams_at_[hidden]]
> Sent: Tuesday, March 12, 2002 2:40 PM
> To: Anichini, Steve; jamboost_at_[hidden]
> Subject: Re: boost jam patches
> Err, now that's wierd: I just looked at your script and it
> seems to use
> the echo command.
> Okay; the real limiting factor is what happens when the command is
> written to a .bat file, since that's what Jam does.
> Are you sure you've got the right test?
> -D


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at