delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/19/13:02:58

From: drososa AT pat DOT forthnet DOT gr ()
Newsgroups: comp.os.msdos.djgpp
Subject: problem with cat redirection in a makefile
Date: 19 Apr 2001 14:34:38 GMT
Organization: FORTHnet S.A., Thetidos 6, GR-11528 Athens, Greece, Tel: +30 (1) 7295100, Fax: +30 (1) 7258520, url: http://www.forthnet.gr
Lines: 43
Message-ID: <slrn9dttr9.6d.drososa@localhost.localdomain>
NNTP-Posting-Host: athnrd02.forthnet.gr
X-Trace: medousa.forthnet.gr 987690878 23130 193.92.150.73 (19 Apr 2001 14:34:38 GMT)
X-Complaints-To: abuse AT forthnet DOT gr
NNTP-Posting-Date: 19 Apr 2001 14:34:38 GMT
User-Agent: slrn/0.9.6.3 (Linux)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi

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. 

Environment: MS-DOS Prompt window in Windows 98 second edition.

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
-------------------------

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

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.

If it matters, my path is
PATH=
C:\DJGPP\BIN;C:\DJGPP\JED\BIN;C:\BIN;C:\PYTHON20;C:\WINDOWS;C:\WINDOWS\COMMAND

I have also tried putting the C:\WINDOWS\COMMAND entry at the PATH beginning but
the behaviour is still the same. Have also tried playing with the window
settings such as memory and environment with no success.

Can anyone shed some light on this?

TIA

Tasos

- Raw text -


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