www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/02/05:03:42

Date: Wed, 2 Dec 1998 11:10:57 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Gorton Zhao <gwzhao AT multiwave DOT com DOT sg>
cc: djgpp AT delorie DOT com
Subject: Re: Question to DJGPP on Win NT4
In-Reply-To: <742lt6$l7v$1@newton2.pacific.net.sg>
Message-ID: <Pine.SUN.3.91.981202110545.24125X-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

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 -


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