X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/08b3caa982199bd7939d9d6877203ada5d0083b5..0c382083b6b550c26fad8ac7f59b1ba09663e728:/admin/quick-install-emacs diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs index 675750a43e..24972e655b 100755 --- a/admin/quick-install-emacs +++ b/admin/quick-install-emacs @@ -1,8 +1,8 @@ #!/bin/sh ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly -## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -## Free Software Foundation, Inc. +## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +## 2010 Free Software Foundation, Inc. ## Author: Miles Bader @@ -28,10 +28,10 @@ ## install emacs very often. See the --help output for more details. -PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' +PUBLIC_LIBSRC_BINARIES='emacsclient etags ctags ebrowse' PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' -AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile makefile stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" +AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" # Prune old binaries lying around in the source tree PRUNE=no @@ -120,7 +120,7 @@ Written by Miles Bader EOF exit 0 ;; - -[^-]?*) + -[!-]?*) # split concatenated single-letter options apart FIRST="$1"; shift set -- `echo $FIRST | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@" @@ -159,24 +159,37 @@ fi CONFIG_STATUS="$BUILD/config.status" get_config_var () { - if ! sed -n "s/^s\(.\)@$1@\1\(|#_!!_#|\)*\(.*\)\1.*$/\3/p" $CONFIG_STATUS | sed q | grep '' - then + { sed -n "s/^S[[]\"$1\"[]]=\"\([^\"]*\)\"/\1/p" $CONFIG_STATUS | sed q | grep ''; } || + { sed -n "s/^s\(.\)@$1@\1\(|#_!!_#|\)*\(.*\)\1.*$/\3/p" $CONFIG_STATUS | sed q | grep ''; } || + { echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS" exit 4 - fi + } } test x"$SRC" = x && { SRC="`get_config_var srcdir`" || exit 4 ; } test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; } test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; } -VERSION=`grep 'defconst[ ]*emacs-version' $SRC/lisp/version.el \ +VERSION=`grep 'char emacs_version' $SRC/src/emacs.c \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` DST_SHARE="$prefix/share/emacs/$VERSION" DST_BIN="$prefix/bin" DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH" -DST_INFO="$prefix/info" + +# There are various common places for the info dir to be, so try to +# use whatever's already there, defaulting to (and preferring) +# .../share/info. +# +DST_INFO='' +for D in "$prefix/share/info" "$prefix/info"; do + if test -d "$D"; then + DST_INFO="$D" + break + fi +done +DST_INFO=${DST_INFO:-"$prefix/share/info"} maybe_mkdir () { @@ -263,7 +276,7 @@ for SUBDIR in lisp leim etc lib-src info; do if [ -d $DST/$DIR ]; then echo Directory $DST/$DIR exists else - echo Directory $DST/$DIR non-existant + echo Directory $DST/$DIR non-existent if [ "`echo $DIR | egrep -v "$AVOID_PAT"`" ]; then maybe_mkdir $DST/$DIR fi @@ -361,5 +374,3 @@ END { done ) | eval $EXEC - -# arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477