annotate admin/build-configs @ 88721:4c12a4188863

("Thai"): Add cp874, iso-8859-11 coding systems.
author Dave Love <fx@gnu.org>
date Thu, 06 Jun 2002 11:32:53 +0000
parents 0f6e6a0405c4
children 23a1cea22d13
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3 # Copyright (C) 2001 Free Software Foundation, Inc.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5 # This file is part of GNU Emacs.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7 # GNU Emacs is free software; you can redistribute it and/or modify
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8 # it under the terms of the GNU General Public License as published by
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9 # the Free Software Foundation; either version 2, or (at your option)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 # any later version.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 # GNU Emacs is distributed in the hope that it will be useful,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 # GNU General Public License for more details.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 #
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 # along with GNU Emacs; see the file COPYING. If not, write to the
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20 # Boston, MA 02111-1307, USA.
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 # Build Emacs in several different configurations.
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23
40052
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
24 require 5;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
25 use Getopt::Long;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
26 use File::Basename;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
27 use Cwd;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
28
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29 @configs =
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 (
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 ["--without-x", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 ["--without-x-toolkit", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 ["--without-toolkit-scroll-bars", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 ["--with-x-toolkit=lucid", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 ["--with-x-toolkit=motif", "--optim"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 ["--with-x-toolkit=motif", "--enable-checking"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 ["--with-x-toolkit=motif", "--gcc3"],
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 ["--with-x-toolkit=motif", ""],
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 $log = "/tmp/$$.out";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 print "Using log file $log\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 unlink $log;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 $root = $ENV{"EMACS_ROOT"};
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 $root = "/gd/gnu/emacs" unless $root;
40052
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
47
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
48 $rc = GetOptions ("help" => \$help);
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
49 if ($rc == 0 || $help)
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
50 {
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
51 print <<USAGE;
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
52 build-configs
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
53
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
54 Build Emacs in different configurations.
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
55
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
56 --help show this help
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
57
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
58 USAGE
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
59 exit 1;
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
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
62 # 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
63 # containing Emacs, use the default.
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
64
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
65 while (! -f "src/emacs.c" && cwd () ne "/")
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
66 {
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
67 chdir "..";
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
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
70 chdir $root if cwd () eq "/";
0f6e6a0405c4 Add --help option. Add support for building
Gerd Moellmann <gerd@gnu.org>
parents: 38850
diff changeset
71 print "Build in ", cwd (), "\n";
38850
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 foreach $config (@configs)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 my $configure_options = @$config[0];
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 my $make_options = @$config[1];
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 my $rc;
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 print "$configure_options, $make_options\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 unlink "config.cache";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82 $rc = system ("$root/configure $configure_options >>$log 2>&1");
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
83 if ($rc != 0)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
84 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 print "configure failed\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86 exit 1;
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
89 $rc = system ("make-emacs --all $make_options >>$log 2>&1");
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
90 if ($rc != 0)
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
91 {
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 print "Make failed\n";
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93 exit 1;
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
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 # Local Variables:
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 # mode: cperl
f87dbbd87498 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99 # End: