[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Unbreak `make install' in leim/ when leim's ${INSTALLDIR} do
From: |
Giorgos Keramidas |
Subject: |
Re: [PATCH] Unbreak `make install' in leim/ when leim's ${INSTALLDIR} doesn't exist |
Date: |
Thu, 12 Oct 2006 03:31:10 +0300 |
On 2006-10-12 02:22, Giorgos Keramidas <address@hidden> wrote:
> The current `make install' target of the leim/ subdirectory has a subtle
> problem when ${prefix}/share/emacs/22.0.50/leim does not exist at all.
The previous patch changes the logic of the if-then blocks. The install
commands shouldn't run at all if ${INSTALLDIR} is the current directory.
The following version keeps the same behavior, and touches a smaller
part of the Makefile too :)
--- patch begins here -----------------------------------------------------
Unbreak `make install' in leim/ when leim's ${INSTALLDIR} doesn't exist.
What was happening with the old shell script called by the `install'
target was kind of tricky. The command:
if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then
if [ -d ${INSTALLDIR} ] ; then \
contains a backquoted `cd' command into a directory which may not exist.
This causes the /bin/sh shell on Solaris (possibly other systems too),
to abort the entire if-then compound statement, because the `cd' command
fails before the if-then statement has a chance to run at all (i.e. at
backquote-expansion time).
Switching the order of the two if-then checks ensures that `cd' will
only run if ${INSTALLDIR} *really* exists, and `make install' in leim/
works again.
diff -r 34e5fff7519a -r 3495805897b2 leim/Makefile.in
*** a/leim/Makefile.in Wed Oct 11 18:10:15 2006 +0300
--- b/leim/Makefile.in Thu Oct 12 02:18:45 2006 +0300
***************
*** 216,228 ****
sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
install: all
if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
! if [ -d ${INSTALLDIR} ] ; then \
! rm -rf ${INSTALLDIR}/leim-list.el; \
! rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
! else \
! ${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \
! fi; \
echo "Copying leim files to ${INSTALLDIR} ..." ; \
if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
tar -chf - leim-list.el quail ja-dic \
--- 216,227 ----
sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
install: all
+ if [ ! -d ${INSTALLDIR} ]; then \
+ ${srcdir}/${dot}${dot}/mkinstalldirs ${INSTALLDIR}; \
+ fi
if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
! rm -rf ${INSTALLDIR}/leim-list.el; \
! rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
echo "Copying leim files to ${INSTALLDIR} ..." ; \
if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
tar -chf - leim-list.el quail ja-dic \
***************
*** 241,247 ****
rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \
rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \
rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \
! else true; fi
-unset CDPATH; \
if [ -n "${GZIP_PROG}" ]; \
then \
--- 240,246 ----
rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \
rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \
rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \
! fi
-unset CDPATH; \
if [ -n "${GZIP_PROG}" ]; \
then \
--- patch ends here -------------------------------------------------------