www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/21/12:03:28

To: "Ian T. Zimmerman" <itz AT crl DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: make ALL?
Date: Tue, 21 Jun 94 16:02:20 +0300
From: eliz AT is DOT elta DOT co DOT il

> How to pass _many, many_ objects to the linker? Use a here (@) file, you 
> say. OK, but how do the names get there? In the end, one program or 
> another will have to handle them all on its command line.

What linker is this?  If it's DJGPP's ld, there is no need for the response
file, as DJGPP programs invoked by DJGPP programs use the ``!proxy'' method
whereby arguments are passed through memory between 2 GO32's which run the
parent and the child.
If another linker is invoked (e.g. MS Link or Borland's TLink), *then* you
indeed have a problem.  I know about 3 solutions:

	1) Write a DJGPP program which is replacement for `echo'.  It will
get the argument list using ``!proxy'' (this is done automagically for you)
and write them to a response file; then it will invoke linker.  In the Makefile
then write:
	myexec link arg1 arg2 ....
where myexec is the above program.  It might even be told to treat each invoked
program as that program expects.

	2) GNUish Make has an automatic provision to generate a response file,
but only for Microsoft tools (compiler, librarian and linker): Thorsten Ohl, who
did the GNUish port, worked with MS environment.

	3) Borland Make can generate response files for its tools.

> BTW, I already tried to pass a super-long command-line to the djgpp echo 
> program from within my makefile. Seems to work all right, ...as long as 
> I don't try to redirect the output!

That's right.  DJGPP Make handles command invocation itself as long as it
doesn't see characters special for the shell (which include redirection, pipe
and a quote) or commands which are internal to COMMAND.COM; if it does, it calls
COMMAND.COM to do the job with the obvious lossage of 127-char command-line
limit.

> It's hard to say where the problem is in the myprog rule because I don't 
> have any documentation describing the go32 thing, or how make uses it. I 
> am told it's somewhere in the diffs, which I have deleted. If anyone can 
> point me more specifically I may even download some again :->

I don't remember seeing any docs on this except in README.DJ file, which only
tells that DJGPP programs support ``!proxy'', environment and response file
methods of GETTING long argument lists.  The rest of the above I derived from
looking into Make and GO32 sources.  Maybe it's high time somebody knowledgable
documents these fine details.  For instance: does invoking other programs ALWAYS
generates both ``!proxy'' AND environment-based methods?

	Eli Zaretskii

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019