* VPATH support for pgnus...
@ 1999-11-14 1:51 William M. Perry
0 siblings, 0 replies; only message in thread
From: William M. Perry @ 1999-11-14 1:51 UTC (permalink / raw)
This works for the lisp files at least. The texinfo stuff needs a
little work on the 'include' bits.
-Bill P.
[gnus]cvs diff -u
cvs server: Diffing .
cvs server: Diffing contrib
cvs server: Diffing etc
cvs server: Diffing lisp
Index: lisp/Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/Makefile.in,v
retrieving revision 5.3
diff -u -r5.3 Makefile.in
--- lisp/Makefile.in 1999/07/06 10:59:47 5.3
+++ lisp/Makefile.in 1999/11/14 01:49:47
@@ -6,22 +6,24 @@
top_srcdir = @top_srcdir@
EMACS = @EMACS@
-FLAGS = -batch -q -no-site-file -l ./dgnushack.el
+FLAGS = -batch -q -no-site-file -l $(srcdir)/dgnushack.el
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
SHELL = /bin/sh
VPATH = @srcdir@
all total:
- rm -f *.elc ; $(EMACS) $(FLAGS) -f dgnushack-compile
+ rm -f *.elc
+ srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-compile
warn:
- rm -f *.elc ; $(EMACS) $(FLAGS) --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"
+ rm -f *.elc
+ srcdir=$(srcdir) $(EMACS) $(FLAGS) --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"
# The "clever" rule is unsafe, since redefined macros are loaded from
# .elc files, and not the .el file.
clever some:
- $(EMACS) $(FLAGS) -f dgnushack-compile
+ srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-compile
install: clever
rm -f dgnushack.elc
Index: lisp/dgnushack.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/dgnushack.el,v
retrieving revision 5.3
diff -u -r5.3 dgnushack.el
--- lisp/dgnushack.el 1999/01/15 20:51:01 5.3
+++ lisp/dgnushack.el 1999/11/14 01:49:47
@@ -29,9 +29,31 @@
(fset 'facep 'ignore)
(require 'cl)
+
+;; If we are building w3 in a different directory than the source
+;; directory, we must read *.el from source directory and write *.elc
+;; into the building directory. For that, we define this function
+;; before loading bytecomp. Bytecomp doesn't overwrite this function.
+(defun byte-compile-dest-file (filename)
+ "Convert an Emacs Lisp source file name to a compiled file name.
+ In addition, remove directory name part from FILENAME."
+ (setq filename (byte-compiler-base-file-name filename))
+ (setq filename (file-name-sans-versions filename))
+ (setq filename (file-name-nondirectory filename))
+ (if (memq system-type '(win32 w32 mswindows windows-nt))
+ (setq filename (downcase filename)))
+ (cond ((eq system-type 'vax-vms)
+ (concat (substring filename 0 (string-match ";" filename)) "c"))
+ ((string-match emacs-lisp-file-regexp filename)
+ (concat (substring filename 0 (match-beginning 0)) ".elc"))
+ (t (concat filename ".elc"))))
+
(require 'bytecomp)
-(push "." load-path)
-(load "./lpath.el" nil t)
+
+(defvar srcdir (or (getenv "srcdir") "."))
+
+(push srcdir load-path)
+(load (expand-file-name "lpath.el" srcdir) nil t)
(defalias 'device-sound-enabled-p 'ignore)
(defalias 'play-sound-file 'ignore)
@@ -60,7 +82,7 @@
(push \"~/lisp/custom\" load-path)
Modify to suit your needs."))
- (let ((files (directory-files "." nil "^[^=].*\\.el$"))
+ (let ((files (directory-files srcdir nil "^[^=].*\\.el$"))
(xemacs (string-match "XEmacs" emacs-version))
;;(byte-compile-generate-call-tree t)
file elc)
@@ -68,6 +90,7 @@
(require 'w3-forms)
(error (setq files (delete "nnweb.el" (delete "nnlistserv.el" files)))))
(while (setq file (pop files))
+ (setq file (expand-file-name file srcdir))
(when (or (and (not xemacs)
(not (member file '("gnus-xmas.el" "gnus-picon.el"
"messagexmas.el" "nnheaderxm.el"
cvs server: Diffing texi
Index: texi/Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/Makefile.in,v
retrieving revision 5.6
diff -u -r5.6 Makefile.in
--- texi/Makefile.in 1999/02/26 17:00:51 5.6
+++ texi/Makefile.in 1999/11/14 01:49:48
@@ -4,6 +4,7 @@
subdir = texi
top_srcdir = @top_srcdir@
+VPATH=$(srcdir)
TEXI2DVI=texi2dvi
EMACS=emacs
MAKEINFO=@MAKEINFO@
cvs server: Diffing texi/ps
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-11-14 1:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-14 1:51 VPATH support for pgnus William M. Perry
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).