changeset 100786:dba37a087502

(install): Remove old directories in ns_appresdir before moving new directories there.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 30 Dec 2008 20:13:38 +0000
parents 4565eebf0ca4
children a001ee185900
files leim/Makefile.in
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/leim/Makefile.in	Tue Dec 30 20:13:28 2008 +0000
+++ b/leim/Makefile.in	Tue Dec 30 20:13:38 2008 +0000
@@ -220,6 +220,8 @@
 	fi
 	sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
 
+MV_DIRS = for i in $$dir; do rm -fr $$(basename "$$i") ; mv "$$i" . ; done
+
 install: all
 	if [ ! -d ${INSTALLDIR} ] ; then \
           ${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \
@@ -262,7 +264,7 @@
 	find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
 	if [ "${ns_appresdir}" != "" ]; then \
 	  ( cd ${ns_appresdir} ; \
-	    if test -d share/emacs ; then mv -f share/emacs/*/* . ; fi ; \
+	    if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
 	    rm -fr share ) ; \
 	else true ; fi