** ZTHJWSQQAFHV@spammotel.com, Jan 12:
[bpt/emacs.git] / admin / make-emacs
index 83683c4..d6b14ca 100755 (executable)
@@ -1,6 +1,7 @@
 #! /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.
 #
@@ -16,8 +17,8 @@
 #
 # 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.
@@ -49,9 +50,11 @@ $rc = GetOptions ("help" => \$help,
                  "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);
 
@@ -64,6 +67,7 @@ Build Emacs.
 
  --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
@@ -75,6 +79,7 @@ Build Emacs.
  --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
@@ -107,7 +112,7 @@ if (@ARGV && $ARGV[0] eq "all")
 
 system ("$make clean versionclean") if $all;
 
-if ($wall) 
+if ($wall)
   {
     $warn = "-Wall";
   }
@@ -121,14 +126,14 @@ $defs = "-DGLYPH_DEBUG=1" unless $optim;
 $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";
       }
@@ -143,6 +148,7 @@ $defs = "$defs -DGC_MALLOC_CHECK=1 -DGC_PROTECT_MALLOC_STATE=1" if $malloc_check
 $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";
@@ -168,8 +174,17 @@ $opts = "$opts $warn" if $warn;
 $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