unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: Building 22.1
Date: Sun, 09 Sep 2007 12:18:29 +1000	[thread overview]
Message-ID: <87wsv0h98q.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: mailman.488.1189240663.18990.help-gnu-emacs@gnu.org

"Dave Pawson" <dave.pawson@gmail.com> writes:

> Done! Built.
> (But in my /temp directory).
> It was the missing packages it would seem.
> Thanks for the hints.
>
> What's the 'normal' location for it please?
> I.e. where should I build it for emacs to be in it's normal home?
> Ubuntu 7 OS.
>

This all depends on the outcome you want. 

If you just want a stand alone non-integrated emacs, I'd put it in the
/usr/local tree. In fact, I'd put it there even if you want it integrated
with Debian's emacsen framework. I only put stuff in /usr if it comes from
a deb package. I also have /usr/local on its own partition. That way, if
for some reason in the future I decide to blow away my GNU Linux
installation (either to install a clean new version or change distros etc),
I can format all partitions except /home and /usr/local, leaving all my
locally installed and private stuff alone. 

You specify the installation prefix when you run configure. I think it
defaults to /usr/local, but best to verify. If thats the case, you should
be able to just do make install and it will be installed. 

Note however, if you want to have integration with other emacs debian
packages, such as emms or muse or whatever, you need to modify the emacs
sources - normally, at elast the startup.el file and you need to do this
*before* building emacs. 

To keep things simple and get full integration, here is what I do (I have
plenty of disk space - if your low on disk space, this may not be
feasible). 

1. Install the emacs22 deb package. This will ensure that debconf knows you
have an emacs22 version and therefore, all add-on deb packages need to be
built with/for that version. It also satisfies dependencies for add-on
packages. 

2. Do the emacs configure, specifying /usr/local as the install
prefix. Check all libraries, such as GTK dev libraries, various libraries
for handling images, sound etc are all satisfied. If not, install the
relevant packages and build again. 

3. Modify the lisp/startup.el file that is part of the emacs sources. You
need to add a defconstant for debian-emacs-flavor (set it to emacs22 even
though you are installing emacs 23 - I will explain why later). Yo also
need to modify the code later in that file which controls the loading of
site-start.d files. The easiest way to do this is to open the startup.el
file which comes with the deb version of emacs22 and search for the word
'debian' (case insensitive search). Open the startup.el file which comes
with the emacs sources and add the necessary bits (its commented in the deb
version, so its not hard). 

4. Do a make bootimage

5. Check that the executable runs correctly by running it from the src
directory. If all is working, do a make install. 

6. After make install, cd to /usr/local/share/emacs/<version> and remove
the site-lisp directory and replace it with a link to
/usr/share/emacs22/site-lisp

7. Make sure your /usr/local/bin directory is in your path before
/usr/bin. this will ensure your version of emacs is called before the deb
versions or whatever /etc/alternatives points to (yo could just change
/etc/alternatives, but this may get reset if you update the deb version of
emacs22.)

You should now have a version of emacs you have built from sources, but
which is also able to take advantage of debian managed add-ons, such as
auctex or nxml-mode or whatever. 

There are some dangers though ......

I know that the latest deb version of w3m-el will not work with emacs
23. You will need to get the latest dev version of that software to use w3m
in emacs 23. 

This is really a hack and may get you into some odd situations, especially
as you will be loading elisp built with emacs 22. While I've not noticed
any problems myself, its generally not a good idea to mix up byte codes
from different emacs versions. The danger here is probably low since at the
moment there doesn't seem to be much variation in the elisp between emacs
22 and emacs 23. This could change as 23 develops. 

The reason you need to set debian-emacs-flavor to emacs22 rather than
emacs23 is because this constant is used to setup the load-path and
src-path stuff. If you set it to emacs23, your version of emacs will look
for site-start files in /etc/emacs23/site-start.d and for byte code files
in /usr/share/emacs23/site-lisp/*, but because your version of emacs is not
a deb package, the deb isntallation process won't create any of these
directories or put the relevant files in them when a new version or updated
version of some elisp package is installed. Setting the debian-emacs-flavor
to emacs22 effectively works around this issue and ensures you have access
to the deb managed elisp packages. 

Of course, if you don't want to use any of the deb elisp packages and
intend to install everything from sources by hand, you don't need to do any
of this hackaery or install any of the debian emacsen stuff. 

If you do, once debian has an emacs23 package, install that and change the
debian-emacs-flavor to emacs23. While all of this is a hack and it does use
more disk space etc, it does have the advantage of the convenience of using
deb packages while at the same time, making it easy to run the latest emacs
CVS sources. Another advantage is that if for some reason the CVS version
of emacs is broken or has a bug that makes it difficult to use, you can
always run the debian version - handy to get you out of trouble in an
emergency. 

HTH

Tim





-- 
tcross (at) rapttech dot com dot au

  parent reply	other threads:[~2007-09-09  2:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 17:41 Building 22.1 Dave Pawson
2007-09-07 18:12 ` Eli Zaretskii
     [not found]   ` <711a73df0709071128m1885eb58t2ec873db1e61393c@mail.gmail.com>
2007-09-07 18:41     ` Eli Zaretskii
2007-09-07 18:51       ` Dave Pawson
2007-09-08  6:44         ` Eli Zaretskii
2007-09-08  8:26           ` Dave Pawson
2007-09-08  8:37             ` Dave Pawson
2007-09-08  8:44               ` Peter Dyballa
2007-09-08  8:44               ` Dave Pawson
2007-09-08  8:56                 ` Peter Dyballa
2007-09-08  9:21               ` Eli Zaretskii
     [not found]             ` <mailman.488.1189240663.18990.help-gnu-emacs@gnu.org>
2007-09-08 22:29               ` Giorgos Keramidas
2007-09-09  2:18               ` Tim X [this message]
2007-09-09  8:43                 ` David Kastrup
     [not found]       ` <mailman.469.1189191126.18990.help-gnu-emacs@gnu.org>
2007-09-07 19:26         ` Sven Joachim
2007-09-07 20:18           ` Dave Pawson
     [not found] <mailman.460.1189186905.18990.help-gnu-emacs@gnu.org>
2007-09-07 22:05 ` dsoliver
2007-09-07 23:40 ` Exal de Jesus Garcia Carrillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wsv0h98q.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).