Date: Sat, 21 Apr 2001 21:22:33 +0300 From: "Eli Zaretskii" 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: Subject: Re: problem with cat redirection in a makefile References: 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 Precedence: bulk > 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.