Mail Archives: djgpp/1997/11/24/09:57:02
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.
- Raw text -