Message-Id: <199811161556.JAA19107@kendall.> Date: Mon, 16 Nov 1998 09:56:46 -0600 (CST) From: Jeff Williams Subject: Environment variables with BASH To: djgpp AT delorie DOT com MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: QVuQYLz5L37s58sNalAANA== X-Mailer: dtmail 1.2.0 CDE Version 1.2 SunOS 5.6 sun4m sparc Reply-To: djgpp AT delorie DOT com I have been using bash 1.14.7 on top of DOS 5.0 COMMAND.COM for some time, but I am confused about how to set the bash special environment variables for best performance. For example, if I set HOME in autoexec.bat, then start bash, HOME will sometimes (and sometimes not) be set in bash. I can't figure out what I'm doing differently when this happens. Also, I can't get make (under bash) to accept my Unix makefiles without first editing those files to replace the `:' path delimiter with either a space or a semicolon. But if I want bash to use `:' as the path delimiter (PATH_SEPARATOR=: (?)), it seems to conflict with the use of `:' in `c:' (e.g., HOME=c: or SYSROOT=c:). And it doesn't seem to help if I use HOME=//c or SYSROOT=//c instead (which I would prefer to avoid, because these forms are not accepted by other DJGPP ports). I even wrote a small script to run some test programs under different combinations of values for the bash variables, and couldn't find any combination that seemed to work well for all situations. The readme.dos file with the bash port mentions the following special variables; following are some basic questions I hope someone will have answers to: SYSROOT= HOME= PATH_EXPAND= PATH_SEPARATOR= PATH_SLASH= TMPDIR= Do these variables have to be set in autoexec.bat, or in _bashrc, or does it matter? Do these variables have to be EXPORTed if they are set in _bashrc? Do these variables have to be set in any particular order? Is the value for any of these variables determined by pre-existing DOS environment variables, e.g., if PATH uses `;' must PATH_SEPARATOR be `;' too? In general, how should these variables be set to achieve maximum portability of my applications (mostly C programs, makefiles, and sh scripts) from my Sun Unix box at work to my DJGPP box at home? Many TIA, jeff williams