comparison admin/quick-install-emacs @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 6f9b527df5c6
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
6 # install emacs very often. See the --help output for more details. 6 # install emacs very often. See the --help output for more details.
7 7
8 PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' 8 PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse'
9 PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' 9 PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin'
10 10
11 AVOID="CVS -DIC README COPYING ChangeLog ~ \.orig$ \.rej$ Makefile makefile stamp-subdir .cvsignore \.[cho]$ make-docfile testfile test-distrib" 11 AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile makefile stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib"
12 12
13 # Prune old binaries lying around in the source tree 13 # Prune old binaries lying around in the source tree
14 PRUNE=no 14 PRUNE=no
15 # Re-install files even if they already exist 15 # Re-install files even if they already exist
16 FORCE=no 16 FORCE=no
17 # Command verbose flag 17 # Command verbose flag
18 VERBOSE='' 18 VERBOSE=''
19 19
20 me="`basename $0`" 20 me="`basename $0`"
21 21
22 # Install commands (these commands are also expected to understand the 22 # Install commands (if the user specifies the `--verbose' option, it is
23 # GNU -v (--verbose) option) 23 # passed to these commands, so that feature only works if these commands
24 # implement it too)
24 LINK='cp -lf' 25 LINK='cp -lf'
25 COPY='cp -f' 26 COPY='cp -f'
26 REMOVE='rm -r' 27 REMOVE='rm -r'
28 MKDIR='mkdir -p'
27 29
28 # Used to execute commands once once we create them 30 # Used to execute commands once once we create them
29 EXEC='sh' 31 EXEC='sh'
30 MKDIR='mkdir --verbose -p'
31 32
32 NAWK=/usr/bin/nawk 33 NAWK=/usr/bin/nawk
33 34
34 # avoid non-standard command output from non-C locales 35 # avoid non-standard command output from non-C locales
35 unset LANG LC_ALL LC_MESSAGES 36 unset LANG LC_ALL LC_MESSAGES
131 echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found" 132 echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found"
132 exit 2 133 exit 2
133 fi 134 fi
134 135
135 CONFIG_STATUS="$BUILD/config.status" 136 CONFIG_STATUS="$BUILD/config.status"
136 function get_config_var () { 137 get_config_var ()
138 {
137 if ! sed -n "s/^s\(.\)@$1@\1\(.*\)\1.*$/\2/p" $CONFIG_STATUS | sed q | grep '' 139 if ! sed -n "s/^s\(.\)@$1@\1\(.*\)\1.*$/\2/p" $CONFIG_STATUS | sed q | grep ''
138 then 140 then
139 echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS" 141 echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS"
140 exit 4 142 exit 4
141 fi 143 fi
151 DST_SHARE="$prefix/share/emacs/$VERSION" 153 DST_SHARE="$prefix/share/emacs/$VERSION"
152 DST_BIN="$prefix/bin" 154 DST_BIN="$prefix/bin"
153 DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH" 155 DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH"
154 DST_INFO="$prefix/info" 156 DST_INFO="$prefix/info"
155 157
156 function maybe_mkdir () { 158 maybe_mkdir ()
159 {
157 if ! test -d "$1"; then 160 if ! test -d "$1"; then
158 $MKDIR "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2 161 $MKDIR $VERBOSE "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2
159 fi 162 fi
160 } 163 }
161 164
162 maybe_mkdir "$DST_BIN" 165 maybe_mkdir "$DST_BIN"
163 maybe_mkdir "$DST_SHARE" 166 maybe_mkdir "$DST_SHARE"
175 done 178 done
176 for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do 179 for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do
177 echo $REMOVE_CMD $D 180 echo $REMOVE_CMD $D
178 PRUNED="$PRUNED $D" 181 PRUNED="$PRUNED $D"
179 done 182 done
180 for D in `ls -1t $BUILD/lib-src/fns-* | sed 1d`; do
181 echo $REMOVE_CMD $D
182 PRUNED="$PRUNED $D"
183 done
184 fi 183 fi
185 184
186 test x"$PRUNE" = xonly && exit 0 185 test x"$PRUNE" = xonly && exit 0
187 186
188 function maybe_emit_copy () { 187 maybe_emit_copy ()
188 {
189 if test "$FORCE" = yes || ! cmp -s $1 $2; then 189 if test "$FORCE" = yes || ! cmp -s $1 $2; then
190 echo $LINK_CMD $1 $2 190 echo $LINK_CMD $1 $2
191 fi 191 fi
192 } 192 }
193 193
336 } 336 }
337 ' 337 '
338 done 338 done
339 339
340 ) | eval $EXEC 340 ) | eval $EXEC
341
342 # arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477