Gnus development mailing list
 help / color / mirror / Atom feed
* "make" in lisp/ not doing The Right Thing?
@ 2002-02-20 14:45 Karra
  2002-02-20 15:03 ` Simon Josefsson
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Karra @ 2002-02-20 14:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 234 bytes --]


Is there any good reason for the following behaviour:  _all_ .elc
files are built from the .el files, even if they are newer than the
corresponding .el files.

If not, please consider the following patch, or some variation thereof.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: my.diff --]
[-- Type: text/x-patch, Size: 1375 bytes --]

Index: lisp/Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/Makefile.in,v
retrieving revision 6.9
diff -u -r6.9 Makefile.in
--- lisp/Makefile.in	2002/01/11 02:36:58	6.9
+++ lisp/Makefile.in	2002/02/20 14:43:10
@@ -19,7 +19,7 @@
 	$(EMACS_COMP) -f dgnushack-compile
 
 clean-some:
-	rm -f *.elc gnus-load.el
+	rm -f gnus-load.el
 
 warn: clean-some gnus-load.el
 	$(EMACS_COMP) --eval '(dgnushack-compile t)' 2>&1 | egrep -v "variable G|inhibit-point-motion-hooks|coding-system|temp-results|variable gnus|variable nn|scroll-in-place|deactivate-mark|filladapt-mode|byte-code-function-p|print-quoted|ps-right-header|ps-left-header|article-inhibit|print-escape|ssl-program-arguments|message-log-max"
Index: lisp/dgnushack.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/dgnushack.el,v
retrieving revision 6.28
diff -u -r6.28 dgnushack.el
--- lisp/dgnushack.el	2002/02/20 00:15:30	6.28
+++ lisp/dgnushack.el	2002/02/20 14:43:12
@@ -264,7 +264,7 @@
     (dolist (file files)
       (setq file (expand-file-name file srcdir))
       (when (and (file-exists-p
-		  (setq elc (concat (file-name-nondirectory file) "c")))
+		  (setq elc (concat srcdir (file-name-nondirectory file) "c")))
 		 (file-newer-than-file-p file elc))
 	(delete-file elc)))
 

[-- Attachment #3: Type: text/plain, Size: 77 bytes --]


-- 
"Have you ever fought an IDEA, Picard?"
      -- Gowron, Star Trek TNG.

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

* Re: "make" in lisp/ not doing The Right Thing?
  2002-02-20 14:45 "make" in lisp/ not doing The Right Thing? Karra
  2002-02-20 15:03 ` Simon Josefsson
@ 2002-02-20 15:03 ` Simon Josefsson
  2002-02-20 15:15 ` ShengHuo ZHU
  2002-02-20 15:15 ` ShengHuo ZHU
  3 siblings, 0 replies; 8+ messages in thread
From: Simon Josefsson @ 2002-02-20 15:03 UTC (permalink / raw)
  Cc: ding

On Wed, 20 Feb 2002, Karra wrote:

> Is there any good reason for the following behaviour:  _all_ .elc
> files are built from the .el files, even if they are newer than the
> corresponding .el files.

Yes.  Some files contain macros used by other files.  If the macro is
changed, the other file need to be compiled as well.  Maybe someone can
write a makefile dependency generator for elisp, but there isn't one
AFAIK.

Type "make l" if you know the code well enough to feel confident about
only compiling updated lisp files.  This is why a ding.cvs-patches
newsgroup or similar would be useful, btw.




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

* Re: "make" in lisp/ not doing The Right Thing?
  2002-02-20 14:45 "make" in lisp/ not doing The Right Thing? Karra
@ 2002-02-20 15:03 ` Simon Josefsson
  2002-02-20 15:03 ` Simon Josefsson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Simon Josefsson @ 2002-02-20 15:03 UTC (permalink / raw)
  Cc: ding

On Wed, 20 Feb 2002, Karra wrote:

> Is there any good reason for the following behaviour:  _all_ .elc
> files are built from the .el files, even if they are newer than the
> corresponding .el files.

Yes.  Some files contain macros used by other files.  If the macro is
changed, the other file need to be compiled as well.  Maybe someone can
write a makefile dependency generator for elisp, but there isn't one
AFAIK.

Type "make l" if you know the code well enough to feel confident about
only compiling updated lisp files.  This is why a ding.cvs-patches
newsgroup or similar would be useful, btw.




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

* Re: "make" in lisp/ not doing The Right Thing?
  2002-02-20 14:45 "make" in lisp/ not doing The Right Thing? Karra
  2002-02-20 15:03 ` Simon Josefsson
  2002-02-20 15:03 ` Simon Josefsson
@ 2002-02-20 15:15 ` ShengHuo ZHU
  2002-02-20 15:15 ` ShengHuo ZHU
  3 siblings, 0 replies; 8+ messages in thread
From: ShengHuo ZHU @ 2002-02-20 15:15 UTC (permalink / raw)


Karra <karra@cs.utah.edu> writes:

> Is there any good reason for the following behaviour:  _all_ .elc
> files are built from the .el files, even if they are newer than the
> corresponding .el files.

It is because some files depend on macros or inline functions in other
files. It is similar to .c files defending on some .h files.  If you
change .h files, you have to recompile .c files.  Due to the unknown
dependence, it is safe to build all .elc files.  However, if you are
sure that there are no such changes, you can use `make some'.

As to the second patch, you can't use srcdir as the prefix of .elc
files, because .elc files may not locate in the same directory as .el
files.  For example, you can put gnus source code in a directory, say
"gnus". To build it for Emacs in another directory, say "gnus-emacs",
run "../gnus/configure --src-dir=../gnus" under directory gnus-emacs.
To build it for XEmacs in the third directory, say "gnus-xemacs", run
"../gnus/configure --src-dir=../gnus --with-xemacs" under directory
gnus-xemacs.

