[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs build on Windows: Prerequisites
From: |
Eli Zaretskii |
Subject: |
Re: Emacs build on Windows: Prerequisites |
Date: |
Wed, 28 Feb 2007 22:18:01 +0200 |
> Date: Wed, 28 Feb 2007 18:28:54 +0530
> From: dhruva <address@hidden>
>
> Why should Emacs build on windows need those tools? Why can't it use
> the windows equivalents?
We could use the equivalent Windows commands, but doing so would
complicate the build process and its maintenance a great deal. The
reason for this is that different versions of Windows provide very
different features in the same commands. While the latest versions of
Windows, starting from W2K, come with quite powerful features in both
the stock shell cmd.exe (including its built-in commands and) and in
external commands such as XCOPY, older Windows versions (9x/ME) still
use command.com, which is much less powerful, and the external
commands that come with them are extremely rudimentary. NT4 has
cmd.exe, but it lacks many features we have on W2K and XP. I cannot
describe all the features missing from older Windows, but here are
just a few examples:
. The shell always returns a zero exit status, even if the
command(s) it ran failed.
. Batch files always return zero exit status, and their output
cannot be redirected.
. There's no shell syntax to redirect stderr.
. COPY will silently fail to copy empty files, and will sometimes
fail to copy binary files.
. MOVE, the equivalent of mv, is sometimes a built-in, sometimes an
external command, and sometimes absent, and its features vary from
one Windows version to another.
. DEL, the equivalent of rm, doesn't have an option to do the
equivalent of "rm -rf".
etc., etc.
Since we still support building Emacs on the older versions of
Windows, we cannot rely on features that those versions lack. Perhaps
in a few years, we could, in principle, abandon ported cp, rm, and mv,
and switch to using the Windows equivalents, but even then someone
will have to step forward and volunteer to do the job of making the
changes, testing them, and convincing the rest that it's a good idea
to fix what ain't broken. After all, it's highly unlikely that Emacs
users who build Emacs themselves will not have GNU Fileutils installed
on their machines anyway.