Release the current buffer when a thread exits.
[emacs.git] / admin / build-configs
blobe20024ff66600b1e21bde18783bdbd27e9fe7e9f
1 #! /usr/bin/perl
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/>.
23 require 5;
24 use Getopt::Long;
25 use File::Basename;
26 use Cwd;
28 @configs =
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", ""],
40 $log = "/tmp/$$.out";
41 print "Using log file $log\n";
42 unlink $log;
44 $root = $ENV{"EMACS_ROOT"};
45 $root = "/gd/gnu/emacs" unless $root;
47 $rc = GetOptions ("help" => \$help);
48 if ($rc == 0 || $help)
50 print <<USAGE;
51 build-configs
53 Build Emacs in different configurations.
55 --help show this help
57 USAGE
58 exit 1;
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 "/")
66 chdir "..";
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];
76 my $rc;
78 print "$configure_options, $make_options\n";
79 unlink "config.cache";
81 $rc = system ("$root/configure $configure_options >>$log 2>&1");
82 if ($rc != 0)
84 print "configure failed\n";
85 exit 1;
88 $rc = system ("make-emacs --all $make_options >>$log 2>&1");
89 if ($rc != 0)
91 print "Make failed\n";
92 exit 1;
96 # Local Variables:
97 # mode: cperl
98 # End:
100 # arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30