diff options
| author | Andrew Choi | 2002-07-05 19:03:19 +0000 |
|---|---|---|
| committer | Andrew Choi | 2002-07-05 19:03:19 +0000 |
| commit | e43e5c3e8eddad51375beefdabe4cf640e701565 (patch) | |
| tree | 9c02149a4036cf8d4db61e8c7180fadc2aa996f4 /mac | |
| parent | d80dc57e0d13d64fff21608a91b95701faf75a1e (diff) | |
| download | emacs-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.
Diffstat (limited to 'mac')
| -rw-r--r-- | mac/ChangeLog | 5 | ||||
| -rwxr-xr-x | mac/make-package | 57 |
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 @@ | |||
| 1 | 2002-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 | |||
| 1 | 2002-07-04 Andrew Choi <akochoi@shaw.ca> | 6 | 2002-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 | ||
| 42 | progname="$0" | 42 | progname="$0" |
| 43 | ## Default location to place it is /usr/local | 43 | ## Default location to place it is /usr/local |
| 44 | |||
| 44 | prefix=/usr/local | 45 | prefix=/usr/local |
| 45 | if [ $1 ]; then | 46 | with_config=yes |
| 46 | prefix="$1" | 47 | |
| 48 | ac_prev= | ||
| 49 | display_usage=false; | ||
| 50 | config_options=--without-x | ||
| 51 | while test $# != 0 | ||
| 52 | do | ||
| 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 | ||
| 71 | done | ||
| 72 | |||
| 73 | if test "$display_usage" = "yes"; then | ||
| 74 | cat <<EOF | ||
| 75 | \`make-package' generates a Mac OS X package from an Emacs distribution. | ||
| 76 | By default, this first runs ./configure on the emacs directory. Then | ||
| 77 | make install to create the emacs distribution. Then some mac-specific | ||
| 78 | commands to generate the required information for the mac package. | ||
| 79 | |||
| 80 | Usage: $0 [OPTION] | ||
| 81 | |||
| 82 | Options: | ||
| 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. | ||
| 90 | EOF | ||
| 91 | exit 0 | ||
| 47 | fi | 92 | fi |
| 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 | ||
| 127 | echo Installing into directory ${tempparentfull} >&2 | 171 | echo Installing into directory ${tempparentfull} >&2 |
| 128 | 172 | ||
| 129 | (cd ..; ./configure --without-x --prefix=${prefix}; make install prefix=${tempparentfull}${prefix}) | 173 | if test "$with_config" = yes; then |
| 174 | (cd ..; ./configure ${config_options} --prefix=${prefix};) | ||
| 175 | fi | ||
| 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" | |||
| 216 | rm -rf Emacs.pkg | 264 | rm -rf Emacs.pkg |
| 217 | 265 | ||
| 218 | ### make-package ends here | 266 | ### make-package ends here |
| 219 | |||