annotate admin/make-emacs @ 73065:61ed91e76de6

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Sep 2006 02:59:43 +0000
parents a8b22f12b3dc
children ddcbd2c1b70d 72dea2ff0142
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 #! /usr/bin/perl
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
70120
a8b22f12b3dc updated copyright year(s)
Ramprasad B <ramprasad_i82@yahoo.com>
parents: 64079
diff changeset
3 # Copyright (C) 2001, 2006 Free Software Foundation, Inc.
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5 # This file is part of GNU Emacs.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7 # GNU Emacs is free software; you can redistribute it and/or modify
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8 # it under the terms of the GNU General Public License as published by
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9 # the Free Software Foundation; either version 2, or (at your option)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 # any later version.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 # GNU Emacs is distributed in the hope that it will be useful,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 # GNU General Public License for more details.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 # along with GNU Emacs; see the file COPYING. If not, write to the
64079
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
19 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
20 # Boston, MA 02110-1301, USA.
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22 # Build Emacs with various options for profiling, debugging,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23 # with and without warnings enabled etc.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
24
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25 require 5;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26 use Getopt::Long;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27 use File::Basename;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 use Cwd;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 # Default CVS sandbox directory. Only used when called from outside
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 # of the sandbox.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 $root = $ENV{"EMACS_ROOT"};
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 $root = "/gd/gnu/emacs" unless $root;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 # Default make command.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 $make = $ENV{"EMACS_MAKE"};
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39 $make = "gmake" unless $make;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 $rc = GetOptions ("help" => \$help,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 "enable-checking" => \$enable_checking,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 "no-warn" => \$no_warn,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 "check-marked" => \$check_marked,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 "all" => \$all,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 "no-optim" => \$no_optim,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
47 "union-type" => \$union_type,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 "gprof" => \$profile,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49 "malloc-check" => \$malloc_check,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
50 "no-mcheck" => \$no_mcheck,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
53 "wall" => \$wall,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
54 "gcc3" => \$gcc3,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
55 "trace-selection" => \$trace_selection,
41841
1b65cbdd3bbd Add --trace-move.
Gerd Moellmann <gerd@gnu.org>
parents: 39871
diff changeset
56 "trace-move" => \$trace_move,
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
57 "stabs" => \$use_stabs,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
58 "optim" => \$optim);
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
59
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60 if ($rc == 0 || $help)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
62 print <<USAGE;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
63 make-emacs [options] ...
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65 Build Emacs.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
66
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 --help show this help
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70 --enable-checking ENABLE_CHECKING=1 (implies Lisp union type)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71 --no-warn disable warnings
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 --check-marked GC_CHECK_MARKED_OBJECTS=1
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 --optim no debug defines
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 --gprof make Emacs for profiling
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 --union-type define USE_LISP_UNION_TYPE (bad for GDB)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 --malloc-check define GC_MALLOC_CHECK
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 --no-mcheck dont define GC_MCHECK
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 --wall compile with -Wall
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 --gcc3 use GCC 3.0 (30% slower compilation, slower code)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 --trace-selection print traces in xselect.c
41841
1b65cbdd3bbd Add --trace-move.
Gerd Moellmann <gerd@gnu.org>
parents: 39871
diff changeset
81 --trace-move print traces for move_it* functions
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82 --stabs use -gstabs instead -g
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
83
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
84 Default is to compile with warnings, with -DGC_MCHECK=1, and
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 with -DGLYPH_DEBUG=1.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
87 USAGE
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
88 exit 1;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
89 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
90
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
91 # Chdir to the top-level directory of the tree. If not in a tree
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 # containing Emacs, use the default.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
94 while (! -f "src/emacs.c" && cwd () ne "/")
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
95 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
96 chdir "..";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99 chdir $root if cwd () eq "/";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 chdir "./src";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
101 print "Build in ", cwd (), "\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
102
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
103 # If first arg is `all' or if `--all' specified, ensure a clean
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
104 # build.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
105
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
106 if (@ARGV && $ARGV[0] eq "all")
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
107 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
108 $all = 1;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
109 shift @ARGV;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
110 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
111
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
112 system ("$make clean versionclean") if $all;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
113
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41841
diff changeset
114 if ($wall)
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
115 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
116 $warn = "-Wall";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
117 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
118 elsif (!$no_warn)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
119 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
120 $warn = "-Wpointer-arith -Wchar-subscripts -Wformat -Wimplicit-int";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
121 $warn = "$warn -Wreturn-type -Wswitch -Wuninitialized";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
122 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
123
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
124 $defs = "-DGLYPH_DEBUG=1" unless $optim;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
125 $defs = "$defs -DGC_CHECK_MARKED_OBJECTS=1" if $check_marked;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
126 $defs = "$defs -DENABLE_CHECKING=1" if $enable_checking;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
127
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41841
diff changeset
128 if ($profile)
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
130 $opts = "-pg";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
131 $defs = "$defs -DPROFILING=1";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
132 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
133 else
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
134 {
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41841
diff changeset
135 if ($use_stabs)
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
136 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
137 $opts = "-gstabs";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
138 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
139 else
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
140 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
141 $opts = "-g";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
142 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
143 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
144
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
145 $defs = "$defs -DUSE_LISP_UNION_TYPE" if $union_type;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
146 $defs = "$defs -DGC_MALLOC_CHECK=1 -DGC_PROTECT_MALLOC_STATE=1" if $malloc_check;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
147 $defs = "$defs -DGC_MCHECK=1" unless $no_mcheck;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
148
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
149 $defs = "$defs -DTRACE_SELECTION" if $trace_selection;
41841
1b65cbdd3bbd Add --trace-move.
Gerd Moellmann <gerd@gnu.org>
parents: 39871
diff changeset
150 $defs = "$defs -DDEBUG_TRACE_MOVE" if $trace_move;
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
151
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
152 # arch=pentium leads to slightly faster code than without.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
153 $opts = "$opts -march=pentiumpro";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
154
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
155 if ($optim)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
156 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
157 $opts = "$opts -pipe -O3";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
158 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
159 elsif ($no_optim)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
160 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
161 $opts = "$opts -pipe -fno-inline";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
162 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
163 else
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
164 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
165 $opts = "$opts -O -pipe -fno-inline";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
166 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
167
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
168 $opts = "$opts -fstrict-aliasing" if $aliasing;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
169
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
170 $opts = "$opts $defs" if $defs;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
171 $opts = "$opts $warn" if $warn;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
172
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
173 $cc = "/usr/bin/gcc";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
174 $cc = "/gd/local/bin/gcc" if $gcc3;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
183 exit system "$make CC=\"$cc\" CFLAGS=\"$opts\" @ARGV";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
184
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
185 # Local Variables:
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
186 # mode: cperl
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
187 # End:
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
188
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
189 # arch-tag: 5c3f9713-9ece-4a12-b3f8-deaff15974ba