From: Christopher Croughton Message-Id: <97Nov24.160900gmt+0100.17035@internet01.amc.de> Subject: Re: Substituting \ for / in make To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Mon, 24 Nov 1997 16:07:02 +0100 Cc: crough45 AT amc DOT de, djgpp AT delorie DOT com In-Reply-To: from "Eli Zaretskii" at Nov 24, 97 03:55:01 pm Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > Can you guarantee that they have the minimal DJGPP development suite > (djdev) installed? Yes - they must be able to compile and link C/C++ programs otherwise it won't install at all. In fact they must have binutils as well, because I use 'ar'. > If so, use `update' on DOS: it understands forward > slashes. It also won't copy a file if its contents is identical, even if > the time stamps differ. Aha! That's the sort of thing I was after, thanks. I'll look that up when I get home. > If you need the conversion, use the function $(subst), like this: > > $(subst, /,\\,$(DJDIR)) > > (it's described in the Make docs, in the chapter named "Functions"). > > Beware: non-GNU Make don't usually know about $(subst). I was trying to make it portable to any minimal make. However, the DOS version (where it's needed) will be using GNU make (i.e. the one with DJGPP) so that's OK. > All the rest of DJGPP.ENV settings use %DJDIR% to generate all the other > directories used by the various ports. If DJDIR is not set, you will be > lost. DJGPP.ENV arranges for forward slashes to be used because some > ported programs (e.g. info.exe) don't like backslashes. I knew I had seen it somewhere. However, shouldn't it be stated in th FAQ or README.1ST if it's so important? I downloaded them today to check, and there's no reference in either. > You shouldn't care if you use $(subst) as above. True. If I could depend on 4DOS I wouldn't even need that; if I could depend on bash it would be even easier (I could use GNU autoconf, for instance). But one of those ideas should work, anyway. Thanks, Chris C