delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/21/14:26:15

Date: Sat, 21 Apr 2001 21:22:33 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: drososa AT pat DOT forthnet DOT gr
Message-Id: <5567-Sat21Apr2001212233+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <slrn9dttr9.6d.drososa@localhost.localdomain>
Subject: Re: problem with cat redirection in a makefile
References: <slrn9dttr9 DOT 6d DOT drososa AT localhost DOT localdomain>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: drososa AT pat DOT forthnet DOT gr ()
> Newsgroups: comp.os.msdos.djgpp
> Date: 19 Apr 2001 14:34:38 GMT
> 
> Problem: In a project makefile there is a need to concatenate two binary
> files together, so the cat command is used. What is observed is that this
> command sometimes works and most often not. When it doesn't, the binary
> characters of the two files are dumped on screen. 

Does the same command work correctly from the DOS Box prompt on the
same system?

> Here is a makefile sample that duplicates the problem. The files involved
> can be any binary files.
> -------------------------
> MAINEXE = image
> COPY = cat
> 
> 
> all: $(MAINEXE).elf
> 
> $(MAINEXE).elf:
> 	$(COPY) signram.atm $(MAINEXE).bin > $(MAINEXE)_ram.bin
> -------------------------

Is that the _exact_ Makefile?  If it is, then I cannot reproduce your
problem: it works for me on Windows 98.

> Trying the "copy /b" dos equivalent with the appropriate syntax change (i.e.
> copy /b file1+file2 file3), I get the error message
> 
> make.exe: *** [image.elf] Error -1

I cannot reproduce this one, either: it works for me with "copy /b" as
well.

> Trying to find the dos or windows executable copy.exe it appears that it
> does not exist. Perhaps it is included in some command.com file somewhere.

Yes, "copy" is a built-in command in COMMAND.COM, but Make alreadu
knows that.  Did you set the SHELL environment variable to point to
some non-standard shell, perhaps?  If so, Make might be invoking the
wrong shell, which doesn't have a built-in "copy" command.

- Raw text -


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