# HG changeset patch # User Andrew Choi # Date 1025895799 0 # Node ID 24320eec547adb0274939f2564fbc8d71ec55735 # Parent 48b34872db4236ed1f2c461fc12918b0fdd2b5c4 2002-07-05 Andrew Choi * make-package: Add ability to handle options --help, --prefix, --no-conf, and --with-x. diff -r 48b34872db42 -r 24320eec547a mac/ChangeLog --- a/mac/ChangeLog Fri Jul 05 18:54:22 2002 +0000 +++ b/mac/ChangeLog Fri Jul 05 19:03:19 2002 +0000 @@ -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 -r 48b34872db42 -r 24320eec547a mac/make-package --- a/mac/make-package Fri Jul 05 18:54:22 2002 +0000 +++ b/mac/make-package Fri Jul 05 19:03:19 2002 +0000 @@ -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 @@ rm -rf Emacs.pkg ### make-package ends here -