annotate admin/build-configs @ 106396:b99306fb62cc

(class): Restore still useful declaration. Restore comment that is still relevant.
author Glenn Morris <rgm@gnu.org>
date Thu, 03 Dec 2009 17:14:33 +0000
parents ce88a631c161
children 1d1d5d9bd884
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
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
2 # Build Emacs in several different configurations.
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3
100971
ce88a631c161 Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 94833
diff changeset
4 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
75348
3d45362f1d38 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74439
diff changeset
5 # Free Software Foundation, Inc.
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
6
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7 # This file is part of GNU Emacs.
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
8
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
9 # GNU Emacs is free software: you can redistribute it and/or modify
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 # it under the terms of the GNU General Public License as published by
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
11 # the Free Software Foundation, either version 3 of the License, or
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
12 # (at your option) any later version.
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
13
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 # GNU Emacs is distributed in the hope that it will be useful,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 # GNU General Public License for more details.
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
18
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 # You should have received a copy of the GNU General Public License
94833
e6db9ee945b8 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79744
diff changeset
20 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
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
40052
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
23 require 5;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
24 use Getopt::Long;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
25 use File::Basename;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
26 use Cwd;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
27
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 @configs =
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 ["--without-x", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 ["--without-x-toolkit", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 ["--without-toolkit-scroll-bars", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 ["--with-x-toolkit=lucid", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 ["--with-x-toolkit=motif", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 ["--with-x-toolkit=motif", "--enable-checking"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 ["--with-x-toolkit=motif", "--gcc3"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 ["--with-x-toolkit=motif", ""],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 );
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 $log = "/tmp/$$.out";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 print "Using log file $log\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 unlink $log;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 $root = $ENV{"EMACS_ROOT"};
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 $root = "/gd/gnu/emacs" unless $root;
40052
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
46
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
47 $rc = GetOptions ("help" => \$help);
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
48 if ($rc == 0 || $help)
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
49 {
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
50 print <<USAGE;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
51 build-configs
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
52
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
53 Build Emacs in different configurations.
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
54
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
55 --help show this help
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
56
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
57 USAGE
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
58 exit 1;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
59 }
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
60
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
61 # Chdir to the top-level directory of the tree. If not in a tree
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
62 # containing Emacs, use the default.
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
63
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
64 while (! -f "src/emacs.c" && cwd () ne "/")
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
65 {
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
66 chdir "..";
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
67 }
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
68
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
69 chdir $root if cwd () eq "/";
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
70 print "Build in ", cwd (), "\n";
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 foreach $config (@configs)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 my $configure_options = @$config[0];
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 my $make_options = @$config[1];
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 my $rc;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 print "$configure_options, $make_options\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 unlink "config.cache";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81 $rc = system ("$root/configure $configure_options >>$log 2>&1");
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 40052
diff changeset
82 if ($rc != 0)
38850
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 print "configure failed\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 exit 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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
88 $rc = system ("make-emacs --all $make_options >>$log 2>&1");
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 40052
diff changeset
89 if ($rc != 0)
38850
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 print "Make failed\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 exit 1;
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 }
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 # Local Variables:
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 # mode: cperl
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 # End:
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
99
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
100 # arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30