www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/21/00:22:53

From: "Ian T. Zimmerman" <itz AT crl DOT com>
Subject: Re: make ALL?
To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJ Delorie)
Date: Mon, 20 Jun 1994 20:49:04 -0700 (PDT)

Thanks to all who have responded to my post. After a sound sleep I found
an easy and clean solution to the original problem: 

ifdef ALL
$(OBJS): FORCE

FORCE:

endif

However, the problem immediately reappeared in a more intractable guise. 
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. So the use of 
special go32/gnuish facilities noted by several people seems necessary.

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! As soon as I write

myprog.lnk: $(OBJS)
	-rm $@
	echo $^ >>$@

the $^ list is echoed _to the screen_, and is D"OS"-style chopped. So the 
final solution _will_ require use of xargs as well as the go32 hook, for 
something like

	echo $^ | xargs echo >>$@

Beautiful, isn't it :-<
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 :->

Cheers to all!

Ian T Zimmerman            +-------------------------------------------+
P.O. Box 13445             I    With so many executioners available,   I
Berkeley, California 94712 I suicide is a really foolish thing to do.  I
USA                        +-------------------------------------------+


- Raw text -


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