#! /usr/bin/perl
-# Copyright (C) 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+# Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
# Build Emacs with various options for profiling, debugging,
# with and without warnings enabled etc.
"malloc-check" => \$malloc_check,
"no-mcheck" => \$no_mcheck,
"alias" => \$aliasing,
+ "boot" => \$boot,
"wall" => \$wall,
"gcc3" => \$gcc3,
"trace-selection" => \$trace_selection,
+ "trace-move" => \$trace_move,
"stabs" => \$use_stabs,
"optim" => \$optim);
--help show this help
--all make clean versionclean first
+ --boot make boostrap, log to boot.log
--enable-checking ENABLE_CHECKING=1 (implies Lisp union type)
--no-warn disable warnings
--check-marked GC_CHECK_MARKED_OBJECTS=1
--wall compile with -Wall
--gcc3 use GCC 3.0 (30% slower compilation, slower code)
--trace-selection print traces in xselect.c
+ --trace-move print traces for move_it* functions
--stabs use -gstabs instead -g
Default is to compile with warnings, with -DGC_MCHECK=1, and
system ("$make clean versionclean") if $all;
-if ($wall)
+if ($wall)
{
$warn = "-Wall";
}
$defs = "$defs -DGC_CHECK_MARKED_OBJECTS=1" if $check_marked;
$defs = "$defs -DENABLE_CHECKING=1" if $enable_checking;
-if ($profile)
+if ($profile)
{
$opts = "-pg";
$defs = "$defs -DPROFILING=1";
}
else
{
- if ($use_stabs)
+ if ($use_stabs)
{
$opts = "-gstabs";
}
$defs = "$defs -DGC_MCHECK=1" unless $no_mcheck;
$defs = "$defs -DTRACE_SELECTION" if $trace_selection;
+$defs = "$defs -DDEBUG_TRACE_MOVE" if $trace_move;
# arch=pentium leads to slightly faster code than without.
$opts = "$opts -march=pentiumpro";
$cc = "/usr/bin/gcc";
$cc = "/gd/local/bin/gcc" if $gcc3;
+if ($boot)
+ {
+ chdir "..";
+ system "mv boot.log boot.log.old" if -f "boot.log";
+ exit system "script boot.log $make CC=\"$cc\" CFLAGS=\"$opts\" bootstrap";
+ }
+
exit system "$make CC=\"$cc\" CFLAGS=\"$opts\" @ARGV";
# Local Variables:
# mode: cperl
# End:
+
+# arch-tag: 5c3f9713-9ece-4a12-b3f8-deaff15974ba