0
|
1 ;;; Copyright (C) 1992 Free Software Foundation, Inc.
|
|
2
|
|
3 ;; This file is part of XEmacs.
|
|
4
|
|
5 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
6 ;; under the terms of the GNU General Public License as published by
|
|
7 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
8 ;; any later version.
|
|
9
|
|
10 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
11 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13 ;; General Public License for more details.
|
|
14
|
|
15 ;; You should have received a copy of the GNU General Public License
|
16
|
16 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
17 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
18 ;; Boston, MA 02111-1307, USA.
|
0
|
19
|
|
20 ;;; This file provides integration between XEmacs, Energize and UIM/X.
|
|
21 ;;; It is not necessary to be running XEmacs as part of Energize.
|
|
22
|
|
23 ;;; To use this, store in a file, then do M-x load-file and type in the
|
|
24 ;;; file name. Alternatively, add (load-file "...filename...") to your
|
|
25 ;;; .emacs file to load it every time you start Emacs.
|
|
26
|
|
27 ;; First we add a menu item File->UIM/X to the menu bar (if it is not
|
|
28 ;; already present), and set the action for this to be "start UIM/X" with
|
|
29 ;; a couple of make flags set.
|
|
30
|
|
31 (add-menu-item '("File") "UIM/X" 'start-uimx-running t)
|
|
32
|
|
33 ;; When we start UIM/X running, we start a process which runs a shell in
|
|
34 ;; the background. This first sets the environment variable MAKEFLAGS to
|
|
35 ;; be -e, forcing the environment variable CC to take precedence over the
|
|
36 ;; defaults, and defining CC to be what we want. Then it starts UIM/X
|
|
37 ;; running. When the user selects "make" the correct options should get
|
|
38 ;; selected to do an Energize build.
|
|
39
|
|
40 (defun start-uimx-running ()
|
|
41 (interactive)
|
|
42 (start-process "uimx" nil "sh" "-c" "MAKEFLAGS=e CC=\"lcc -Xk -Xez\" uimx")
|
|
43 )
|
|
44
|
|
45 ;; Issues outstanding:
|
|
46
|
|
47 ;; Make will always select all the generated C files for recompilation.
|
|
48 ;; Energize will automatically do the minimum work required when in incremental
|
|
49 ;; compilation mode. You also gain from incremental compilation and linking.
|
|
50 ;; Only writing changes rather than a whole project will reduce the required
|
|
51 ;; number of compilations.
|
|
52
|
|
53 ;; Incremental Compilation is not compatible with UIM/X interpreter.
|
|
54 ;; In order to avoid this being a problem, it is best to use full compile
|
|
55 ;; mode. To turn this on, either select "Full Compiles" from the customise
|
|
56 ;; compilation dialog box, or use the command:
|
|
57 ;;
|
|
58 ;; energize_make_target -Xez "filename.o" -build-option "full compile"
|
|
59 ;;
|
|
60 ;; from the directory where the file is located.
|
|
61
|
|
62 ;; Energize creates a project file which may nameclash with the existing
|
|
63 ;; UIM/X project file.
|
|
64
|
|
65 ;; If this happens, one workaround is to create a new project manually
|
|
66 ;; (using Project->New Project) and to specify the project file, and then
|
|
67 ;; build the project, rather than accepting the default while building.
|
|
68 ;; Another workaround is to rename the UIM/X project.
|
|
69
|
|
70
|