annotate lisp/energize/energize-uimx.el @ 16:0293115a14e9 r19-15b91

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