annotate admin/build-configs @ 78926:2d17b1951fc2

*** empty log message ***
author Martin Rudalics <rudalics@gmx.at>
date Mon, 01 Oct 2007 06:44:10 +0000
parents 450fa81c5930
children cde444d03b82 f55f9811f5d7
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
75348
3d45362f1d38 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74439
diff changeset
3 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
3d45362f1d38 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74439
diff changeset
4 # Free Software Foundation, Inc.
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 # This file is part of GNU Emacs.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8 # GNU Emacs is free software; you can redistribute it and/or modify
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
78240
450fa81c5930 Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75348
diff changeset
10 # the Free Software Foundation; either version 3, or (at your option)
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 # any later version.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 # GNU Emacs is distributed in the hope that it will be useful,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 # GNU General Public License for more details.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 # along with GNU Emacs; see the file COPYING. If not, write to the
64079
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
20 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
c53a9463c31a Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
21 # Boston, MA 02110-1301, USA.
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23 # Build Emacs in several different configurations.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 @configs =
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 (
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 ["--without-x", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 ["--without-x-toolkit", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 ["--without-toolkit-scroll-bars", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 ["--with-x-toolkit=lucid", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 ["--with-x-toolkit=motif", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 ["--with-x-toolkit=motif", "--enable-checking"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 ["--with-x-toolkit=motif", "--gcc3"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39 ["--with-x-toolkit=motif", ""],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 );
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 $log = "/tmp/$$.out";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 print "Using log file $log\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 unlink $log;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 $root = $ENV{"EMACS_ROOT"};
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
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 foreach $config (@configs)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 my $configure_options = @$config[0];
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 my $make_options = @$config[1];
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 my $rc;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 print "$configure_options, $make_options\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81 unlink "config.cache";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86 print "configure failed\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
87 exit 1;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
88 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
89
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93 print "Make failed\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
94 exit 1;
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 }
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 # Local Variables:
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99 # mode: cperl
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 # End:
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
101
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
102 # arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30