annotate admin/build-configs @ 50507:110c0e29159c

Handle multiple desktop files in different dirs. Other cleanups. Command line option --no-desktop introduced. (desktop-read): Record buffers in the desktop file in the same order as that in the buffer list, (desktop-save): Put buffers in the order given in desktop file, regardless of what handlers do. (desktop-file-version): New variable. Version number of desktop file format. (desktop-create-buffer-form): Variable deleted. (desktop-save): New customizable variable. (desktop-kill): Changed to use `desktop-save'. (desktop-file-name-format): New option: format in which desktop file names should be saved. (desktop-file-name): New function to convert a filename to the format specified in `desktop-file-name-format'. (desktop-create-buffer): Parameters renamed to descriptive systematic names. These parameters are visible to handlers. Renames: ver -> desktop-file-version mim -> desktop-buffer-minor-modes pt -> desktop-buffer-point mk -> desktop-buffer-mark ro -> desktop-buffer-read-only locals -> desktop-buffer-locals (desktop-buffer-major-mode, desktop-buffer-file-name) (desktop-buffer-name): Unused customizable variables deleted. (desktop-buffer-misc): Unused variable deleted. (desktop-save, desktop-buffer-dired-misc-data): Use `desktop-file-name'. (desktop-path): New customizable variable. List of directories in which to lookup the desktop file. Replaces hardcoded list. (desktop-globals-to-clear): New variable replaces hardcoded list. (desktop-clear-preserve-buffers-regexp): New customizable variable. (desktop-after-read-hook): New hook run after a desktop is read. (desktop-no-desktop-file-hook): New hook when no desktop file found. (desktop-change-dir): New function. (desktop-save-in-load-dir): New function. Save desktop in directory from witch it was loaded. (desktop-revert): New function. Revert to the last loaded desktop.
author Richard M. Stallman <rms@gnu.org>
date Wed, 09 Apr 2003 01:37:56 +0000
parents 23a1cea22d13
children 695cf19ef79e d7ddb3e565de
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");
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 40052
diff changeset
83 if ($rc != 0)
38850
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");
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 40052
diff changeset
90 if ($rc != 0)
38850
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: