aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Choi2002-07-05 19:03:19 +0000
committerAndrew Choi2002-07-05 19:03:19 +0000
commite43e5c3e8eddad51375beefdabe4cf640e701565 (patch)
tree9c02149a4036cf8d4db61e8c7180fadc2aa996f4
parentd80dc57e0d13d64fff21608a91b95701faf75a1e (diff)
downloademacs-e43e5c3e8eddad51375beefdabe4cf640e701565.tar.gz
emacs-e43e5c3e8eddad51375beefdabe4cf640e701565.zip
2002-07-05 Andrew Choi <akochoi@shaw.ca>
* make-package: Add ability to handle options --help, --prefix, --no-conf, and --with-x.
-rw-r--r--mac/ChangeLog5
-rwxr-xr-xmac/make-package57
2 files changed, 57 insertions, 5 deletions
diff --git a/mac/ChangeLog b/mac/ChangeLog
index 1e823823aea..b4b3d411d61 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -1,3 +1,8 @@
12002-07-05 Andrew Choi <akochoi@shaw.ca>
2
3 * make-package: Add ability to handle options --help, --prefix,
4 --no-conf, and --with-x.
5
12002-07-04 Andrew Choi <akochoi@shaw.ca> 62002-07-04 Andrew Choi <akochoi@shaw.ca>
2 7
3 * make-package: New file. 8 * make-package: New file.
diff --git a/mac/make-package b/mac/make-package
index 3bdd8a0c164..d46c56e0b06 100755
--- a/mac/make-package
+++ b/mac/make-package
@@ -41,12 +41,56 @@
41 41
42progname="$0" 42progname="$0"
43## Default location to place it is /usr/local 43## Default location to place it is /usr/local
44
44prefix=/usr/local 45prefix=/usr/local
45if [ $1 ]; then 46with_config=yes
46 prefix="$1" 47
48ac_prev=
49display_usage=false;
50config_options=--without-x
51while test $# != 0
52do
53 if test -n "$ac_prev"; then
54 eval "$ac_prev=\$1"
55 ac_prev=
56 continue
57 fi
58 case $1 in
59 -help | --help | --hel | --he | -h)
60 display_usage=yes ;;
61 -p | -prefix | --p | --prefix)
62 ac_prev=prefix ;;
63 -p=* | -prefix=* | --p=* | --prefix=*)
64 prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;;
65 -no-configure | -no-conf | --no-configure | --no-conf)
66 with_config=no ;;
67 -with-x | --with-x)
68 config_options= ;;
69 esac
70 shift
71done
72
73if test "$display_usage" = "yes"; then
74 cat <<EOF
75\`make-package' generates a Mac OS X package from an Emacs distribution.
76By default, this first runs ./configure on the emacs directory. Then
77make install to create the emacs distribution. Then some mac-specific
78commands to generate the required information for the mac package.
79
80Usage: $0 [OPTION]
81
82Options:
83 -h, --help display this help and exit
84 --prefix=DIR Set install location for the Mac OS X package
85 of the emacs related file. By default /usr/local
86 --no-conf Do not run the configure script before running
87 make install.
88 --with-x Setup the install to use X Windows for its
89 windowed display, instead of carbon.
90EOF
91 exit 0
47fi 92fi
48 93
49
50### Exit if a command fails. 94### Exit if a command fails.
51#set -e 95#set -e
52 96
@@ -126,7 +170,11 @@ tempparentfull="`pwd`/${tempparent}"
126 170
127echo Installing into directory ${tempparentfull} >&2 171echo Installing into directory ${tempparentfull} >&2
128 172
129(cd ..; ./configure --without-x --prefix=${prefix}; make install prefix=${tempparentfull}${prefix}) 173if test "$with_config" = yes; then
174 (cd ..; ./configure ${config_options} --prefix=${prefix};)
175fi
176
177(cd ..; make install prefix=${tempparentfull}${prefix})
130 178
131### This trap ensures that the staging directory will be cleaned up even 179### This trap ensures that the staging directory will be cleaned up even
132### when the script is interrupted in mid-career. 180### when the script is interrupted in mid-career.
@@ -216,4 +264,3 @@ echo "Cleaning up the staging directory"
216rm -rf Emacs.pkg 264rm -rf Emacs.pkg
217 265
218### make-package ends here 266### make-package ends here
219