From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unbreak `make install' in leim/ when leim's ${INSTALLDIR} doesn't exist Date: Thu, 12 Oct 2006 03:31:10 +0300 Message-ID: <20061012003110.GA86094@gothmog.pc> References: <549c434ebfb50d1a4ca2.1160608974@gothmog.pc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160613113 18576 80.91.229.2 (12 Oct 2006 00:31:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Oct 2006 00:31:53 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 12 02:31:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GXoTj-0007z5-I9 for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2006 02:31:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXoTj-0006yV-0p for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2006 20:31:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXoTS-0006wB-QW for emacs-devel@gnu.org; Wed, 11 Oct 2006 20:30:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXoTP-0006qA-Ee for emacs-devel@gnu.org; Wed, 11 Oct 2006 20:30:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXoTP-0006pl-3L for emacs-devel@gnu.org; Wed, 11 Oct 2006 20:30:55 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GXobV-0008D0-Pq for emacs-devel@gnu.org; Wed, 11 Oct 2006 20:39:18 -0400 Original-Received: from [62.1.205.36] (helo=igloo.linux.gr) by mx20.gnu.org with esmtp (Exim 4.52) id 1GXoTN-0007Qm-P2 for emacs-devel@gnu.org; Wed, 11 Oct 2006 20:30:54 -0400 Original-Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id k9C0UXqk010599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 12 Oct 2006 03:30:35 +0300 Original-Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.8/8.13.8) with ESMTP id k9C0VAKL086108 for ; Thu, 12 Oct 2006 03:31:11 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from giorgos@localhost) by gothmog.pc (8.13.8/8.13.8/Submit) id k9C0VAfl086107 for emacs-devel@gnu.org; Thu, 12 Oct 2006 03:31:10 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Original-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <549c434ebfb50d1a4ca2.1160608974@gothmog.pc> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.591, required 5, AWL -0.19, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60623 Archived-At: On 2006-10-12 02:22, Giorgos Keramidas 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 -------------------------------------------------------