annotate lisp/energize/energize-uimx.el @ 71:bae944334fa4

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