www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/25/12:10:49

Date: Mon, 25 Nov 1996 18:53:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Koen DOT VanHerck AT barco DOT com
Cc: djgpp AT delorie DOT com
Subject: Re: DJGPP path from makefile
In-Reply-To: <9611251613.AA11043@ivs4.>
Message-Id: <Pine.SUN.3.91.961125184550.2187C-100000@is>
Mime-Version: 1.0

On Mon, 25 Nov 1996, Koen Van Herck wrote:

> does anyone know if it is possible to detect the installation path of
> djgpp in a makefile ? I want to do the following:
> 
> INSTALLDIR = a:/
> DJGPP_PATH = ?????

Every DJGPP program, including Make (if it is compiled with DJGPP) gets an
environment variable called DJDIR which points to the top DJGPP
installation directory, assuming that the machine where you run this
defines the DJGPP environment variable (set DJGPP=c:/djgpp/djgpp.env) and
if DJGPP.ENV was not screwed up by the user who edited it. If you cannot
assume the above (i.e., you want your installer to work on broken DJGPP
installations), then there is no way to achieve what you want.  Otherwise,
just say this: 

  DJGPP_PATH = $(DJDIR)

> install:
> 	cp $(DJGPP_PATH)/bin/cwsdpmi.exe $(INSTALLDIR)
> 	cp myprog.exe $(INSTALLDIR)

Why do you need to copy CWSDPMI at all?  If it's on the PATH, the stub 
will always find it.  It doesn't have to be in the same directory as your 
DJGPP program.

- Raw text -


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