## Is it really Emacs's job to create those directories?
## Should we also be ensuring they contain subdirs.el files?
## It would be easy to do, just use write_subdir.
+
+## Note that we use tar instead of plain old cp -R/-r because the latter
+## is apparently not portable (even in 2012!).
+## http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00278.html
+## I have no idea which platforms Emacs supports where cp -R does not
+## work correctly, and therefore no idea when tar can be replaced.
+## See also these comments from 2004 about cp -r working fine:
+## http://lists.gnu.org/archive/html/autoconf-patches/2004-11/msg00005.html
install-arch-indep: install-leim install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
umask 022 ; \
$(MKDIR_P) $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
tar -xvf - && cat > /dev/null) || exit 1; \
[ "$${dir}" != "${srcdir}/etc" ] || rm -f $${dest}/DOC* ; \
for subdir in `find $${dest} -type d -print` ; do \
- rm -f $${subdir}/.gitignore $${subdir}/.arch-inventory \
- $${subdir}/.DS_Store $${subdir}/ChangeLog* \
- $${subdir}/\#* $${subdir}/.\#* \
- $${subdir}/*~ $${subdir}/*.orig ; \
+ rm -f $${subdir}/.gitignore ; \
+ rm -f $${subdir}/.arch-inventory ; \
+ rm -f $${subdir}/.DS_Store ; \
+ rm -f $${subdir}/\#* ; \
+ rm -f $${subdir}/.\#* ; \
+ rm -f $${subdir}/*~ ; \
+ rm -f $${subdir}/*.orig ; \
+ rm -f $${subdir}/ChangeLog* ; \
[ "$${dir}" != "${srcdir}/etc" ] && \
- rm -f $${subdir}/[mM]akefile*[.-]in $${subdir}/[mM]akefile ; \
+ rm -f $${subdir}/[mM]akefile*[.-]in $${subdir}/[mM]akefile ; \
done ; \
find $${dest} -exec chown $${installuser} {} ';' ;\
done
cd ${iconsrcdir} || exit 1; umask 022 ; \
for dir in */*/apps */*/mimetypes; do \
[ -d $${dir} ] || continue ; \
- ( cd $${thisdir}; ${MKDIR_P} ${icondir}/$${dir} ) ; \
+ ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
for icon in $${dir}/*.*; do \
[ -r $${icon} ] || continue ; \
( cd $${thisdir}; \
- ${INSTALL_DATA} ${iconsrcdir}/$${icon} ${icondir}/$${icon} ) \
+ ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${icon} ) \
|| exit 1; \
done ; \
done