make-w32
[Top][All Lists]
Advanced

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

RE: temporary files


From: Bijal Shah
Subject: RE: temporary files
Date: Fri, 17 May 2002 08:50:46 +0100

Its exactly to avoid writing special programs that the facility described
would be fantastically useful in GNU make.
In theory, it should be the job of the shell to do this kind of processing,
but certainly on Windows, most shells seem to have limited command line
lengths to cope with (unless you use some ports of 'sh'). Being able to use
make itself to create files would be something of a boon, but also would
need to be quite carefully designed.

-----Original Message-----
From: Greg Chicares [mailto:address@hidden
Sent: 17 May 2002 06:24
To: Andreas Hagele
Cc: address@hidden
Subject: Re: temporary files


> Andreas Hagele wrote:
> 
> I'm using make 3.79 and I would like to create a
> linker response file from make in a more efficient
> way then with the does echo command.
>
> currently i have something like
> 
> link.cmd: $(MF)
>  echo -pnvram=bss,heap >> $@
>  echo -o$(TARGET).obj >> $@
>  echo -N >> $@
>  echo -B165C00E6 >> $@
[...]
> which works fine but the echo command are sooooo slow.

Do you need every option on a separate line?
If not, lines could be combined:

  echo -pnvram=bss,heap -o$(TARGET).obj -N -B165C00E6 >> $@

Maybe you could combine each set of ten consecutive
lines together; I guess that depends on the program
you pass the options too.

> The Borland make has some command like
> 
> prog.exe: A.obj B.obj
> 
>     TLINK32 /c @&&|     # &&| opens temp file, @ for TLINK32
>     c0s.obj $**
>     prog.exe
>     prog.map
>     maths.lib cs.lib
> 
> |                       # | closes temp file, must be on first column
> 
> with the &&| to create a temp file. That's much faster

They have to have that because of limitations in their
tools. IIRC, there are three distinct limits on the
length of commands in their 'make'.

> Is there something like this in GNU make?

I don't think so. I've never needed it with GNU gcc or ld.
I use GNU make with the borland compiler and linker, too;
for that case, I wrote a program that takes a long command
line and turns it into a borland response file. In the
(GNU) makefile, I call that program with all the options
on one line, and it creates the response file and invokes
the borland linker. So for your example above I can write

  borland_link -c c0s.obj prog.exe prog.amp maths.lib cs.lib

I just measured one such borland link command line from an
actual output and it's 1883 characters long.

_______________________________________________
Make-w32 mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/make-w32



reply via email to

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