help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building 22.1


From: Tim X
Subject: Re: Building 22.1
Date: Sun, 09 Sep 2007 12:18:29 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

"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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]