From: Andrew Choi Date: Fri, 5 Jul 2002 19:03:19 +0000 (+0000) Subject: 2002-07-05 Andrew Choi X-Git-Tag: ttn-vms-21-2-B4~14304 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e43e5c3e8eddad51375beefdabe4cf640e701565;p=emacs.git 2002-07-05 Andrew Choi * make-package: Add ability to handle options --help, --prefix, --no-conf, and --with-x. --- diff --git a/mac/ChangeLog b/mac/ChangeLog index 1e823823aea..b4b3d411d61 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog @@ -1,3 +1,8 @@ +2002-07-05 Andrew Choi + + * make-package: Add ability to handle options --help, --prefix, + --no-conf, and --with-x. + 2002-07-04 Andrew Choi * 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 @@ progname="$0" ## Default location to place it is /usr/local + prefix=/usr/local -if [ $1 ]; then - prefix="$1" +with_config=yes + +ac_prev= +display_usage=false; +config_options=--without-x +while test $# != 0 +do + if test -n "$ac_prev"; then + eval "$ac_prev=\$1" + ac_prev= + continue + fi + case $1 in + -help | --help | --hel | --he | -h) + display_usage=yes ;; + -p | -prefix | --p | --prefix) + ac_prev=prefix ;; + -p=* | -prefix=* | --p=* | --prefix=*) + prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;; + -no-configure | -no-conf | --no-configure | --no-conf) + with_config=no ;; + -with-x | --with-x) + config_options= ;; + esac + shift +done + +if test "$display_usage" = "yes"; then + cat <&2 -(cd ..; ./configure --without-x --prefix=${prefix}; make install prefix=${tempparentfull}${prefix}) +if test "$with_config" = yes; then + (cd ..; ./configure ${config_options} --prefix=${prefix};) +fi + +(cd ..; make install prefix=${tempparentfull}${prefix}) ### This trap ensures that the staging directory will be cleaned up even ### when the script is interrupted in mid-career. @@ -216,4 +264,3 @@ echo "Cleaning up the staging directory" rm -rf Emacs.pkg ### make-package ends here -