From: drososa AT pat DOT forthnet DOT gr () Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with cat redirection in a makefile Date: 23 Apr 2001 17:40:47 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: 63 Message-ID: References: <5567-Sat21Apr2001212233+0300-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: athnrd02.forthnet.gr X-Trace: medousa.forthnet.gr 988047647 25809 193.92.150.73 (23 Apr 2001 17:40:47 GMT) X-Complaints-To: abuse AT forthnet DOT gr NNTP-Posting-Date: 23 Apr 2001 17:40:47 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 Thanks guys The key word was SHELL. I had the SHELL variable defined in the autoexec.bat file as required by another application and of course it messed things up. As soon as I took that off everything's working file. Thanks again for your help. On Sat, 21 Apr 2001 21:22:33 +0300, Eli Zaretskii wrote: >> 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.