2 # Build Emacs in several different configurations.
4 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 # Free Software Foundation, Inc.
7 # This file is part of GNU Emacs.
9 # GNU Emacs is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # GNU Emacs is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
30 ["--without-x", "--optim"],
31 ["--without-x-toolkit", "--optim"],
32 ["--without-toolkit-scroll-bars", "--optim"],
33 ["--with-x-toolkit=lucid", "--optim"],
34 ["--with-x-toolkit=motif", "--optim"],
35 ["--with-x-toolkit=motif", "--enable-checking"],
36 ["--with-x-toolkit=motif", "--gcc3"],
37 ["--with-x-toolkit=motif", ""],
41 print "Using log file $log\n";
44 $root = $ENV{"EMACS_ROOT"};
45 $root = "/gd/gnu/emacs" unless $root;
47 $rc = GetOptions
("help" => \
$help);
48 if ($rc == 0 || $help)
53 Build Emacs in different configurations.
61 # Chdir to the top-level directory of the tree. If not in a tree
62 # containing Emacs, use the default.
64 while (! -f
"src/emacs.c" && cwd
() ne "/")
69 chdir $root if cwd
() eq "/";
70 print "Build in ", cwd
(), "\n";
72 foreach $config (@configs)
74 my $configure_options = @
$config[0];
75 my $make_options = @
$config[1];
78 print "$configure_options, $make_options\n";
79 unlink "config.cache";
81 $rc = system ("$root/configure $configure_options >>$log 2>&1");
84 print "configure failed\n";
88 $rc = system ("make-emacs --all $make_options >>$log 2>&1");
91 print "Make failed\n";
100 # arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30