Mercurial > emacs
annotate admin/make-emacs @ 83008:040dd41ed7d0
Hookified termcap devices, added bootstrap display device, plus many bugfixes.
lisp/frame.el (display-color-cells): Pass display parameter to tty-display-color-cells.
lisp/term/xterm.el (xterm-register-default-colors): Pass the selected-frame to display-color-cells.
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Removed declarations.
(get_named_tty_display): New prototype.
(tty_clear_end_of_line, term_init): Updated to new prototype.
(initial_term_init): Renamed to init_initial_display.
src/dispnew.c (Fredraw_frame): ifdef-out DOS-specific code. Add display parameter to set_terminal_modes call.
(update_frame): Don't flush the tty of there is no tty.
(init_display): Set up a termcap display on the controlling tty and
change the initial frame to use that. Delete the initial display.
src/frame.c (Fframep): Return t for the initial frame.
(make_initial_frame): New function for creating the initial frame during bootstrap. Use init_initial_display, not initial_term_init.
(make_terminal_frame): Removed special cases for creating the initial frame.
src/frame.h (enum output_method): New entry: output_initial for the bootstrap display.
(FRAME_INITIAL_P): New macro.
(make_initial_frame): New prototype.
src/keyboard.c (interrupt_signal): Exit Emacs on SIGINT from the (frameless) controlling tty, if possible. Explain this in a comment.
(init_keyboard): Added comment about exiting on SIGINT.
(Fset_input_mode): A termcap frame is never the initial frame anymore.
src/sysdep.c (init_sys_modes): Update tty_set_terminal_modes call to the new prototype.
(reset_sys_modes): Comment out tty_clear_end_of_line call; it doesn't work anymore. Update tty_reset_terminal_modes call.
src/termchar.h (struct tty_display_info): Added pointer to the display structure, for reset_sys_modes.
src/termhooks.h (struct display): Added display parameter to set_terminal_modes_hook and reset_terminal_modes_hook.
src/term.c (initial_display): New variable.
(tty_ring_bell, tty_update_end, tty_set_terminal_window, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame, tty_clear_end_of_line)
(tty_write_glyphs, tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines): New functions.
(ring_bell, update_end, set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
(delete_glyphs, ins_del_lines): Removed special casing of termcap displays.
(get_tty_display): New function.
(Ftty_display_color_p, Ftty_display_color_cells): Use it.
(get_named_tty_display): Removed static.
(tty_set_terminal_modes, tty_reset_terminal_modes): Changed to use a display parameter
instead of tty_display_info for hook compatibility.
(set_terminal_modes, reset_terminal_modes): Removed.
(initial_term_init): Renamed to init_initial_display. Set up an
output_initial device, not a termcap display.
(delete_initial_display): New function.
(maybe_fatal): New function, for private use of term_init.
(term_init): New parameter for choosing between fatal and simple errors.
Removed incomprehensible special casing for the second initialization of the
controlling tty. Use maybe_fatal for error handling.
Initialize termcap display hooks in the new device.
Initialize the display pointer in the tty_display_info structure.
(delete_tty): Replace order of reset_sys_modes and delete_display.
src/window.c (init_window_once): Call make_initial_frame instead of make_terminal_frame.
src/xfaces.c (realize_default_face, realize_face): Don't abort on the bootstrap display device.
src/xterm.c (XTset_terminal_modes, XTreset_terminal_modes): Added display parameter.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-48
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 09 Jan 2004 18:57:53 +0000 |
parents | 695cf19ef79e |
children | c53a9463c31a 375f2633d815 |
rev | line source |
---|---|
38850 | 1 #! /usr/bin/perl |
2 | |
3 # Copyright (C) 2001 Free Software Foundation, Inc. | |
4 # | |
5 # This file is part of GNU Emacs. | |
6 # | |
7 # GNU Emacs is free software; you can redistribute it and/or modify | |
8 # it under the terms of the GNU General Public License as published by | |
9 # the Free Software Foundation; either version 2, or (at your option) | |
10 # any later version. | |
11 # | |
12 # GNU Emacs is distributed in the hope that it will be useful, | |
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 # GNU General Public License for more details. | |
16 # | |
17 # You should have received a copy of the GNU General Public License | |
18 # along with GNU Emacs; see the file COPYING. If not, write to the | |
19 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 # Boston, MA 02111-1307, USA. | |
21 | |
22 # Build Emacs with various options for profiling, debugging, | |
23 # with and without warnings enabled etc. | |
24 | |
25 require 5; | |
26 use Getopt::Long; | |
27 use File::Basename; | |
28 use Cwd; | |
29 | |
30 # Default CVS sandbox directory. Only used when called from outside | |
31 # of the sandbox. | |
32 | |
33 $root = $ENV{"EMACS_ROOT"}; | |
34 $root = "/gd/gnu/emacs" unless $root; | |
35 | |
36 # Default make command. | |
37 | |
38 $make = $ENV{"EMACS_MAKE"}; | |
39 $make = "gmake" unless $make; | |
40 | |
41 $rc = GetOptions ("help" => \$help, | |
42 "enable-checking" => \$enable_checking, | |
43 "no-warn" => \$no_warn, | |
44 "check-marked" => \$check_marked, | |
45 "all" => \$all, | |
46 "no-optim" => \$no_optim, | |
47 "union-type" => \$union_type, | |
48 "gprof" => \$profile, | |
49 "malloc-check" => \$malloc_check, | |
50 "no-mcheck" => \$no_mcheck, | |
51 "alias" => \$aliasing, | |
39871
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
52 "boot" => \$boot, |
38850 | 53 "wall" => \$wall, |
54 "gcc3" => \$gcc3, | |
55 "trace-selection" => \$trace_selection, | |
41841 | 56 "trace-move" => \$trace_move, |
38850 | 57 "stabs" => \$use_stabs, |
58 "optim" => \$optim); | |
59 | |
60 if ($rc == 0 || $help) | |
61 { | |
62 print <<USAGE; | |
63 make-emacs [options] ... | |
64 | |
65 Build Emacs. | |
66 | |
67 --help show this help | |
68 --all make clean versionclean first | |
39871
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
69 --boot make boostrap, log to boot.log |
38850 | 70 --enable-checking ENABLE_CHECKING=1 (implies Lisp union type) |
71 --no-warn disable warnings | |
72 --check-marked GC_CHECK_MARKED_OBJECTS=1 | |
73 --optim no debug defines | |
74 --gprof make Emacs for profiling | |
75 --union-type define USE_LISP_UNION_TYPE (bad for GDB) | |
76 --malloc-check define GC_MALLOC_CHECK | |
77 --no-mcheck dont define GC_MCHECK | |
78 --wall compile with -Wall | |
79 --gcc3 use GCC 3.0 (30% slower compilation, slower code) | |
80 --trace-selection print traces in xselect.c | |
41841 | 81 --trace-move print traces for move_it* functions |
38850 | 82 --stabs use -gstabs instead -g |
83 | |
84 Default is to compile with warnings, with -DGC_MCHECK=1, and | |
85 with -DGLYPH_DEBUG=1. | |
86 | |
87 USAGE | |
88 exit 1; | |
89 } | |
90 | |
91 # Chdir to the top-level directory of the tree. If not in a tree | |
92 # containing Emacs, use the default. | |
93 | |
94 while (! -f "src/emacs.c" && cwd () ne "/") | |
95 { | |
96 chdir ".."; | |
97 } | |
98 | |
99 chdir $root if cwd () eq "/"; | |
100 chdir "./src"; | |
101 print "Build in ", cwd (), "\n"; | |
102 | |
103 # If first arg is `all' or if `--all' specified, ensure a clean | |
104 # build. | |
105 | |
106 if (@ARGV && $ARGV[0] eq "all") | |
107 { | |
108 $all = 1; | |
109 shift @ARGV; | |
110 } | |
111 | |
112 system ("$make clean versionclean") if $all; | |
113 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
41841
diff
changeset
|
114 if ($wall) |
38850 | 115 { |
116 $warn = "-Wall"; | |
117 } | |
118 elsif (!$no_warn) | |
119 { | |
120 $warn = "-Wpointer-arith -Wchar-subscripts -Wformat -Wimplicit-int"; | |
121 $warn = "$warn -Wreturn-type -Wswitch -Wuninitialized"; | |
122 } | |
123 | |
124 $defs = "-DGLYPH_DEBUG=1" unless $optim; | |
125 $defs = "$defs -DGC_CHECK_MARKED_OBJECTS=1" if $check_marked; | |
126 $defs = "$defs -DENABLE_CHECKING=1" if $enable_checking; | |
127 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
41841
diff
changeset
|
128 if ($profile) |
38850 | 129 { |
130 $opts = "-pg"; | |
131 $defs = "$defs -DPROFILING=1"; | |
132 } | |
133 else | |
134 { | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
41841
diff
changeset
|
135 if ($use_stabs) |
38850 | 136 { |
137 $opts = "-gstabs"; | |
138 } | |
139 else | |
140 { | |
141 $opts = "-g"; | |
142 } | |
143 } | |
144 | |
145 $defs = "$defs -DUSE_LISP_UNION_TYPE" if $union_type; | |
146 $defs = "$defs -DGC_MALLOC_CHECK=1 -DGC_PROTECT_MALLOC_STATE=1" if $malloc_check; | |
147 $defs = "$defs -DGC_MCHECK=1" unless $no_mcheck; | |
148 | |
149 $defs = "$defs -DTRACE_SELECTION" if $trace_selection; | |
41841 | 150 $defs = "$defs -DDEBUG_TRACE_MOVE" if $trace_move; |
38850 | 151 |
152 # arch=pentium leads to slightly faster code than without. | |
153 $opts = "$opts -march=pentiumpro"; | |
154 | |
155 if ($optim) | |
156 { | |
157 $opts = "$opts -pipe -O3"; | |
158 } | |
159 elsif ($no_optim) | |
160 { | |
161 $opts = "$opts -pipe -fno-inline"; | |
162 } | |
163 else | |
164 { | |
165 $opts = "$opts -O -pipe -fno-inline"; | |
166 } | |
167 | |
168 $opts = "$opts -fstrict-aliasing" if $aliasing; | |
169 | |
170 $opts = "$opts $defs" if $defs; | |
171 $opts = "$opts $warn" if $warn; | |
172 | |
173 $cc = "/usr/bin/gcc"; | |
174 $cc = "/gd/local/bin/gcc" if $gcc3; | |
175 | |
39871
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
176 if ($boot) |
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
177 { |
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
178 chdir ".."; |
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
179 system "mv boot.log boot.log.old" if -f "boot.log"; |
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
180 exit system "script boot.log $make CC=\"$cc\" CFLAGS=\"$opts\" bootstrap"; |
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
181 } |
6bd2a61edfa8
Add --boot switch for bootstrapping. Logs to
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
182 |
38850 | 183 exit system "$make CC=\"$cc\" CFLAGS=\"$opts\" @ARGV"; |
184 | |
185 # Local Variables: | |
186 # mode: cperl | |
187 # End: | |
52401 | 188 |
189 # arch-tag: 5c3f9713-9ece-4a12-b3f8-deaff15974ba |