From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: make Date: Sat, 29 Jan 2000 10:52:56 +0200 Organization: NetVision Israel Lines: 22 Message-ID: <3892AA68.8478609F@is.elta.co.il> References: <38907B45 DOT AA9727DD AT gw DOT rmtaero DOT bfg DOT com> <3890A195 DOT E2E39FD4 AT is DOT elta DOT co DOT il> NNTP-Posting-Host: ras1-p14.rvt.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.netvision.net.il 949135985 26666 62.0.172.16 (29 Jan 2000 08:53:05 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 29 Jan 2000 08:53:05 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru,hebrew To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jason Green wrote: > > > Why cannot you delete it unconditionally? If it doesn't exist, deleting it > > won't do any harm, right? > > Except that DEL says "File not found" if the file does not exist. I > have not tried this in a makefile but in DOS you can type: > > if exist filename del filename This works in a Makefile as well (any command you can type from a command line should work in a Makefile). > For a portable makefile it may be better to use rm (from the package > fil316b.zip), this won't complain if the file does not exist: > > rm -f filename "rm -f" is only portable to Unix. There's no portable way of deleting a file. As a matter of fact, there's no portable way to write commands in a Makefile at all, since all commands assume some specific shell or class of shells.