From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26767 Path: main.gmane.org!not-for-mail From: wmperry@aventail.com (William M. Perry) Newsgroups: gmane.emacs.gnus.general Subject: Re: building pgnus with VPATH Date: 12 Nov 1999 19:58:02 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <86yac3b42t.fsf@megalith.bp.aventail.com> References: Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035163914 21125 80.91.224.250 (21 Oct 2002 01:31:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:31:54 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id TAA09528 for ; Fri, 12 Nov 1999 19:57:05 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id SAB27717; Fri, 12 Nov 1999 18:57:02 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 12 Nov 1999 18:57:03 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id SAA07165 for ; Fri, 12 Nov 1999 18:56:51 -0600 (CST) Original-Received: from biff.kiva.net (biff.kiva.net [206.97.64.31]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id TAA09513 for ; Fri, 12 Nov 1999 19:56:18 -0500 (EST) Original-Received: (qmail 10803 invoked from network); 13 Nov 1999 00:55:00 -0000 Original-Received: from usrpri2-5.kiva.net (HELO megalith.bp.aventail.com) (206.97.75.70) by biff.kiva.net with SMTP; 13 Nov 1999 00:55:00 -0000 Original-Received: (from wmperry@localhost) by megalith.bp.aventail.com (8.9.3/8.9.3) id TAA06623; Fri, 12 Nov 1999 19:58:02 -0500 Original-To: Denys Duchier X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 writes: > Jason R Mastaler writes: > > > It would be nice if pgnus could be compiled in a separate directory > > than the sources, especially now that we can update via CVS. > > > > Although I'm not sure how to implement this > > This request also gets my vote. The autoconf documentation explains > the technique: > > > To support `VPATH', each `Makefile.in' should contain two lines that > > look like: > > > > srcdir = @srcdir@ > > VPATH = @srcdir@ > > This is nice for several reasons: (1) you can have one source tree and > multiple build dirs for different architectures (or, in gnus case, > different emacs implementations) - this is great for updating in an > heterogenous environment, (2) you don't pollute the source tree, which is > great when you also participate in the development. Less filling _and_ > tastes great! Emacs/W3 supports this - there are a couple of gotchas though. This is from the Emacs/W3 lisp/docomp.el script that is loaded before batch-byte-compile is executed. ;; 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")))) Building in a separate dir is very nice for keeping Emacs & XEmacs bytecode separate. -Bill P.