all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Pushing newer nt/subdirs.el into site-lisp/
@ 2007-01-30 10:16 Juanma Barranquero
  2007-01-30 20:20 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2007-01-30 10:16 UTC (permalink / raw)
  To: Emacs Devel

nt/configure.bat does not copy subdirs.el to site-lisp/ if it already
exists. That precludes pushing any changes in nt/subdirs.el into
site-lisp/.

Is that by design, or would be better to apply the following patch?


                    /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	30 Jan 2007 10:07:36 -0000
@@ -520,5 +520,6 @@
 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
+if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el
+copy subdirs.el ..\site-lisp\subdirs.el

 echo.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Pushing newer nt/subdirs.el into site-lisp/
  2007-01-30 10:16 Pushing newer nt/subdirs.el into site-lisp/ Juanma Barranquero
@ 2007-01-30 20:20 ` Eli Zaretskii
  2007-01-31  1:47   ` Juanma Barranquero
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2007-01-30 20:20 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> Date: Tue, 30 Jan 2007 11:16:39 +0100
> From: "Juanma Barranquero" <lekktu@gmail.com>
> 
> nt/configure.bat does not copy subdirs.el to site-lisp/ if it already
> exists. That precludes pushing any changes in nt/subdirs.el into
> site-lisp/.
> 
> Is that by design, or would be better to apply the following patch?

I don't think it's by design, but your patch is too intrusive: it
_always_ copies subdirs.el.  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.  Look in the section of configure.bat that
begins with "Rem See if fc.exe returns a meaningful exit status."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Pushing newer nt/subdirs.el into site-lisp/
  2007-01-30 20:20 ` Eli Zaretskii
@ 2007-01-31  1:47   ` Juanma Barranquero
  2007-01-31  4:15     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2007-01-31  1:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 1/30/07, Eli Zaretskii <eliz@gnu.org> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Pushing newer nt/subdirs.el into site-lisp/
  2007-01-31  1:47   ` Juanma Barranquero
@ 2007-01-31  4:15     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2007-01-31  4:15 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> Date: Wed, 31 Jan 2007 02:47:25 +0100
> From: "Juanma Barranquero" <lekktu@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> 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).

Your patch is fine with me.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-31  4:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-30 10:16 Pushing newer nt/subdirs.el into site-lisp/ Juanma Barranquero
2007-01-30 20:20 ` Eli Zaretskii
2007-01-31  1:47   ` Juanma Barranquero
2007-01-31  4:15     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.