Date: Thu, 29 May 1997 11:11:20 +0300 (IDT) From: Eli Zaretskii To: "Peter J. Farley III" cc: djgpp AT delorie DOT com Subject: Re: REPOST: DJGPP/BASH: Need setup advice, please In-Reply-To: <338cc5a2.744106@news.dorsai.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 28 May 1997, Peter J. Farley III wrote: > Q1: What directory structure(s) do I need to set up to provide a > more-or-less "standard" GNU/DJGPP environment, other than the ones > delivered as part of DJGPP? (E.G., /usr hierarchy?) I don't think you need this with DJGPP. DJGPP's directory tree assumes that the default value of ${prefix} ("/usr/local" on Unix) is the top directory of the DJGPP installation. Every DJGPP-compiled program gets this top directory in the $DJDIR environment variable (it is computed by the DJGPP startup code from the $DJGPP environment variable that you set as part of installation). Therefore you only need to configure all Unix programs that you build with --prefix='${DJDIR}', and live happily ever after. If there are any other reasons for you to care about /usr, please tell what they are. Another quite common case to care about Unix-like tree structure is the "/bin/sh" call hardwired into many Unix scripts and Makefiles. This is also not a problem with DJGPP, because the DJGPP libc looks for an excutable called "sh" (including sh.exe, sh.com, sh.bat, even sh.pl) along the PATH and in the current working if it isn't found in /bin. This is all transparently taken care of for you, in Bash and in Make, and also if you use `system' or `spawn' library functions to invoke Unix shell scripts which say "#! /bin/sh". You will need to make sure you have sh.exe somewhere on your PATH. The easiest way to do that is like so: cd c:\djgpp\bin stubify -g sh.exe stubedit sh.exe runfile=bash If you have the DJGPP port of GNU Fileutils, you can do it easier: ln -s bash.exe sh.exe Both these commands create a 2KB-long sh.exe that will actually run bash.exe when called (a kind of ``symlink''). (If you installed DJGPP in a directory other than c:/djgpp, change the commands accordingly.) The only other problem that I'm aware of is with /tmp. Most programs should use $TMPDIR if it is defined (DJGPP.ENV defines it for you), but you might consider creating /tmp on every drive you have, for those programs that don't. > Q2: What bash directory structures do I need to set up to allow > "configure" et. al. work? Or, where can I find docs to tell me what > they need? You shouldn't need anything special in your directory structure to run ./configure scripts with Bash. If you have problems, please post specific questions here. You should read the file README.dos that comes with the DJGPP port of Bash, since it describes some DJGPP-specific features (like PATH_SEPARATOR and PATH_EXPAND) that are specifically designed to make running configure scripts easier. Typically, you will need to set PATH_SEPARATOR=: and PATH_EXPAND=y before running the script. Examples of how to run these scripts are available in latest port of GNU packages (see the *s.zip files in v2gnu directory on the DJGPP sites). Most of them run GNU configure scripts with only minor modifications. > Q3: What directory structures and environment variables are needed > for bash itself? See README.dos in Bash distribution.