From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: GNU Make Question Date: 8 Mar 1997 00:55:41 GMT Organization: Oxford University Lines: 29 Message-ID: <5fqded$48d@news.ox.ac.uk> References: <3320A1EC DOT 1551 AT 3DO DOT com> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Eddie Ruvinsky (Eddie DOT Ruvinsky AT 3do DOT com) wrote: : I am using a DOS-based C/C++ compiler based on the gnu compiler. My : problem is that I would like to redirect the output of each compile in : my makefile to a file. For some reason, the command (when executed by : my make utility) refuses to redirect the output. : The follow are my Makefile contents... : all: : cc -Wall -O3 foo.c >output.txt : parser ou MS's COMMAND.COM can't redirect stderr, and stderr is where gcc and make send error messages. To solve this, use the redir utility like so: redir -o output.txt -eo make or put a different command in place of make. This redirects output to output.txt, then redirects stderr to stdout, effectively sending both stdout and stderr to the file output.txt. Is this a DOS-based C/C++ compiler other than DJGPP? If so, what I have written above may not be true, and you won't have the redir utility anyway. -- George Foot Merton College, Oxford.