aboutsummaryrefslogtreecommitdiffstats
path: root/mac/make-package
diff options
context:
space:
mode:
authorSteven Tamm2002-10-09 02:20:28 +0000
committerSteven Tamm2002-10-09 02:20:28 +0000
commit3f34081a9b925b5e0192f7a776376548c498ec60 (patch)
tree553335be8b1f851529bca260664c4878b7f8453d /mac/make-package
parent23b0a67405eb13625f4ebb51c8655340640b88e1 (diff)
downloademacs-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-xmac/make-package51
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
45prefix=/usr/local 45prefix=/usr/local
46with_config=yes 46with_config=yes
47with_app=yes
48with_x=no
47 49
48ac_prev= 50ac_prev=
49display_usage=false; 51display_usage=false;
50config_options=--without-x 52config_options=;
51while test $# != 0 53while test $# != 0
52do 54do
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
71done 83done
72 84
85if test "$with_x" = "no"; then
86 config_options="--without-x $config_options"
87fi
88
73if test "$display_usage" = "yes"; then 89if 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
76By default, this first runs ./configure on the emacs directory. Then 92distribution. By default, this first runs ./configure on the emacs
77make install to create the emacs distribution. Then some mac-specific 93directory. Then make install to create the emacs distribution.
78commands to generate the required information for the mac package. 94Then some mac-specific commands to generate the required information
95for the mac package. The installer will, by default, create a
96Carbon application called Emacs in the /Applications directory, and
79 97
80Usage: $0 [OPTION] 98Usage: $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
90EOF 112EOF
91 exit 0 113 exit 0
92fi 114fi
@@ -114,7 +136,7 @@ itself. Move or delete Emacs.pkg and try again." >&2
114 exit 1 136 exit 1
115fi 137fi
116 138
117if [ ! -f Emacs.app/Contents/PkgInfo ]; then 139if 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
178if [ ! -f ../lisp/abbrev.elc ]; then 200if [ ! -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
184fi 206fi
185 207
186if ! (cd ..; make install prefix=${tempparentfull}${prefix}); then 208if ! (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
189fi 211fi
@@ -192,9 +214,14 @@ fi
192### when the script is interrupted in mid-career. 214### when the script is interrupted in mid-career.
193trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; rm -rf Emacs.pkg; exit 1" 1 2 15 215trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; rm -rf Emacs.pkg; exit 1" 1 2 15
194 216
195mkdir ${tempparentfull}/Applications 217if test "$with_app" == "yes"; then
218 mkdir ${tempparentfull}/Applications
196 219
197cp -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 {} \;
224fi
198 225
199echo "Creating Package Info file" 226echo "Creating Package Info file"
200 227