Mercurial > emacs
annotate mac/make-package @ 93188:bb7e96e383ab
(diary-frame-parameters, calendar-frame-parameters)
(calendar-and-diary-frame-parameters): Doc fixes.
(make-fancy-diary-buffer): Remove declaration.
(calendar-dedicate-diary): Replace call to deleted function
make-fancy-diary-buffer.
(calendar-frame-setup): New function.
(calendar-one-frame-setup, calendar-only-one-frame-setup)
(calendar-two-frame-setup): Call calendar-frame-setup to do the actual
work, and mark as obsolete.
(special-display-buffer-names): Don't mess with this; it's not our business.
(cal-x-load-hook): Defvar it, and mark as obsolete.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 25 Mar 2008 03:43:31 +0000 |
parents | 2cecfdf24daa |
children | 606f2d163a64 de6b7eaee358 |
rev | line source |
---|---|
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
1 #!/bin/sh |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
3 #### make-package: create a Mac OS X package for use by the installer. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
4 #### The installer will place the Emacs OSX application in |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
5 #### /Application/Emacs and the rest of emacs in the usual unix places |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
6 #### under /usr/local or some other location if specified as the first |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
7 #### argument. The disc image will be in the file EmacsInstaller.dmg. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
8 #### |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
9 #### Upon installation, this will leave two versions of emacs on the |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
10 #### computer, 20.7 and 21.1. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
11 #### |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
12 #### Examples: |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
13 #### ./make-package |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
14 #### Will create an installer that will place the emacs support |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
15 #### files inside /usr/local. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
16 #### ./make-package /usr |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
17 #### Will create an installer that will place the emacs support |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
18 #### files inside /usr. This will replace the default version of |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
19 #### emacs included with Mac OS X. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
20 |
79736 | 21 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
22 # Free Software Foundation, Inc. | |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
23 # |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
24 # This file is part of GNU Emacs. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
25 # |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
26 # GNU Emacs is free software; you can redistribute it and/or modify |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
27 # it under the terms of the GNU General Public License as published by |
78252
7a936a543e0d
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
77077
diff
changeset
|
28 # the Free Software Foundation; either version 3, or (at your option) |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
29 # any later version. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
30 # |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
31 # GNU Emacs is distributed in the hope that it will be useful, |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
32 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
33 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
34 # GNU General Public License for more details. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
35 # |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
36 # You should have received a copy of the GNU General Public License |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
37 # along with GNU Emacs; see the file COPYING. If not, write to the |
64083 | 38 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
39 # Boston, MA 02110-1301, USA. | |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
40 # |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
41 # Contributed by Steven Tamm (steventamm@mac.com). |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
42 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
43 progname="$0" |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
44 |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
45 srcdir="`pwd`/.." |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
46 builddir=${srcdir} |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
47 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
48 ## Default location to place it is /usr/local |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
49 prefix=/usr/local |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
50 appsdir=/Applications |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
51 emapp=Emacs.app |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
52 with_config=yes |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
53 with_app=yes |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
54 with_x=no |
49005
5c4e830c411b
* make-package: Now copies License and ReadMe files into the
Steven Tamm <steventamm@mac.com>
parents:
48990
diff
changeset
|
55 comp_diskimage=no |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
56 self_contained=no |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
57 app_symlink=no |
48616
d78591287910
Switched copying of .el files to be on by default.
Steven Tamm <steventamm@mac.com>
parents:
48605
diff
changeset
|
58 full_dist=yes |
66246
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
59 compressed_dist=no |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
60 build_in_place=no |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
61 keep_directory=no |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
62 |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
63 ac_prev= |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
64 display_usage=false; |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
65 config_options=; |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
66 while test $# != 0 |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
67 do |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
68 if test -n "$ac_prev"; then |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
69 eval "$ac_prev=\$1" |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
70 ac_prev= |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
71 continue |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
72 fi |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
73 case $1 in |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
74 -help | --help | --hel | --he | -h) |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
75 display_usage=yes ;; |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
76 -p | -prefix | --p | --prefix) |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
77 ac_prev=prefix ;; |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
78 -p=* | -prefix=* | --p=* | --prefix=*) |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
79 prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;; |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
80 --build-in-place | --build-in-place ) |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
81 build_in_place=yes ;; |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
82 --build-dir | -build-dir | --builddir | -build-dir) |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
83 build_in_place=no |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
84 ac_prev=builddir;; |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
85 --build-dir=* | -build-dir=* | -builddir=* | --builddir=*) |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
86 build_in_place=no |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
87 builddir=`expr "x$1" : 'x[^=]*=\(.*\)'`;; |
47782
de56ca3f523d
make-package: Now calls make bootstrap if .elc files are missing
Steven Tamm <steventamm@mac.com>
parents:
46297
diff
changeset
|
88 -no-configure | -no-conf | --no-configure | --no-conf | --without-config) |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
89 with_config=no ;; |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
90 -no-app | --no-app | -without-app | --without-app) |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
91 with_app=no ;; |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
92 -without-x | --without-x) |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
93 with_x=no ;; |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
94 -with-x | --with-x) |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
95 with_x=yes |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
96 with_app=no ;; |
48616
d78591287910
Switched copying of .el files to be on by default.
Steven Tamm <steventamm@mac.com>
parents:
48605
diff
changeset
|
97 --without-full-dist | -without-full-dist | -no-full-dist | -no-full) |
d78591287910
Switched copying of .el files to be on by default.
Steven Tamm <steventamm@mac.com>
parents:
48605
diff
changeset
|
98 full_dist=no ;; |
66246
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
99 --compressed-dist) |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
100 compressed_dist=yes ;; |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
101 --self-contained | -self-contained | --with-self-contained-app | -sc) |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
102 self_contained=yes ;; |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
103 -app-symlink | --app-symlink | -symlink | --symlink | --asl) |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
104 app_symlink=yes ;; |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
105 --keep-dir) |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
106 keep_directory=yes ;; |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
107 -C,* | -c,*) |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
108 config_options="$config_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;; |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
109 -M,* | -m,*) |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
110 make_options="$make_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;; |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
111 *) |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
112 display_usage=yes ;; |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
113 esac |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
114 shift |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
115 done |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
116 |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
117 if test "$with_x" = "no"; then |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
118 config_options="--without-x $config_options" |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
119 fi |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
120 |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
121 if test "$display_usage" = "yes"; then |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
122 cat <<EOF |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
123 \`make-package' generates a Mac OS X installer package from an Emacs |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
124 distribution. By default, this first runs ./configure on the emacs |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
125 directory. Then make install to create the emacs distribution. |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
126 Then some mac-specific commands to generate the required information |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
127 for the mac package. The installer will, by default, create a |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
128 Carbon application called Emacs in the ${appsdir} directory, with the |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
129 shared emacs files in /usr/local |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
130 |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
131 Usage: $0 [OPTION] |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
132 |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
133 Options: |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
134 -h, --help display this help and exit |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
135 --prefix=DIR Set install location for the Mac OS X package |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
136 of the emacs related file. By default /usr/local |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
137 --no-conf Do not run the configure script before running |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
138 make install. |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
139 --without-app Do not create the Emacs application bundle |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
140 --with-x Setup the install to use X Windows for its |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
141 windowed display, instead of carbon. Implies |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
142 --without-app. |
48616
d78591287910
Switched copying of .el files to be on by default.
Steven Tamm <steventamm@mac.com>
parents:
48605
diff
changeset
|
143 --without-full-dist Do not include all the .el files in the distribution. |
d78591287910
Switched copying of .el files to be on by default.
Steven Tamm <steventamm@mac.com>
parents:
48605
diff
changeset
|
144 This is discouraged except if disk space is critical. |
66246
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
145 --compressed-dist Compress .el and info files in the distribution. |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
146 --app-symlink Have the Emacs.app executable be a symlink |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
147 to the install in [prefix]/bin/emacs and have |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
148 the emacs executable link to emacs-${version} |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
149 --self-contained Create an Emacs.app that is self-contained; |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
150 prefix will be ignored and all files installed |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
151 inside the application |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
152 --build-in-place Build the application in the source directory |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
153 instead of a temporary directory. |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
154 --build-dir=DIR Build the application in the specified directory |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
155 instead of a temporary directory. Mutually exclusive |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
156 with --build-in-place. |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
157 -C,option Pass option to configure |
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
158 -M,option Pass option to make |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
159 EOF |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
160 exit 0 |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
161 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
162 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
163 ### Exit if a command fails. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
164 #set -e |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
165 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
166 ### Print out each line we read, for debugging's sake. |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
167 #set -v |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
168 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
169 LANGUAGE=C |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
170 LC_ALL=C |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
171 LC_MESSAGES= |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
172 LANG= |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
173 export LANGUAGE LC_ALL LC_MESSAGES LANG |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
174 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
175 ## Don't restrict access to any files. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
176 umask 0 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
177 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
178 ### Make sure we're running in the right place. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
179 if [ -f Emacs.pkg ]; then |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
180 echo "${progname}: Package Emacs.pkg already exists. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
181 Perhaps a previous invocation of \`${progname}' failed to clean up after |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
182 itself. Move or delete Emacs.pkg and try again." >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
183 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
184 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
185 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
186 if test $with_app == "yes" && [ ! -f ${emapp}/Contents/PkgInfo ]; then |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
187 echo "${progname}: Can't find \`${emapp}/Contents/PkgInfo'" >&2 |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
188 echo "${progname} must be run in the \`mac' directory of the Emacs" >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
189 echo "distribution tree. cd to that directory and try again." >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
190 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
191 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
192 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
193 ### Check whether file ../lisp/version.el exists. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
194 if [ ! -f ../lisp/version.el ]; then |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
195 echo "${progname}: Can't find \`../lisp/version.el'" >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
196 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
197 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
198 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
199 ### Find out which version of Emacs this is. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
200 shortversion=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \ |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
201 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
202 version=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \ |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
203 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
204 if [ ! "${version}" ]; then |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
205 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
206 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
207 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
208 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
209 echo Version numbers are $version and $shortversion |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
210 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
211 ### Make sure we don't already have a directory emacs-${version}. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
212 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
213 emacsname="emacs-${version}${new_extension}" |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
214 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
215 if [ -d ${emacsname} ] |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
216 then |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
217 echo Directory "${emacsname}" already exists >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
218 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
219 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
220 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
221 ### Make sure the subdirectory is available. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
222 tempparent="make-package.tmp.$$" |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
223 if [ -d ${tempparent} ]; then |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
224 echo "${progname}: staging directory \`${tempparent}' already exists. |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
225 Perhaps a previous invocation of \`${progname}' failed to clean up after |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
226 itself. Check that directories whose names are of the form |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
227 \`make-dist.tmp.NNNNN' don't contain any important information, remove |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
228 them, and try again." >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
229 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
230 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
231 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
232 if [ -d /Volumes/Emacs ]; then |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
233 echo "${progname}: Already have an Emacs disc image mounted. Please |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
234 eject that disc image and try again." >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
235 exit 1 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
236 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
237 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
238 tempparentfull="`pwd`/${tempparent}" |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
239 tempparentdist=${tempparentfull}/dist |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
240 |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
241 if test "$build_in_place" = "no"; then |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
242 case ${builddir} in |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
243 ${srcdir}) |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
244 tempbuild="make-package.build.$$" |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
245 builddir="`pwd`/${tempbuild}" |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
246 removable_build_dir=${builddir} |
49230
6f94f884d68e
* make-package: Fixed problem where the building without
Steven Tamm <steventamm@mac.com>
parents:
49091
diff
changeset
|
247 mkdir -p ${builddir} |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
248 ;; |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
249 [\\/]* | ?:[\\/]* ) #Absolutepath. |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
250 mkdir -p ${builddir} |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
251 ;; |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
252 *) |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
253 mkdir -p ${builddir} |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
254 builddir=`cd $builddir && pwd` |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
255 ;; |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
256 esac |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
257 fi |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
258 # Location of install package |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
259 packagedir=${builddir}/mac/Emacs.pkg |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
260 |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
261 echo Building in directory ${builddir} |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
262 echo Installing into directory ${tempparentfull} >&2 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
263 |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
264 ### This trap ensures that the staging directory will be cleaned up even |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
265 ### when the script is interrupted in mid-career. |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
266 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent} ${removable_build_dir} ${packagedir}; exit 1" 1 2 15 |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
267 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
268 # Run configure in the new tempparent directory |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
269 if test "$with_config" = "yes"; then |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
270 (cd ${builddir}; ${srcdir}/configure ${config_options} --prefix=${prefix}) |
46183
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
271 fi |
24320eec547a
2002-07-05 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
46177
diff
changeset
|
272 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
273 installprefix=${tempparentfull}${prefix} |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
274 if test "$self_contained" = "yes"; then |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
275 # If selfcontained, the local directory is Resources directory |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
276 installprefix=$tempparentfull/$appsdir/$emapp/Contents/Resources |
47782
de56ca3f523d
make-package: Now calls make bootstrap if .elc files are missing
Steven Tamm <steventamm@mac.com>
parents:
46297
diff
changeset
|
277 fi |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
278 |
49091
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
279 |
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
280 make_options="prefix=${installprefix} $make_options" |
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
281 |
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
282 if test "$with_app" = "yes"; then |
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
283 make_options="carbon_appdir=${tempparentfull}/Applications $make_options" |
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
284 fi |
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
285 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
286 ## Make bootstrap if .elc files are missing from distribution |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
287 if [ ! -f ${srcdir}/lisp/abbrev.elc ]; then |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
288 echo "Required .elc files missing; making bootstrap..." |
49091
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
289 if ! (cd ${builddir}; make bootstrap $make_options); then |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
290 echo "Make bootstrap failed... Aborting make-package." |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
291 exit 2 |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
292 fi |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
293 fi |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
294 |
49091
4d9ad5d4f2d4
* INSTALL: Added documentation about --enable-carbon-app and
Steven Tamm <steventamm@mac.com>
parents:
49005
diff
changeset
|
295 if ! (cd ${builddir}; make install $make_options); then |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
296 echo "Make failed... Aborting make-package." |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
297 exit 1 |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
298 fi |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
299 |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
300 if test "$full_dist" == "no"; then |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
301 echo "Removing unneeded .el files" |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
302 sharedir=$installprefix/share/emacs/$version |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
303 find $sharedir/lisp $sharedir/leim -name "*.elc" -print | sed 's|\(.*\)\.elc$|/bin/rm -f \1.el|' | /bin/sh -s |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
304 fi |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
305 |
66246
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
306 if test "$compressed_dist" == "yes" -a "$full_dist" == "yes"; then |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
307 echo "Compressing .el files" |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
308 sharedir=$installprefix/share/emacs/$version |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
309 find $sharedir/lisp $sharedir/leim -name "*.elc" -print | sed 's|\(.*\)\.elc$|/usr/bin/gzip -9 \1.el|' | /bin/sh -s |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
310 echo "Compressing info files" |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
311 find $installprefix/info -type f ! -name dir -print | sed 's|\(.*\)$|/usr/bin/gzip -9 \1|' | /bin/sh -s |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
312 fi |
d1d490f493a1
Add a --compressed-dist option to compress info
Eli Zaretskii <eliz@gnu.org>
parents:
64890
diff
changeset
|
313 |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
314 if test "$with_app" == "yes"; then |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
315 echo "Creating Emacs.app application" |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
316 tempappdir=${tempparentfull}${appsdir} |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
317 tempemapp=${tempappdir}/${emapp}/Contents/MacOS/Emacs |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
318 ## Delete any CVS files |
48789 | 319 find ${tempappdir} -name "CVS" -type d -exec rm -rf {} \; |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
320 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
321 ## Have application be a symlink to ${prefix}/bin/emacs |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
322 if test "$app_symlink" == "yes"; then |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
323 echo "Creating application symlink" |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
324 rm ${tempemapp} |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
325 ln -s ${prefix}/bin/${emacsname} ${tempemapp} |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
326 fi |
47808
5db3fc34243e
* make-package: Added ability to pass command line options
Steven Tamm <steventamm@mac.com>
parents:
47782
diff
changeset
|
327 fi |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
328 |
77077
8fd6534a63dd
(compver): Don't hardcode processor type.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
75549
diff
changeset
|
329 compver=`uname -p`-apple-darwin`uname -r` |
50450
33c5c2bf40c2
Place libexec executables directly under the Contents/MacOS/libexec if
Steven Tamm <steventamm@mac.com>
parents:
49600
diff
changeset
|
330 |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
331 if test "$self_contained" = "yes"; then |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
332 # Move shared files down to Resources directory |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
333 mv $installprefix/share/emacs/$version/* $installprefix |
75549
b3fafa9c3aa6
(compver): Install info and manpages.
Chong Yidong <cyd@stupidchicken.com>
parents:
75348
diff
changeset
|
334 mv $installprefix/share/info $installprefix |
b3fafa9c3aa6
(compver): Install info and manpages.
Chong Yidong <cyd@stupidchicken.com>
parents:
75348
diff
changeset
|
335 mv $installprefix/share/man $installprefix |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
336 rm -rf $installprefix/share |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
337 # These directories might remain in Resources |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
338 mv $installprefix/bin $installprefix/../MacOS/bin |
50450
33c5c2bf40c2
Place libexec executables directly under the Contents/MacOS/libexec if
Steven Tamm <steventamm@mac.com>
parents:
49600
diff
changeset
|
339 mv $installprefix/libexec/emacs/$version/$compver $installprefix/../MacOS/libexec |
48749
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
340 # Make the application binary a hard link |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
341 rm $installprefix/../MacOS/Emacs |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
342 ln $installprefix/../MacOS/bin/emacs $installprefix/../MacOS/Emacs |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
343 fi |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
344 |
94d8efd47824
Now correctly creates a self-contained application
Steven Tamm <steventamm@mac.com>
parents:
48616
diff
changeset
|
345 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
346 # Remove unnecessary .el files |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
347 #if test "$full_dist" = no; then |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
348 #fi |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
349 |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
350 echo "Creating Package Info file" |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
351 |
49230
6f94f884d68e
* make-package: Fixed problem where the building without
Steven Tamm <steventamm@mac.com>
parents:
49091
diff
changeset
|
352 mkdir -p ${packagedir} |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
353 mkdir ${packagedir}/Contents |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
354 mkdir ${packagedir}/Contents/Resources |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
355 mkdir ${packagedir}/Contents/Resources/English.lproj |
49005
5c4e830c411b
* make-package: Now copies License and ReadMe files into the
Steven Tamm <steventamm@mac.com>
parents:
48990
diff
changeset
|
356 echo -n 'pmkrpkg1' > ${packagedir}/Contents/PkgInfo |
5c4e830c411b
* make-package: Now copies License and ReadMe files into the
Steven Tamm <steventamm@mac.com>
parents:
48990
diff
changeset
|
357 |
5c4e830c411b
* make-package: Now copies License and ReadMe files into the
Steven Tamm <steventamm@mac.com>
parents:
48990
diff
changeset
|
358 # Create ReadMe and License files |
5c4e830c411b
* make-package: Now copies License and ReadMe files into the
Steven Tamm <steventamm@mac.com>
parents:
48990
diff
changeset
|
359 cp ${srcdir}/COPYING ${packagedir}/Contents/Resources/License.txt |
5c4e830c411b
* make-package: Now copies License and ReadMe files into the
Steven Tamm <steventamm@mac.com>
parents:
48990
diff
changeset
|
360 cp ${srcdir}/mac/README ${packagedir}/Contents/Resources/ReadMe.txt |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
361 |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
362 infofile=${packagedir}/Contents/Resources/English.lproj/Emacs.info |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
363 |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
364 echo 'Title GNU Emacs' > ${infofile} |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
365 echo "Version ${version}" >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
366 echo "Description Install GNU Emacs ${version} as a command-line app and a Mac OS Application" >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
367 echo 'DefaultLocation /' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
368 echo 'DeleteWarning' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
369 echo 'NeedsAuthorization YES' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
370 echo 'Required NO' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
371 echo 'Relocatable NO' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
372 echo 'RequiresReboot NO' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
373 echo 'UseUserMask NO' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
374 echo 'OverwritePermissions NO' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
375 echo 'InstallFat NO' >> ${infofile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
376 |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
377 ### Set the install directory to install files as root... |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
378 ### Not sure if this is a good diea |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
379 # echo "Setting owner to root" |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
380 # chown -Rh 0 ${tempparentfull} |
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
381 |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
382 echo "Creating pax file" |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
383 (cd ${tempparentfull}; pax -w -f ${packagedir}/Contents/Resources/Emacs.pax .) |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
384 echo "Compressing pax file" |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
385 gzip ${packagedir}/Contents/Resources/Emacs.pax |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
386 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
387 echo "Creating bom file" |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
388 mkbom ${tempparentfull} ${packagedir}/Contents/Resources/Emacs.bom |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
389 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
390 echo "Generating sizes file" |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
391 sizesfile=${packagedir}/Contents/Resources/Emacs.sizes |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
392 |
48979
81b2338bea6e
* make-package: Fix typo where tmpparent was used instead of
Steven Tamm <steventamm@mac.com>
parents:
48789
diff
changeset
|
393 numFiles=`du -a ${tempparent} | wc -l` |
81b2338bea6e
* make-package: Fix typo where tmpparent was used instead of
Steven Tamm <steventamm@mac.com>
parents:
48789
diff
changeset
|
394 installedSize=`du -s ${tempparent} | cut -f1` |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
395 compressedSize=`du -s ${packagedir} | cut -f1` |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
396 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
397 echo "NumFiles ${numFiles}" > ${sizesfile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
398 echo "InstalledSize ${installedSize}" >> ${sizesfile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
399 echo "CompressedSize ${compressedSize}" >> ${sizesfile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
400 cat ${sizesfile} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
401 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
402 echo "Creating Disc Image" |
50724
efd65678bb08
* make-package: Allocate 5% extra space on disk image for directories
Andrew Choi <akochoi@shaw.ca>
parents:
50450
diff
changeset
|
403 ## From hdiutil man page, a sector is 512k. Allocate an extra 5% for |
efd65678bb08
* make-package: Allocate 5% extra space on disk image for directories
Andrew Choi <akochoi@shaw.ca>
parents:
50450
diff
changeset
|
404 ## directories and partition tables. |
efd65678bb08
* make-package: Allocate 5% extra space on disk image for directories
Andrew Choi <akochoi@shaw.ca>
parents:
50450
diff
changeset
|
405 sectorsAlloced=`echo 2.1*${compressedSize}|bc` |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
406 hdiutil create -ov ${builddir}/mac/EmacsRW -sectors ${sectorsAlloced} |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
407 ## Need to format the disc image before mounting |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
408 mountLoc=`hdid -nomount ${builddir}/mac/EmacsRW.dmg | grep HFS | cut -f1` |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
409 /sbin/newfs_hfs -v Emacs ${mountLoc} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
410 hdiutil eject ${mountLoc} |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
411 echo "Copying Package to Disc Image" |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
412 hdid ${builddir}/mac/EmacsRW.dmg |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
413 |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
414 if test "$keep_directory" = "no"; then |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
415 rm -rf ${tempparentfull} |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
416 else |
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
417 mv ${tempparentfull} ${emacsname} |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
418 fi |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
419 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
420 if [ ! -d /Volumes/Emacs ]; then |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
421 echo "Could not create disc image. The Emacs installer package (Emacs.pkg) |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49230
diff
changeset
|
422 in this directory should be correct. Please use the Disc Copy program to |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
423 create a disc image." >&2 |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
424 exit 0 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
425 fi |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
426 |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
427 cp -R ${packagedir} /Volumes/Emacs |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
428 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
429 ## Converting Disk Image to read-only |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
430 echo 'Converting Disc Image to read-only' |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
431 hdiutil eject ${mountLoc} |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
432 hdiutil resize ${builddir}/mac/EmacsRW.dmg -sectors min |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
433 if test "$comp_diskimage" = "yes"; then |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
434 hdiutil convert ${builddir}/mac/EmacsRW.dmg -format UDZO -imagekey zlib-level=2 -o ${srcdir}/mac/EmacsInstaller.dmg |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
435 else |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
436 hdiutil convert ${builddir}/mac/EmacsRW.dmg -format UDRO -o ${srcdir}/mac/EmacsInstaller.dmg |
48603
ac86b769c135
Added a lot of options to reduce disk size of both the installer and the final
Steven Tamm <steventamm@mac.com>
parents:
47876
diff
changeset
|
437 fi |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
438 rm ${builddir}/mac/EmacsRW.dmg |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
439 |
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
440 echo "Cleaning up the staging directory" |
48990
dfea5194194f
* make-package: Defaults to building the source tree in a
Steven Tamm <steventamm@mac.com>
parents:
48979
diff
changeset
|
441 rm -rf ${builddir}/mac/Emacs.pkg ${removable_build_dir} |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
442 |
52401 | 443 # arch-tag: 1b631d0d-9fde-4f71-80c0-33e0e5815515 |
46177
76bedba7ffd6
2002-07-04 Andrew Choi <akochoi@shaw.ca>
Andrew Choi <akochoi@shaw.ca>
parents:
diff
changeset
|
444 ### make-package ends here |