ShengHuo



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

* Re: "make" in lisp/ not doing The Right Thing?
  2002-02-20 14:45 "make" in lisp/ not doing The Right Thing? Karra
                   ` (2 preceding siblings ...)
  2002-02-20 15:15 ` ShengHuo ZHU
@ 2002-02-20 15:15 ` ShengHuo ZHU
  2002-02-20 15:23   ` ShengHuo ZHU
  2002-02-20 15:23   ` ShengHuo ZHU
  3 siblings, 2 replies; 8+ messages in thread
From: ShengHuo ZHU @ 2002-02-20 15:15 UTC (permalink / raw)


Karra <karra@cs.utah.edu> writes:

> Is there any good reason for the following behaviour:  _all_ .elc
> files are built from the .el files, even if they are newer than the
> corresponding .el files.

It is because some files depend on macros or inline functions in other
files. It is similar to .c files defending on some .h files.  If you
change .h files, you have to recompile .c files.  Due to the unknown
dependence, it is safe to build all .elc files.  However, if you are
sure that there are no such changes, you can use `make some'.

As to the second patch, you can't use srcdir as the prefix of .elc
files, because .elc files may not locate in the same directory as .el
files.  For example, you can put gnus source code in a directory, say
"gnus". To build it for Emacs in another directory, say "gnus-emacs",
run "../gnus/configure --src-dir=../gnus" under directory gnus-emacs.
To build it for XEmacs in the third directory, say "gnus-xemacs", run
"../gnus/configure --src-dir=../gnus --with-xemacs" under directory
gnus-xemacs.

ShengHuo



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

* Re: "make" in lisp/ not doing The Right Thing?
  2002-02-20 15:15 ` ShengHuo ZHU
  2002-02-20 15:23   ` ShengHuo ZHU
@ 2002-02-20 15:23   ` ShengHuo ZHU
  1 sibling, 0 replies; 8+ messages in thread
From: ShengHuo ZHU @ 2002-02-20 15:23 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

[...]

> sure that there are no such changes, you can use `make some'.

Maybe I should not suggest this. See the comment below :-)

      # Rule for Lars and nobody else.

ShengHuo



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

* Re: "make" in lisp/ not doing The Right Thing?
  2002-02-20 15:15 ` ShengHuo ZHU
@ 2002-02-20 15:23   ` ShengHuo ZHU
  2002-02-20 15:23   ` ShengHuo ZHU
  1 sibling, 0 replies; 8+ messages in thread
From: ShengHuo ZHU @ 2002-02-20 15:23 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

[...]

> sure that there are no such changes, you can use `make some'.

Maybe I should not suggest this. See the comment below :-)

      # Rule for Lars and nobody else.

ShengHuo



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

* "make" in lisp/ not doing The Right Thing?
@ 2002-02-20 14:45 Karra
  0 siblings, 0 replies; 8+ messages in thread
From: Karra @ 2002-02-20 14:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 234 bytes --]


Is there any good reason for the following behaviour:  _all_ .elc
files are built from the .el files, even if they are newer than the
corresponding .el files.

If not, please consider the following patch, or some variation thereof.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: my.diff --]
[-- Type: text/x-patch, Size: 1375 bytes --]

Index: lisp/Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/Makefile.in,v
retrieving revision 6.9
diff -u -r6.9 Makefile.in
--- lisp/Makefile.in	2002/01/11 02:36:58	6.9
+++ lisp/Makefile.in	2002/02/20 14:43:10
@@ -19,7 +19,7 @@
 	$(EMACS_COMP) -f dgnushack-compile
 
 clean-some:
-	rm -f *.elc gnus-load.el
+	rm -f gnus-load.el
 
 warn: clean-some gnus-load.el
 	$(EMACS_COMP) --eval '(dgnushack-compile t)' 2>&1 | egrep -v "variable G|inhibit-point-motion-hooks|coding-system|temp-results|variable gnus|variable nn|scroll-in-place|deactivate-mark|filladapt-mode|byte-code-function-p|print-quoted|ps-right-header|ps-left-header|article-inhibit|print-escape|ssl-program-arguments|message-log-max"
Index: lisp/dgnushack.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/dgnushack.el,v
retrieving revision 6.28
diff -u -r6.28 dgnushack.el
--- lisp/dgnushack.el	2002/02/20 00:15:30	6.28
+++ lisp/dgnushack.el	2002/02/20 14:43:12
@@ -264,7 +264,7 @@
     (dolist (file files)
       (setq file (expand-file-name file srcdir))
       (when (and (file-exists-p
-		  (setq elc (concat (file-name-nondirectory file) "c")))
+		  (setq elc (concat srcdir (file-name-nondirectory file) "c")))
 		 (file-newer-than-file-p file elc))
 	(delete-file elc)))
 

[-- Attachment #3: Type: text/plain, Size: 77 bytes --]


-- 
"Have you ever fought an IDEA, Picard?"
      -- Gowron, Star Trek TNG.

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

end of thread, other threads:[~2002-02-20 15:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20 14:45 "make" in lisp/ not doing The Right Thing? Karra
2002-02-20 15:03 ` Simon Josefsson
2002-02-20 15:03 ` Simon Josefsson
2002-02-20 15:15 ` ShengHuo ZHU
2002-02-20 15:15 ` ShengHuo ZHU
2002-02-20 15:23   ` ShengHuo ZHU
2002-02-20 15:23   ` ShengHuo ZHU
2002-02-20 14:45 Karra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).