diff options
| author | Steven Tamm | 2002-10-09 02:20:28 +0000 |
|---|---|---|
| committer | Steven Tamm | 2002-10-09 02:20:28 +0000 |
| commit | 3f34081a9b925b5e0192f7a776376548c498ec60 (patch) | |
| tree | 553335be8b1f851529bca260664c4878b7f8453d /mac/make-package | |
| parent | 23b0a67405eb13625f4ebb51c8655340640b88e1 (diff) | |
| download | emacs-3f34081a9b925b5e0192f7a776376548c498ec60.tar.gz emacs-3f34081a9b925b5e0192f7a776376548c498ec60.zip | |
* make-package: Added ability to pass command line options
through to make and configure (-m, & -c,).
Added option to not copy Application into installer, the default
for X11 builds. Does not copy CVS directories into installer.
Clarified some of the usage notes.
Diffstat (limited to 'mac/make-package')
| -rwxr-xr-x | mac/make-package | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/mac/make-package b/mac/make-package index d3eae56a070..747b8680b98 100755 --- a/mac/make-package +++ b/mac/make-package | |||
| @@ -44,10 +44,12 @@ progname="$0" | |||
| 44 | 44 | ||
| 45 | prefix=/usr/local | 45 | prefix=/usr/local |
| 46 | with_config=yes | 46 | with_config=yes |
| 47 | with_app=yes | ||
| 48 | with_x=no | ||
| 47 | 49 | ||
| 48 | ac_prev= | 50 | ac_prev= |
| 49 | display_usage=false; | 51 | display_usage=false; |
| 50 | config_options=--without-x | 52 | config_options=; |
| 51 | while test $# != 0 | 53 | while test $# != 0 |
| 52 | do | 54 | do |
| 53 | if test -n "$ac_prev"; then | 55 | if test -n "$ac_prev"; then |
| @@ -64,18 +66,34 @@ do | |||
| 64 | prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;; | 66 | prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;; |
| 65 | -no-configure | -no-conf | --no-configure | --no-conf | --without-config) | 67 | -no-configure | -no-conf | --no-configure | --no-conf | --without-config) |
| 66 | with_config=no ;; | 68 | with_config=no ;; |
| 69 | -no-app | --no-app | -without-app | --without-app) | ||
| 70 | with_app=no ;; | ||
| 71 | -without-x | --without-x) | ||
| 72 | with_x=no ;; | ||
| 67 | -with-x | --with-x) | 73 | -with-x | --with-x) |
| 68 | config_options= ;; | 74 | with_x=yes |
| 75 | with_app=no ;; | ||
| 76 | -C,* | -c,*) | ||
| 77 | config_options="$config_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;; | ||
| 78 | -M,* | -m,*) | ||
| 79 | make_options="$make_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;; | ||
| 80 | |||
| 69 | esac | 81 | esac |
| 70 | shift | 82 | shift |
| 71 | done | 83 | done |
| 72 | 84 | ||
| 85 | if test "$with_x" = "no"; then | ||
| 86 | config_options="--without-x $config_options" | ||
| 87 | fi | ||
| 88 | |||
| 73 | if test "$display_usage" = "yes"; then | 89 | if test "$display_usage" = "yes"; then |
| 74 | cat <<EOF | 90 | cat <<EOF |
| 75 | \`make-package' generates a Mac OS X package from an Emacs distribution. | 91 | \`make-package' generates a Mac OS X installer package from an Emacs |
| 76 | By default, this first runs ./configure on the emacs directory. Then | 92 | distribution. By default, this first runs ./configure on the emacs |
| 77 | make install to create the emacs distribution. Then some mac-specific | 93 | directory. Then make install to create the emacs distribution. |
| 78 | commands to generate the required information for the mac package. | 94 | Then some mac-specific commands to generate the required information |
| 95 | for the mac package. The installer will, by default, create a | ||
| 96 | Carbon application called Emacs in the /Applications directory, and | ||
| 79 | 97 | ||
| 80 | Usage: $0 [OPTION] | 98 | Usage: $0 [OPTION] |
| 81 | 99 | ||
| @@ -85,8 +103,12 @@ Options: | |||
| 85 | of the emacs related file. By default /usr/local | 103 | of the emacs related file. By default /usr/local |
| 86 | --no-conf Do not run the configure script before running | 104 | --no-conf Do not run the configure script before running |
| 87 | make install. | 105 | make install. |
| 106 | --without-app Do not create the Emacs application bundle | ||
| 88 | --with-x Setup the install to use X Windows for its | 107 | --with-x Setup the install to use X Windows for its |
| 89 | windowed display, instead of carbon. | 108 | windowed display, instead of carbon. Implies |
| 109 | --without-app. | ||
| 110 | -C,option Pass option to configure | ||
| 111 | -M,option Pass option to make | ||
| 90 | EOF | 112 | EOF |
| 91 | exit 0 | 113 | exit 0 |
| 92 | fi | 114 | fi |
| @@ -114,7 +136,7 @@ itself. Move or delete Emacs.pkg and try again." >&2 | |||
| 114 | exit 1 | 136 | exit 1 |
| 115 | fi | 137 | fi |
| 116 | 138 | ||
| 117 | if [ ! -f Emacs.app/Contents/PkgInfo ]; then | 139 | if test $with_app == "yes" && [ ! -f Emacs.app/Contents/PkgInfo ]; then |
| 118 | echo "${progname}: Can't find \`Emacs.app/Contents/PkgInfo'" >&2 | 140 | echo "${progname}: Can't find \`Emacs.app/Contents/PkgInfo'" >&2 |
| 119 | echo "${progname} must be run in the \`mac' directory of the Emacs" >&2 | 141 | echo "${progname} must be run in the \`mac' directory of the Emacs" >&2 |
| 120 | echo "distribution tree. cd to that directory and try again." >&2 | 142 | echo "distribution tree. cd to that directory and try again." >&2 |
| @@ -177,13 +199,13 @@ fi | |||
| 177 | ## Make bootstrap if .elc files are missing from distribution | 199 | ## Make bootstrap if .elc files are missing from distribution |
| 178 | if [ ! -f ../lisp/abbrev.elc ]; then | 200 | if [ ! -f ../lisp/abbrev.elc ]; then |
| 179 | echo "Required .elc files missing; making bootstrap..." | 201 | echo "Required .elc files missing; making bootstrap..." |
| 180 | if ! (cd ..; make bootstrap prefix=${tempparentfull}${prefix}); then | 202 | if ! (cd ..; make bootstrap prefix=${tempparentfull}${prefix} $make_options); then |
| 181 | echo "Make bootstrap failed... Aborting make-package." | 203 | echo "Make bootstrap failed... Aborting make-package." |
| 182 | exit 2 | 204 | exit 2 |
| 183 | fi | 205 | fi |
| 184 | fi | 206 | fi |
| 185 | 207 | ||
| 186 | if ! (cd ..; make install prefix=${tempparentfull}${prefix}); then | 208 | if ! (cd ..; make install prefix=${tempparentfull}${prefix} $make_options); then |
| 187 | echo "Make failed... Aborting make-package." | 209 | echo "Make failed... Aborting make-package." |
| 188 | exit 1 | 210 | exit 1 |
| 189 | fi | 211 | fi |
| @@ -192,9 +214,14 @@ fi | |||
| 192 | ### when the script is interrupted in mid-career. | 214 | ### when the script is interrupted in mid-career. |
| 193 | trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; rm -rf Emacs.pkg; exit 1" 1 2 15 | 215 | trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; rm -rf Emacs.pkg; exit 1" 1 2 15 |
| 194 | 216 | ||
| 195 | mkdir ${tempparentfull}/Applications | 217 | if test "$with_app" == "yes"; then |
| 218 | mkdir ${tempparentfull}/Applications | ||
| 196 | 219 | ||
| 197 | cp -r Emacs.app ${tempparentfull}/Applications | 220 | ## Copy Emacs application |
| 221 | cp -r Emacs.app ${tempparentfull}/Applications | ||
| 222 | ## Delete any CVS files | ||
| 223 | find ${tempparentfull}/Applications -name "CVS" -execdir rm -r {} \; | ||
| 224 | fi | ||
| 198 | 225 | ||
| 199 | echo "Creating Package Info file" | 226 | echo "Creating Package Info file" |
| 200 | 227 | ||