changeset 100783:14048381c2c5

(install-arch-dep): Remove old directories in ns_app* before moving new directories there.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 30 Dec 2008 20:13:04 +0000
parents 357f161c8821
children 28106814f9f2
files Makefile.in
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Tue Dec 30 16:37:13 2008 +0000
+++ b/Makefile.in	Tue Dec 30 20:13:04 2008 +0000
@@ -393,6 +393,8 @@
 install: all install-arch-indep install-arch-dep install-leim blessmail
 	@true
 
+MV_DIRS = for i in $$dir; do rm -fr $$(basename "$$i") ; mv "$$i" . ; done
+
 ### Install the executables that were compiled specifically for this machine.
 ### It would be nice to do something for a parallel make
 ### to ensure that install-arch-indep finishes before this starts.
@@ -414,10 +416,11 @@
 	done
 	if test "${ns_appdir}" != ""; then \
 	  ( cd ${ns_appresdir} ; \
-	    if test -d share/emacs ; then mv -f share/emacs/*/* . ; fi ; \
-	    if test -d share/info ; then mv -f share/info . ; fi ; \
+	    if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
+	    if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \
 	    rm -fr share ) ; \
-	  ( cd ${ns_appbindir}/libexec ; mv -f emacs/*/*/* . ; rm -fr emacs ) ; \
+	  ( cd ${ns_appbindir}/libexec ; dir=emacs/*/*/* ; $(MV_DIRS); \
+	    rm -fr emacs ) ; \
 	  ( cd ${ns_appbindir}/bin ; rm -f emacs emacs-23* ; \
 	    ln -sf ../libexec/* .) ; \
 	else true ; fi