Date: Mon, 25 Nov 1996 18:53:11 +0200 (IST) From: Eli Zaretskii 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: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.