Mercurial > emacs
annotate admin/build-configs @ 76033:471d2cef4c42
Unjustify.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 20 Feb 2007 04:02:18 +0000 |
parents | 3d45362f1d38 |
children | 450fa81c5930 95d0cdf160ea |
rev | line source |
---|---|
38850 | 1 #! /usr/bin/perl |
2 | |
75348 | 3 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
4 # Free Software Foundation, Inc. | |
38850 | 5 # |
6 # This file is part of GNU Emacs. | |
7 # | |
8 # GNU Emacs is free software; you can redistribute it and/or modify | |
9 # it under the terms of the GNU General Public License as published by | |
10 # the Free Software Foundation; either version 2, or (at your option) | |
11 # any later version. | |
12 # | |
13 # GNU Emacs is distributed in the hope that it will be useful, | |
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 # GNU General Public License for more details. | |
17 # | |
18 # You should have received a copy of the GNU General Public License | |
19 # along with GNU Emacs; see the file COPYING. If not, write to the | |
64079 | 20 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 # Boston, MA 02110-1301, USA. | |
38850 | 22 |
23 # Build Emacs in several different configurations. | |
24 | |
40052
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
25 require 5; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
26 use Getopt::Long; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
27 use File::Basename; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
28 use Cwd; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
29 |
38850 | 30 @configs = |
31 ( | |
32 ["--without-x", "--optim"], | |
33 ["--without-x-toolkit", "--optim"], | |
34 ["--without-toolkit-scroll-bars", "--optim"], | |
35 ["--with-x-toolkit=lucid", "--optim"], | |
36 ["--with-x-toolkit=motif", "--optim"], | |
37 ["--with-x-toolkit=motif", "--enable-checking"], | |
38 ["--with-x-toolkit=motif", "--gcc3"], | |
39 ["--with-x-toolkit=motif", ""], | |
40 ); | |
41 | |
42 $log = "/tmp/$$.out"; | |
43 print "Using log file $log\n"; | |
44 unlink $log; | |
45 | |
46 $root = $ENV{"EMACS_ROOT"}; | |
47 $root = "/gd/gnu/emacs" unless $root; | |
40052
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
48 |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
49 $rc = GetOptions ("help" => \$help); |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
50 if ($rc == 0 || $help) |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
51 { |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
52 print <<USAGE; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
53 build-configs |
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 Build Emacs in different configurations. |
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 --help show this help |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
58 |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
59 USAGE |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
60 exit 1; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
61 } |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
62 |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
63 # 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
|
64 # containing Emacs, use the default. |
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 while (! -f "src/emacs.c" && cwd () ne "/") |
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 chdir ".."; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
69 } |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
70 |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
71 chdir $root if cwd () eq "/"; |
0f6e6a0405c4
Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents:
38850
diff
changeset
|
72 print "Build in ", cwd (), "\n"; |
38850 | 73 |
74 foreach $config (@configs) | |
75 { | |
76 my $configure_options = @$config[0]; | |
77 my $make_options = @$config[1]; | |
78 my $rc; | |
79 | |
80 print "$configure_options, $make_options\n"; | |
81 unlink "config.cache"; | |
82 | |
83 $rc = system ("$root/configure $configure_options >>$log 2>&1"); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
40052
diff
changeset
|
84 if ($rc != 0) |
38850 | 85 { |
86 print "configure failed\n"; | |
87 exit 1; | |
88 } | |
89 | |
90 $rc = system ("make-emacs --all $make_options >>$log 2>&1"); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
40052
diff
changeset
|
91 if ($rc != 0) |
38850 | 92 { |
93 print "Make failed\n"; | |
94 exit 1; | |
95 } | |
96 } | |
97 | |
98 # Local Variables: | |
99 # mode: cperl | |
100 # End: | |
52401 | 101 |
102 # arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30 |