9 messages in com.perforce.jamming[jamming] MAXLINE problem
FromSent OnAttachments
Domi...@csee-transport.fr14 Sep 2000 05:58 
Dave...@vignette.com14 Sep 2000 08:16 
Amau...@atsm.fr14 Sep 2000 08:43 
Karl...@cisco.com14 Sep 2000 09:35 
Dian...@yahoo.com14 Sep 2000 11:37 
Domi...@csee-transport.fr15 Sep 2000 01:18 
Dave...@vignette.com15 Sep 2000 12:09 
Paul...@morpheus.demon.co.uk15 Sep 2000 12:19 
Edwa...@yahoo.com16 Sep 2000 08:37 
Subject:[jamming] MAXLINE problem
From:Dave...@vignette.com (Dave@vignette.com)
Date:09/14/2000 08:16:01 AM
List:com.perforce.jamming

X-Lotus-FromDomain: ATSMNOTES

> From: "Amaury FORGEOT-d'ARC" <Amau@atsm.fr> > cc: jamm@perforce.com > Date: Thu, 14 Sep 2000 16:43:58 +0100 > Mime-Version: 1.0 > Content-type: text/plain; charset=us-ascii > Content-Disposition: inline > Sender: jamm@perforce.com > Errors-To: jamm@perforce.com > X-BeenThere: jamm@perforce.com > X-Mailman-Version: 2.0beta2 > Precedence: bulk > List-Id: Discuss the build tool Jam/MR with other users
<jamming.perforce.com> > > > > > Jam is producing a command (a final link) that is too long for the > > command shell (on NT 4.0). > > The only way is to create a response file, containing the files to link, > and use it in the link command: > > actions Link bind NEEDLIBS IMPLIB > { > echo $(>) > $(<:S=.tmp) > echo $(LINKLIBS) >> $(<:S=.tmp) > echo $(NEEDLIBS) >> $(<:S=.tmp) > $(LINK) $(LINKFLAGS) /out:$(<) $(UNDEFS) @$(<:S=.tmp) > }

Here is our solution to the line too long problem:

# Notice the solution for the line too long problem # create a file for the items, and use this trick, courtesy # of Laura Wingerd to output the items # This works due to the mix 'n match composition of macros # by jam, each item in the extraobjects or $(>) is concatenated # with the rest of the line. The period after the echo is # ignored, I guess, but serves to make the whole thing one # string. The newline macro splits it into individual lines.

actions vLink bind NEEDLIBS EXTRAOBJECTS { copy nul: linkobjs.txt echo.$(>)>>linkobjs.txt$(NEWLINE)

This will work no matter how big the $(>) or $(LINKLIBS) macros get NEWLINE macro looks like: NEWLINE = " " ; # used to break up long lines for echo to a file

> > > > Following the old make(1) utility, I also hacked Jam to handle diversion: > In actions, all the text between <+ and +> is expanded, written into a
temporary > file, > and the file name is put on the command line: > > actions Link bind NEEDLIBS > { > $(LINK) $(LINKFLAGS) /out:$(<) $(UNDEFS) @<+$(>) $(NEEDLIBS)
$(LINKLIBS)+> > } >

This seems like a neat solution also!

dave

> I suppose it would be useful to put this in the Public Depot, > if there is a general agreement on the <+ +> syntax; > Unfortunately I made lots of other changes in Jam since the original 2.1.5, > and it would require some work to integrate the changes back to the trunk. > > Amaury. > > > _______________________________________________ > jamming mailing list - jamm@perforce.com > http://maillist.perforce.com/mailman/listinfo/jamming >