emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pushing newer nt/subdirs.el into site-lisp/


From: Juanma Barranquero
Subject: Re: Pushing newer nt/subdirs.el into site-lisp/
Date: Wed, 31 Jan 2007 02:47:25 +0100

On 1/30/07, Eli Zaretskii <address@hidden> wrote:

I don't think it's by design, but your patch is too intrusive: it
_always_ copies subdirs.el.

Well, nothing depends on site-lisp/subdirs.el, so it's not like
copying it is gonna cause any recompilation or something.

I'd rather use the technique we already
have in configure.bat to copy it only if it's different from the
already existing file.

See the attached patch. AFAICS, the "fc /b foo.bar foo.bar" test is
used to determine whether fc.exe exists and returns a meaningful
value, so I've copied that too (but perhaps it'd be better to set a
flag the first time the check is done instead of repeating it).

                   /L/e/k/t/u


Index: nt/configure.bat
===================================================================
RCS file: /cvsroot/emacs/emacs/nt/configure.bat,v
retrieving revision 1.35
diff -u -2 -r1.35 configure.bat
--- nt/configure.bat    21 Jan 2007 04:26:22 -0000      1.35
+++ nt/configure.bat    31 Jan 2007 01:42:47 -0000
@@ -520,6 +520,15 @@
 Rem Some people use WinZip which doesn't create empty directories!
 if not exist ..\site-lisp\nul mkdir ..\site-lisp\
-if not exist ..\site-lisp\subdirs.el copy subdirs.el ..\site-lisp\subdirs.el
+Rem Update subdirs.el only if it is different or fc.exe doesn't work.
+if exist foo.bar del foo.bar
+fc /b foo.bar foo.bar >nul 2>&1
+if not errorlevel 2 goto doUpdateSubdirs
+fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1
+if not errorlevel 1 goto dontUpdateSubdirs
+:doUpdateSubdirs
+if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el
+copy subdirs.el ..\site-lisp\subdirs.el

+:dontUpdateSubdirs
echo.
echo Emacs successfully configured.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]