view mac/make-bin-dist @ 47488:6ca0edea0a56

(dired-use-ls-dired): New variable. (dired-directory): Document the rules better. (dired-insert-headerline): Function deleted. (dired-revert): Pass no args to dired-readin. (dired-move-to-filename): First try using dired-filename property. (dired-move-to-end-of-filename): Likewise. (dired-why): Try to show the start of this page of warnings. (dired-log): Insert the buffer name at start of page, not end. (dired-log-summary): If just one failure, explain it in echo area. (dired-internal-noselect): Always set dired-directory, when buffer is not new. Pass dir-or-list, not dirname, to dired-mode. Call dired-readin with no args. Don't call dired-after-readin-hook here. (dired-find-buffer-nocreate): Expand dirname. Expand the dir from dired-directory to compare with dirname. (dired-readin): Take no args. Get the directory from dired-directory. Run dired-before-reading hook inside save-excursion. Run dired-after-readin-hook here. Don't make undo entries at all. Call dired-readin-insert with no args. Don't change indentation here. Don't insert headerline here. (dired-readin-insert): Take no args. Get dir and file-list from dired-directory. Call dired-insert-directory the new way. Don't insert "wildcard" info here. (dired-insert-directory): New arg FILE-LIST. First arg now DIR, always just the directory. This function fully handles setting up the buffer text: update indentation, insert headerline and "wildcard" info. Pass --dired arg if appropriate; put info in dired-filename props. Don't expand file names here.
author Richard M. Stallman <rms@gnu.org>
date Sun, 15 Sep 2002 01:52:54 +0000
parents 01b93e5e53a7
children
line wrap: on
line source

#!/bin/sh

#### make-bin-dist: create a binary Emacs distribution tar file for
#### Mac OS X.  This basically runs a `configure' and `make install'
#### into a temporary directory and archives that directory.  It also
#### places the Emacs application bundle and a installer script in the
#### tar file.  The installer script is run to set up the XML file for
#### setting the environment variables used by Emacs when it is
#### started from the Finder.

# Copyright (C) 2002 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING.  If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

progname="$0"

### Exit if a command fails.
#set -e

### Print out each line we read, for debugging's sake.
set -v

LANGUAGE=C
LC_ALL=C
LC_MESSAGES=
LANG=
export LANGUAGE LC_ALL LC_MESSAGES LANG

## Don't restrict access to any files.
umask 0

### Make sure we're running in the right place.
if [ ! -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
  exit 1
fi

### Check whether file ../lisp/version.el exists.
if [ ! -f ../lisp/version.el ]; then
  echo "${progname}: Can't find \`../lisp/version.el'" >&2
  exit 1
fi

### Find out which version of Emacs this is.
shortversion=`grep 'defconst[	 ]*emacs-version' ../lisp/version.el \
	 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
version=`grep 'defconst[	 ]*emacs-version' ../lisp/version.el \
	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
if [ ! "${version}" ]; then
  echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
  exit 1
fi

echo Version numbers are $version and $shortversion

### Make sure we don't already have a directory  emacs-${version}.

emacsname="emacs-${version}${new_extension}"

if [ -d ${emacsname} ]
then
  echo Directory "${emacsname}" already exists >&2
  exit 1
fi

### Make sure the subdirectory is available.
tempparent="make-bin-dist.tmp.$$"
if [ -d ${tempparent} ]; then
  echo "${progname}: staging directory \`${tempparent}' already exists.
Perhaps a previous invocation of \`${progname}' failed to clean up after
itself.  Check that directories whose names are of the form
\`make-dist.tmp.NNNNN' don't contain any important information, remove
them, and try again." >&2
  exit 1
fi

tempparentfull="`pwd`/${tempparent}"

echo Installing into directory ${tempparentfull} >&2

(cd ..; ./configure --prefix=${tempparentfull}; make install)

### This trap ensures that the staging directory will be cleaned up even
### when the script is interrupted in mid-career.
trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15

cp -r Emacs.app ${tempparent}

cp osx-install ${tempparent}

echo "Creating tar file"

mv ${tempparent} ${emacsname}

tar cvf - ${emacsname} | gzip > ${emacsname}-mac-bin.tar.gz

echo "Cleaning up the staging directory"
rm -rf ${emacsname}

### make-bin-dist ends here