www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/19/11:26:55

Date: Tue, 19 Mar 1996 18:18:24 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
Cc: djgpp AT delorie DOT com
Subject: Re: ./prog - bad command ?
In-Reply-To: <199603191606.TAA06117@video.yars.free.net>
Message-Id: <Pine.SUN.3.91.960319181126.20848V-100000@is>
Mime-Version: 1.0

On Tue, 19 Mar 1996, Alexander V. Lukyanov wrote:

> I suppose it is easier for me just to remove './' :-)
> I just wanted to make a makefile compatible with Unix... Without ./ it
> will work if PATH includes current directory.

You can always run it with `redir' under DOS, and make `redir' be an 
empty string under Unix (with a Make macro).  `redir' does redirection 
but without using redirection symbols, so Make doesn't call COMMAND.
Consider this (untested):

ifdef DJGPP
REDIR = redir -o myfile
else
REDIR =
endif
...
...
myprog: sources
	$(REDIR) ./progname ....


`redir' will redirect the stdout of `progname' to `myfile'.

- Raw text -


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