在自定义目录中安装 Emacs(在 OS X 上)

在自定义目录中安装 Emacs(在 OS X 上)

受够了 Xcode 自带的 emacs22,我决定升级到 emacs24。我不想覆盖系统默认设置,也不想弄乱它,所以我尝试将 emacs 安装在除 之外的自定义目录中/usr/local/

假设我将前缀设置为CUSTOM_DIR/emacs-24.2。我构建并安装了 emacs 24.2 到CUSTOM_DIR/emacs-24.2目录,因此,,,bin/和都在那里。(是的,我已经手动检查了所有必需的文件;自定义目录中的安装已完全完成。)但是当我尝试运行新版本的 emacs 时,我收到以下错误消息:libexec/share/var/

Warning: arch-dependent data dir (/usr/local/libexec/emacs/24.2/x86_64-apple-darwin12.2.1/) does not exist.
Warning: arch-independent data dir (/usr/local/share/emacs/24.2/etc/) does not exist.
Warning: Lisp directory `/usr/local/share/emacs/24.2/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/24.2/lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/24.2/leim' does not exist.
Error: charsets directory not found:
/usr/local/share/emacs/24.2/etc/charsets
Emacs will not function correctly without the character map files.
Please check your installation!

--prefix=CUSTOM_DIR/emacs-24.2因此,尽管我在运行时指定了选项,但 emacs 的搜索路径显然没有受到影响configure。我该如何解决这个问题?我需要更改任何配置文件吗?或者在配置和构建 emacs 时是否需要添加一些配置选项?(我从 tarball 构建了 emacs 24.2。)

PS 请不要建议其他安装方式。我知道如何安装 emacs 24,要么通过安装到/usr/local/,这似乎完全没有问题;或者使用 MacPorts 或类似项目;或者直接从 Emacs.app 二进制分发版中的命令行组件运行。我只是想解决这个问题。谢谢。

答案1

前段时间我曾经从源代码构建 emacs:

git://git.savannah.gnu.org/emacs.git

在自定义目录中:

./autogen.sh
./configure --prefix=$HOME/cmp/soft/sft/Emacs --enable-link-time-optimization
make bootstrap
make install

相关内容