Mail Archives: djgpp/1998/12/02/05:03:42
On Wed, 2 Dec 1998, Gorton Zhao wrote:
> I am using DJGPP at a DOS box under Windows NT 4.0 (workstation). I use
> 'echo' in the makefile to convert very long command to a file, then compile
> the source.
Why do you at all need that trick? DJGPP programs can pass long command
lines to each other, so make.exe can invoke the compiler (assuming the
compiler is gcc) without any help or intermediate files.
> $(DEPDIR)/%.dep : $(PSOSBSP)/%.c $(DEPDIR) $(OBJDIR)
> djecho -o $(TEMPX)/$*.cmd " " -c $< -o $(OBJDIR)/$*.o -MD $(CFLAGS)
> $(CPPFLAGS)
> $(CC) -via $(TEMPX)/$*.cmd
You need to quote the entire text that you want `echo' to write to the
file. Otherwise, it treats the arguments that begin with -, like -c, as
switches.
Use something like this:
djecho -o $(TEMPX)/$*.cmd " -c $< -o $(OBJDIR)/$*.o -MD $(CFLAGS) $(CPPFLAGS)"
Btw, why did you need to rename echo into djecho?
- Raw text -