www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/24/07:46:32

Date: Thu, 24 Apr 1997 14:35:25 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Matthew H. Gerlach" <gerlach AT netcom DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: dos/unix defines
In-Reply-To: <gerlachE93Jr6.DGp@netcom.com>
Message-ID: <Pine.SUN.3.91.970424143457.11402Q-100000@is>
MIME-Version: 1.0

On Wed, 23 Apr 1997, Matthew H. Gerlach wrote:

> I would like to similar stuff using GNU make, because I have makefiles used
> on both UNIX and DJCPP make.  In other words, I would like to something like 
> the following:
> 
> ifeq (OS, UNIX)
> RM=rm -f
> else
> rm=del
> endif
> 
> 
> Can someone please point me in the right direction to do this?

There is no general way to do that.  One solution which I find to work
reasonably well is to test for COMSPEC, like so:

	ifdef COMSPEC
	... DOS stuff ...
	else
	... Unix stuff ...
	endif

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019