Date: Mon, 24 Nov 1997 16:55:01 +0200 (IST) From: Eli Zaretskii To: Christopher Croughton cc: djgpp AT delorie DOT com Subject: Re: Substituting \ for / in make In-Reply-To: <97Nov24.143606gmt+0100.17026@internet01.amc.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 24 Nov 1997, Christopher Croughton wrote: > the 'install' rule needs to use COPY on DOS and cp > on Unix (because I can't guarantee that someone > compiling the DOS version will have installed the > DJGPP fileutils). Can you guarantee that they have the minimal DJGPP development suite (djdev) installed? 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. > What I tried was to use > > $(DJDIR/bin:/=\\) 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). > Even worse, the environment variable DJDIR is set as C:/DJGPP. > I know there was some reason for using slash instead of backslash, > something wouldn't work, but I can't find any mention of this > variable in either the FAQ or in readme.1st. Is there a use for > this variable, possibly in other install scripts, or is it > a relic from some older installation (DJGPP version 1, possibly)? 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. You shouldn't care if you use $(subst) as above.