diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-11-28 21:22:01 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-11-28 21:23:44 +0000 |
commit | 39f3022800b04bc1b25750e94d21436d9b65d38f (patch) | |
tree | 10c8ec594f74c8d07d344396a2c304471ed8ae46 | |
parent | a96af8eecb90aa5f86ac7e6b99951e50ee3f08b7 (diff) |
emacsen-install: introduce possibility for multiple .precious files
Replace the two bits of code that manipulate vm-autoload.el and
vm-autoload.el.precious, around `make clean', with loops over
$PRECIOUS.
No functional change as yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/vm.emacsen-install | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/debian/vm.emacsen-install b/debian/vm.emacsen-install index d3dcebd..de18179 100644 --- a/debian/vm.emacsen-install +++ b/debian/vm.emacsen-install @@ -42,6 +42,7 @@ PRELOADS=" -l $BYTEOPTS -l ./vm-message.el -l ./vm-misc.el -l ./vm-vars.el -l ./ BATCHFLAGS=" -batch -q -no-site-file" CORE="vm-message.el vm-misc.el vm-byteopts.el" STAMPFILE=vm-autoload.elc +PRECIOUS='vm-autoload.el' case "$FLAVOUR" in emacs|emacs25|emacs24|emacs23|emacs-snapshot|xemacs21) @@ -75,15 +76,20 @@ case "$FLAVOUR" in LOG=`tempfile`; trap "test -f $LOG && mv -f $LOG $ELCDIR/install.log > /dev/null 2>&1" exit if [ -x /usr/bin/make ]; then - # Save the old autoloads file since we ship it in the .deb - test ! -f vm-autoload.el || cp -a vm-autoload.el vm-autoload.el.precious + # Save some files which "make clean" removes + # but which are shipped in the .deb + for f in $PRECIOUS; do + test ! -f $f || cp -a $f $f.precious + done make clean > $LOG; (make prefix=/usr EMACS=$FLAVOUR EMACS_FLAVOR=$EMACS_FLAVOR) >> $LOG 2>&1 ; echo "tar cf - . | (cd $ELCDIR; tar xpf -)" >> $LOG; tar cf - . | (cd $ELCDIR; tar xpf -) make clean >> $LOG; - # Restore the autoloads file - test ! -f vm-autoload.el.precious || mv vm-autoload.el.precious vm-autoload.el + # Restore the saved files + for f in $PRECIOUS; do + test ! -f $f.precious || mv $f.precious $f + done echo "cd $ELCDIR;" >> $LOG; cd $ELCDIR; else |