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
|
70
|
16 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
17 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
0
|
18
|
|
19 ;;; This file provides integration between XEmacs, Energize and UIM/X.
|
|
20 ;;; It is not necessary to be running XEmacs as part of Energize.
|
|
21
|
|
22 ;;; To use this, store in a file, then do M-x load-file and type in the
|
|
23 ;;; file name. Alternatively, add (load-file "...filename...") to your
|
|
24 ;;; .emacs file to load it every time you start Emacs.
|
|
25
|
|
26 ;; First we add a menu item File->UIM/X to the menu bar (if it is not
|
|
27 ;; already present), and set the action for this to be "start UIM/X" with
|
|
28 ;; a couple of make flags set.
|
|
29
|
|
30 (add-menu-item '("File") "UIM/X" 'start-uimx-running t)
|
|
31
|
|
32 ;; When we start UIM/X running, we start a process which runs a shell in
|
|
33 ;; the background. This first sets the environment variable MAKEFLAGS to
|
|
34 ;; be -e, forcing the environment variable CC to take precedence over the
|
|
35 ;; defaults, and defining CC to be what we want. Then it starts UIM/X
|
|
36 ;; running. When the user selects "make" the correct options should get
|
|
37 ;; selected to do an Energize build.
|
|
38
|
|
39 (defun start-uimx-running ()
|
|
40 (interactive)
|
|
41 (start-process "uimx" nil "sh" "-c" "MAKEFLAGS=e CC=\"lcc -Xk -Xez\" uimx")
|
|
42 )
|
|
43
|
|
44 ;; Issues outstanding:
|
|
45
|
|
46 ;; Make will always select all the generated C files for recompilation.
|
|
47 ;; Energize will automatically do the minimum work required when in incremental
|
|
48 ;; compilation mode. You also gain from incremental compilation and linking.
|
|
49 ;; Only writing changes rather than a whole project will reduce the required
|
|
50 ;; number of compilations.
|
|
51
|
|
52 ;; Incremental Compilation is not compatible with UIM/X interpreter.
|
|
53 ;; In order to avoid this being a problem, it is best to use full compile
|
|
54 ;; mode. To turn this on, either select "Full Compiles" from the customise
|
|
55 ;; compilation dialog box, or use the command:
|
|
56 ;;
|
|
57 ;; energize_make_target -Xez "filename.o" -build-option "full compile"
|
|
58 ;;
|
|
59 ;; from the directory where the file is located.
|
|
60
|
|
61 ;; Energize creates a project file which may nameclash with the existing
|
|
62 ;; UIM/X project file.
|
|
63
|
|
64 ;; If this happens, one workaround is to create a new project manually
|
|
65 ;; (using Project->New Project) and to specify the project file, and then
|
|
66 ;; build the project, rather than accepting the default while building.
|
|
67 ;; Another workaround is to rename the UIM/X project.
|
|
68
|
|
69
|