aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-05-09 20:40:20 -0700
committerGlenn Morris2012-05-09 20:40:20 -0700
commitff57c2ec02157a5fa209a5626d2b79405d1f40d7 (patch)
tree4a02adc6cbc38dd331cf951176a7ecbc4228189b
parent51b1e0596d4445e1f5c3fd2fa66fe597ac31d78a (diff)
downloademacs-ff57c2ec02157a5fa209a5626d2b79405d1f40d7.tar.gz
emacs-ff57c2ec02157a5fa209a5626d2b79405d1f40d7.zip
Install self-contained ns leim files directly to their final destination
This is instead of installing them first in one place, then moving them. It also fixes the previous change, which was incorrect for the -disable-ns-self-contained case. * configure.in (LEIM_INSTALLDIR): New output variable. * leim/Makefile.in: (install_prefix): New. (LEIM_INSTALLDIR): New, set by configure. (install): Use LEIM_INSTALLDIR.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in3
-rw-r--r--leim/ChangeLog6
-rw-r--r--leim/Makefile.in48
4 files changed, 36 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 96ad5c2d189..ae355df0c8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12012-05-10 Glenn Morris <rgm@gnu.org>
2
3 * configure.in (LEIM_INSTALLDIR): New output variable.
4
12012-05-08 Stefan Monnier <monnier@iro.umontreal.ca> 52012-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * .dir-locals.el (log-edit-mode): Enable gnu-style checks. 7 * .dir-locals.el (log-edit-mode): Enable gnu-style checks.
diff --git a/configure.in b/configure.in
index 5fe14322a95..1554d8e2aee 100644
--- a/configure.in
+++ b/configure.in
@@ -1636,6 +1636,7 @@ fail;
1636fi 1636fi
1637AC_SUBST(TEMACS_LDFLAGS2) 1637AC_SUBST(TEMACS_LDFLAGS2)
1638 1638
1639LEIM_INSTALLDIR="\${install_prefix}/leim"
1639ns_frag=/dev/null 1640ns_frag=/dev/null
1640NS_OBJ= 1641NS_OBJ=
1641NS_OBJC_OBJ= 1642NS_OBJC_OBJ=
@@ -1651,6 +1652,7 @@ if test "${HAVE_NS}" = yes; then
1651 prefix=${ns_appresdir} 1652 prefix=${ns_appresdir}
1652 exec_prefix=${ns_appbindir} 1653 exec_prefix=${ns_appbindir}
1653 libexecdir=${ns_appbindir}/libexec 1654 libexecdir=${ns_appbindir}/libexec
1655 LEIM_INSTALLDIR="\${ns_appresdir}/leim"
1654 fi 1656 fi
1655 ns_frag=$srcdir/src/ns.mk 1657 ns_frag=$srcdir/src/ns.mk
1656 NS_OBJ="fontset.o fringe.o image.o" 1658 NS_OBJ="fontset.o fringe.o image.o"
@@ -1658,6 +1660,7 @@ if test "${HAVE_NS}" = yes; then
1658fi 1660fi
1659CFLAGS="$tmp_CFLAGS" 1661CFLAGS="$tmp_CFLAGS"
1660CPPFLAGS="$tmp_CPPFLAGS" 1662CPPFLAGS="$tmp_CPPFLAGS"
1663AC_SUBST(LEIM_INSTALLDIR)
1661AC_SUBST(NS_OBJ) 1664AC_SUBST(NS_OBJ)
1662AC_SUBST(NS_OBJC_OBJ) 1665AC_SUBST(NS_OBJC_OBJ)
1663AC_SUBST(LIB_STANDARD) 1666AC_SUBST(LIB_STANDARD)
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 49d5b8c0b9a..85878f65734 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,5 +1,11 @@
12012-05-10 Glenn Morris <rgm@gnu.org> 12012-05-10 Glenn Morris <rgm@gnu.org>
2 2
3 * Makefile.in: Install self-contained ns files directly to
4 their final destination.
5 (install_prefix): New.
6 (LEIM_INSTALLDIR): New, set by configure.
7 (install): Use LEIM_INSTALLDIR.
8
3 * Makefile.in (MV_DIRS): Remove. 9 * Makefile.in (MV_DIRS): Remove.
4 (install): Simplify the --with-ns case. 10 (install): Simplify the --with-ns case.
5 11
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 1b1cd3fbcfd..2bf16c0be7e 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -34,9 +34,12 @@ datadir=@datadir@
34srcdir=@srcdir@ 34srcdir=@srcdir@
35ns_appresdir=@ns_appresdir@ 35ns_appresdir=@ns_appresdir@
36 36
37install_prefix=$(DESTDIR)${datadir}/emacs/${version}
38
37# Where to install LEIM files. 39# Where to install LEIM files.
38# Should be $ns_appresdir/leim if $ns_appresdir is set. 40# For most builds, this is ${install_prefix}/leim.
39INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim 41# For self-contained ns builds, it is ${ns_appresdir}/leim.
42LEIM_INSTALLDIR=@LEIM_INSTALLDIR@
40 43
41GZIP_PROG = @GZIP_PROG@ 44GZIP_PROG = @GZIP_PROG@
42 45
@@ -176,49 +179,44 @@ compile-main: ${TIT_MISC}
176 done 179 done
177 180
178install: all 181install: all
179 if [ ! -d ${INSTALLDIR} ] ; then \ 182 if [ ! -d ${LEIM_INSTALLDIR} ] ; then \
180 umask 022; ${srcdir}/../build-aux/install-sh -d ${INSTALLDIR}; \ 183 umask 022; ${srcdir}/../build-aux/install-sh -d ${LEIM_INSTALLDIR}; \
181 else true; fi 184 else true; fi
182 if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ 185 if [ x`(cd ${LEIM_INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
183 rm -f ${INSTALLDIR}/leim-list.el; \ 186 rm -f ${LEIM_INSTALLDIR}/leim-list.el; \
184 rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \ 187 rm -rf ${LEIM_INSTALLDIR}/quail ${LEIM_INSTALLDIR}/ja-dic ; \
185 echo "Copying leim files to ${INSTALLDIR} ..." ; \ 188 echo "Copying leim files to ${LEIM_INSTALLDIR} ..." ; \
186 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \ 189 if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
187 tar -chf - leim-list.el quail ja-dic \ 190 tar -chf - leim-list.el quail ja-dic \
188 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ 191 | (cd ${LEIM_INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
189 else \ 192 else \
190 tar -chf - leim-list.el quail \ 193 tar -chf - leim-list.el quail \
191 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ 194 | (cd ${LEIM_INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
192 cd ${srcdir}; \ 195 cd ${srcdir}; \
193 tar -chf - quail/* ja-dic \ 196 tar -chf - quail/* ja-dic \
194 | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ 197 | (cd ${LEIM_INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
195 fi; \ 198 fi; \
196 rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \ 199 rm -f ${LEIM_INSTALLDIR}/.gitignore ${LEIM_INSTALLDIR}/*/.gitignore; \
197 rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \ 200 rm -f ${LEIM_INSTALLDIR}/.arch-inventory ${LEIM_INSTALLDIR}/*/.arch-inventory; \
198 rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \ 201 rm -f ${LEIM_INSTALLDIR}/\#* ${LEIM_INSTALLDIR}/*/\#* ; \
199 rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \ 202 rm -f ${LEIM_INSTALLDIR}/.\#* ${LEIM_INSTALLDIR}/*/.\#* ; \
200 rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \ 203 rm -f ${LEIM_INSTALLDIR}/*~ ${LEIM_INSTALLDIR}/*/*~ ; \
201 rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \ 204 rm -f ${LEIM_INSTALLDIR}/*.orig ${LEIM_INSTALLDIR}/*/*.orig ; \
202 else true; fi 205 else true; fi
203 -unset CDPATH; \ 206 -unset CDPATH; \
204 if [ -n "${GZIP_PROG}" ]; \ 207 if [ -n "${GZIP_PROG}" ]; \
205 then \ 208 then \
206 echo "Compressing *.el ..." ; \ 209 echo "Compressing *.el ..." ; \
207 (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \ 210 (cd ${LEIM_INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \
208 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \ 211 ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
209 done) \ 212 done) \
210 else true; fi 213 else true; fi
211 -chmod -R a+r ${INSTALLDIR} 214 -chmod -R a+r ${LEIM_INSTALLDIR}
212 for installuser in $${LOGNAME} $${USERNAME} $${USER} \ 215 for installuser in $${LOGNAME} $${USERNAME} $${USER} \
213 `id -un 2> /dev/null`; do \ 216 `id -un 2> /dev/null`; do \
214 [ -n "$${installuser}" ] && break ; \ 217 [ -n "$${installuser}" ] && break ; \
215 done ; \ 218 done ; \
216 find ${INSTALLDIR} -exec chown $${installuser} '{}' ';' 219 find ${LEIM_INSTALLDIR} -exec chown $${installuser} '{}' ';'
217 if [ "${ns_appresdir}" != "" ]; then \
218 rm -rf ${ns_appresdir}/leim; \
219 mv ${INSTALLDIR} ${ns_appresdir} || exit 1; \
220 rmdir -p ${ns_appresdir}/share/emacs/${version} 2>/dev/null || true; \
221 else true ; fi
222 220
223clean mostlyclean: 221clean mostlyclean:
224 rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \ 222 rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \