]> code.delx.au - gnu-emacs/commitdiff
* make-package: Added ability to pass command line options
authorSteven Tamm <steventamm@mac.com>
Wed, 9 Oct 2002 02:20:28 +0000 (02:20 +0000)
committerSteven Tamm <steventamm@mac.com>
Wed, 9 Oct 2002 02:20:28 +0000 (02:20 +0000)
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.

mac/ChangeLog
mac/make-package

index 36548cce103c8c9c6716757874b76676d9f8afe2..2e044ebbac322ad593f81a9a7121ce2c4c275068 100644 (file)
@@ -1,3 +1,11 @@
+2002-10-08  Steven Tamm  <steventamm@mac.com>
+
+       * 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.
+
 2002-10-07  Steven Tamm  <steventamm@mac.com>
 
        * make-package: Now calls make bootstrap if .elc files are missing
index d3eae56a0709aacaaff82aac6d6039bc09e29a1d..747b8680b98e6b45c8853acd2aac5ffc81870f48 100755 (executable)
@@ -44,10 +44,12 @@ progname="$0"
 
 prefix=/usr/local
 with_config=yes
+with_app=yes
+with_x=no
 
 ac_prev=
 display_usage=false;
-config_options=--without-x
+config_options=;
 while test $# != 0
 do
   if test -n "$ac_prev"; then
@@ -64,18 +66,34 @@ do
        prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;;
     -no-configure | -no-conf | --no-configure | --no-conf | --without-config)
        with_config=no ;;
+    -no-app | --no-app | -without-app | --without-app)
+       with_app=no ;;
+    -without-x | --without-x)
+       with_x=no ;;
     -with-x | --with-x)
-       config_options= ;;
+       with_x=yes
+       with_app=no ;;
+    -C,* | -c,*)
+       config_options="$config_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;;
+    -M,* | -m,*)
+       make_options="$make_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;;
+       
   esac
   shift
 done
 
+if test "$with_x" = "no"; then
+   config_options="--without-x $config_options"
+fi
+
 if test "$display_usage" = "yes"; then
   cat <<EOF
-\`make-package' generates a Mac OS X package from an Emacs distribution.
-By default, this first runs ./configure on the emacs directory.  Then 
-make install to create the emacs distribution.  Then some mac-specific
-commands to generate the required information for the mac package.
+\`make-package' generates a Mac OS X installer package from an Emacs 
+distribution.  By default, this first runs ./configure on the emacs 
+directory.  Then make install to create the emacs distribution.  
+Then some mac-specific commands to generate the required information 
+for the mac package.  The installer will, by default, create a
+Carbon application called Emacs in the /Applications directory, and 
 
 Usage: $0 [OPTION]
 
@@ -85,8 +103,12 @@ Options:
                           of the emacs related file.  By default /usr/local
       --no-conf           Do not run the configure script before running
                           make install.
+      --without-app       Do not create the Emacs application bundle
       --with-x            Setup the install to use X Windows for its 
-                          windowed display, instead of carbon.
+                          windowed display, instead of carbon.  Implies
+                          --without-app.
+  -C,option               Pass option to configure
+  -M,option               Pass option to make
 EOF
   exit 0
 fi
@@ -114,7 +136,7 @@ itself.  Move or delete Emacs.pkg and try again." >&2
   exit 1
 fi
 
-if [ ! -f Emacs.app/Contents/PkgInfo ]; then
+if test $with_app == "yes" && [ ! -f Emacs.app/Contents/PkgInfo ]; then
   echo "${progname}: Can't find \`Emacs.app/Contents/PkgInfo'" >&2
   echo "${progname} must be run in the \`mac' directory of the Emacs" >&2
   echo "distribution tree.  cd to that directory and try again." >&2
@@ -177,13 +199,13 @@ fi
 ## Make bootstrap if .elc files are missing from distribution
 if [ ! -f ../lisp/abbrev.elc ]; then
    echo "Required .elc files missing; making bootstrap..."
-   if ! (cd ..; make bootstrap prefix=${tempparentfull}${prefix}); then
+   if ! (cd ..; make bootstrap prefix=${tempparentfull}${prefix} $make_options); then
       echo "Make bootstrap failed...  Aborting make-package."
       exit 2
    fi
 fi
 
-if ! (cd ..; make install prefix=${tempparentfull}${prefix}); then
+if ! (cd ..; make install prefix=${tempparentfull}${prefix} $make_options); then
    echo "Make failed... Aborting make-package."
    exit 1
 fi
@@ -192,9 +214,14 @@ fi
 ### when the script is interrupted in mid-career.
 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; rm -rf Emacs.pkg; exit 1" 1 2 15
 
-mkdir ${tempparentfull}/Applications
+if test "$with_app" == "yes"; then
+  mkdir ${tempparentfull}/Applications
 
-cp -r Emacs.app ${tempparentfull}/Applications
+  ## Copy Emacs application
+  cp -r Emacs.app ${tempparentfull}/Applications
+  ## Delete any CVS files
+  find ${tempparentfull}/Applications -name "CVS" -execdir rm -r {} \;
+fi
 
 echo "Creating Package Info file"